×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    30

    Question QGeoPositionInfoSource initialization problem

    Greetings!

    I 'm trying to make a gps app for symbian abd currently my main problem is this.

    Code:
    Header file:
    Code:
    QPointer<QGeoPositionInfoSource> locationDataSource;
    Source file:
    Code:
    void main::startGPS()
    {
    locationDataSource = QGeoPositionInfoSource::createDefaultSource(this);
    locationDataSource->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
    
    connect(locationDataSource, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
    
    locationDataSource->startUpdates();
    }
    On the simulator it works just fine. When I try it on my Symbian device, when this function is executed it crashes.

    Any ideas?
    Thanks

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QGeoPositionInfoSource initialization problem

    My best guess is you have not added required capabilities NETWORK and LOCATION. (more clearer if you post your .pro file).
    Usually for on device crashes if you can find the crash code it will be easier to find the reason behind it.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    30

    Post Re: QGeoPositionInfoSource initialization problem

    No, it's all there..

    Here's my .pro:
    Code:
    QT+= core gui
    QT+= network
    
    TARGET = Location
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
            location.cpp
    
    HEADERS  += location.h
    
    FORMS    += location.ui
    
    CONFIG += mobility
    MOBILITY = location
    
    symbian {
        TARGET.UID3 = 0xe75b916d
        # TARGET.CAPABILITY += NetworkServices \ Location
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    
    ICON = icon.svg
    
    RESOURCES += \
        Location_images.qrc
    Maybe it's some memory allocation problem caused by the
    Code:
    locationDataSource = QGeoPositionInfoSource::createDefaultSource(this);
    that I can't fix..

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QGeoPositionInfoSource initialization problem

    I can see you have commented out the
    Code:
    symbian {
        TARGET.UID3 = 0xe75b916d
        # TARGET.CAPABILITY += NetworkServices \ Location
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    can you remove # and generate the sis .. make are in your generated .mmp file you have both the capabilities added in.

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    30

    Re: QGeoPositionInfoSource initialization problem

    Nope, it still crashes.

    What else could it be?

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QGeoPositionInfoSource initialization problem

    can you show your generated mmp file.
    also it is very helpful if you can find the Error Code for the crash.

  7. #7
    Registered User
    Join Date
    Feb 2010
    Posts
    30

    Re: QGeoPositionInfoSource initialization problem

    I put some extra capabilities that I need for messaging, that's why they show up here..

    MMP file:
    Code:
    // ==============================================================================
    // Generated by qmake (2.01a) (Qt 4.6.3) on: 2011-02-27T13:43:25
    // This file is generated by qmake and should not be modified by the
    // user.
    //  Name        : MMSLocation.mmp
    // ==============================================================================
    
    TARGET		MMSLocation.exe
    TARGETTYPE		EXE
    
    UID		0x100039CE 0xe75b916d
    SECUREID		0xe75b916d
    
    EPOCSTACKSIZE		0x14000
    EPOCHEAPSIZE		0x020000 0x800000
    
    SOURCEPATH			. 
    LANG SC 
    START RESOURCE		MMSLocation.rss
    HEADER
    TARGETPATH			/resource/apps
    END
    
    SOURCEPATH			.
    START RESOURCE		MMSLocation_reg.rss
    TARGETPATH		/private/10003a3f/import/apps
    END
    
    
    // Qt Macros
    MACRO		UNICODE
    MACRO		QT_KEYPAD_NAVIGATION
    MACRO		QT_SOFTKEYS_ENABLED
    MACRO		QT_USE_MATH_H_FLOATS
    MACRO		QT_GUI_LIB
    MACRO		QT_NETWORK_LIB
    MACRO		QT_CORE_LIB
    
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtCore
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtCore/tmp
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtNetwork
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtNetwork/tmp
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtGui
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtGui/tmp
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/tmp
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtMessaging
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtMessaging/tmp
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtContacts
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtContacts/tmp
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtLocation
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/include/QtLocation/tmp
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/mkspecs/common/symbian
    SYSTEMINCLUDE		../../../NokiaQtSDK/Symbian/SDK/mkspecs/common/symbian/tmp
    SYSTEMINCLUDE		/epoc32/include
    SYSTEMINCLUDE		/epoc32/include/osextensions/stdapis
    SYSTEMINCLUDE		/epoc32/include/osextensions/stdapis/sys
    SYSTEMINCLUDE		/epoc32/include/stdapis
    SYSTEMINCLUDE		/epoc32/include/stdapis/sys
    SYSTEMINCLUDE		/epoc32/include/oem
    SYSTEMINCLUDE		/epoc32/include/middleware
    SYSTEMINCLUDE		/epoc32/include/domain/middleware
    SYSTEMINCLUDE		/epoc32/include/osextensions
    SYSTEMINCLUDE		/epoc32/include/domain/osextensions
    SYSTEMINCLUDE		/epoc32/include/applications
    SYSTEMINCLUDE		/epoc32/include/domain/applications
    SYSTEMINCLUDE		/epoc32/include/domain/osextensions/loc
    SYSTEMINCLUDE		/epoc32/include/domain/middleware/loc
    SYSTEMINCLUDE		/epoc32/include/domain/applications/loc
    SYSTEMINCLUDE		/epoc32/include/domain/osextensions/loc/sc
    SYSTEMINCLUDE		/epoc32/include/domain/middleware/loc/sc
    SYSTEMINCLUDE		/epoc32/include/domain/applications/loc/sc
    SYSTEMINCLUDE		../../../QtLocation
    SYSTEMINCLUDE		../../../QtLocation/tmp
    SYSTEMINCLUDE		../../../QtContacts
    SYSTEMINCLUDE		../../../QtContacts/tmp
    SYSTEMINCLUDE		../../../QtMessaging
    SYSTEMINCLUDE		../../../QtMessaging/tmp
    SYSTEMINCLUDE		/epoc32/include/osextensions/stdapis/stlport
    SYSTEMINCLUDE		/epoc32/include/stdapis/stlport
    SYSTEMINCLUDE		moc
    SYSTEMINCLUDE		moc/tmp
    SYSTEMINCLUDE		ui
    SYSTEMINCLUDE		ui/tmp
    SYSTEMINCLUDE		.
    SYSTEMINCLUDE		tmp
    SYSTEMINCLUDE		rcc
    SYSTEMINCLUDE		rcc/tmp
    
    SOURCEPATH 	.
    SOURCE		main.cpp
    SOURCE		mmslocation.cpp
    
    SOURCEPATH 	moc
    SOURCE		moc_mmslocation.cpp
    
    SOURCEPATH 	rcc
    SOURCE		qrc_MMSLocation_images.cpp
    
    
    LIBRARY		QtLocation.lib
    LIBRARY		QtContacts.lib
    LIBRARY		QtMessaging.lib
    LIBRARY		libstdcpp.lib
    LIBRARY		QtGui.lib
    LIBRARY		QtNetwork.lib
    LIBRARY		QtCore.lib
    LIBRARY		libc.lib
    LIBRARY		libm.lib
    LIBRARY		euser.lib
    LIBRARY		libdl.lib
    STATICLIBRARY	qtmain.lib
    
    CAPABILITY		NetworkServices\Location\ReadUserData\ReadDeviceData 
    
    OPTION CW -wchar_t on
    OPTION ARMCC --visibility_inlines_hidden
    #if defined(ARMCC_4_0)
    OPTION ARMCC --import_all_vtbl
    #endif
    OPTION GCCE -fvisibility-inlines-hidden
    
    VERSION 10.0
    
    ARMFPU softvfp
    
    PAGED
    
    BYTEPAIRCOMPRESSTARGET
    
    OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE
    
    USERINCLUDE .
    It doesn't crash on the simulator to start watching the code one by one...

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QGeoPositionInfoSource initialization problem

    i suggest you clean your intermediate of project files then try again.

    Note that Symbian Builds give more problematic then other platforms if you donot take care.

  9. #9
    Registered User
    Join Date
    Feb 2010
    Posts
    30

    Re: QGeoPositionInfoSource initialization problem

    I have a 5800 for testing. Maybe the memory is too small to handle the application..

  10. #10
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QGeoPositionInfoSource initialization problem

    can not be sure . i suggest you install errrd to get the panic code. [search wiki for how to]

  11. #11
    Registered User
    Join Date
    Feb 2010
    Posts
    30

    Question Re: QGeoPositionInfoSource initialization problem

    I changed the capabilities format from
    Code:
    TARGET.CAPABILITY += NetworkServices \ Location
    to
    Code:
    TARGET.CAPABILITY = NetworkServices Location
    and it worked. Don't know why and how, but I'm glad it did.

    Now I'm trying to send a MMS but it doesn't seem to be sent, although the QMessageService::State error says that it did.

    Do I need any extra capabilities just to send a MMS?

    Code:
    CONFIG += mobility
    MOBILITY += location
    MOBILITY += messaging
    
    TARGET.CAPABILITY = NetworkServices Location
    Thanks for your help so far

  12. #12
    Registered User
    Join Date
    Apr 2011
    Posts
    9

    Re: QGeoPositionInfoSource initialization problem

    Quote Originally Posted by codestain View Post
    Greetings!

    I 'm trying to make a gps app for symbian abd currently my main problem is this.

    Code:
    Header file:
    Code:
    QPointer<QGeoPositionInfoSource> locationDataSource;
    Source file:
    Code:
    void main::startGPS()
    {
    locationDataSource = QGeoPositionInfoSource::createDefaultSource(this);
    locationDataSource->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
    
    connect(locationDataSource, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
    
    locationDataSource->startUpdates();
    }
    On the simulator it works just fine. When I try it on my Symbian device, when this function is executed it crashes.

    Any ideas?
    Thanks
    Hi, I also try the code. However it displays the error:

    ISO C++ forbids declaration of 'QPointer' with no type

    at QPointer<QGeoPositionInfoSource> locationDataSource;

    Please help me. I am looking forward to your reply. Thank you.

  13. #13
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QGeoPositionInfoSource initialization problem

    Quote Originally Posted by lovesunset21 View Post
    Hi, I also try the code. However it displays the error:

    ISO C++ forbids declaration of 'QPointer' with no type

    at QPointer<QGeoPositionInfoSource> locationDataSource;

    Please help me. I am looking forward to your reply. Thank you.
    did you add any of the QtCore headers in your header file. if not try using #include <QPointer> should fix your problem.

  14. #14
    Registered User
    Join Date
    Apr 2011
    Posts
    9

    Re: QGeoPositionInfoSource initialization problem

    Hi, how's about the error QPointer? Any ideas? Thank you.

  15. #15
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QGeoPositionInfoSource initialization problem

    Quote Originally Posted by skumar_rao View Post
    did you add any of the QtCore headers in your header file. if not try using #include <QPointer> should fix your problem.
    Quote Originally Posted by lovesunset21 View Post
    Hi, how's about the error QPointer? Any ideas? Thank you.
    did not it solved the problem .. if not can you show the error output from the QtCreater as it is ..

Similar Threads

  1. initialization problem
    By ranjini in forum Symbian
    Replies: 3
    Last Post: 2010-11-03, 10:46
  2. Issue with QGeoPositionInfoSource
    By davkaplan in forum [Archived] Qt Mobility Project
    Replies: 10
    Last Post: 2010-08-26, 03:11
  3. IrCOMM Initialization Problem
    By alexkots in forum Series 40 & S60 Platform Feedback Archive
    Replies: 1
    Last Post: 2008-06-05, 06:24
  4. static dll initialization problem?
    By donDonald in forum Symbian
    Replies: 2
    Last Post: 2007-02-26, 11:00
  5. sound initialization problem
    By maharim in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2004-04-16, 10:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×