Results 1 to 3 of 3

Thread: QtPositioning introduces an error

  1. #1
    Join Date
    Nov 2016
    Location
    Ridgecrest California
    Posts
    33
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default QtPositioning introduces an error

    I’m attempting to use the QGeoCoordinate and QGeoRectangle C++ classes. After many linking failures, I finally found that I needed to add the positioning keyword to my .pro file. So I used…

    QT += positioning.

    After doing this, it would compile just fine but I would receive a segmentation fault error as soon as I tried to run it in debug mode.

    I wasn’t sure where the SIGSEGV error was occurring, so I started placing break-points at strategic positions to try and determine at what spot in the code the problem was occurring. Unfortunately, even if I set a break-point at the first line of my main{}, it appeared as if program execution never got to the code I wrote.

    Internet searches haven’t seemed to turn up any answers, so I’m hoping someone here may have come across this in the past or may know what my problem is.

    I didn't include any code as the problem appears to be something else. I’m using Qt 5.7.0 with MinGW 32 bit from Qt Creator 4.1.0 on an HP Intel Xeon using Windows 7 Professional operating system with service pack 1 installed.

    I'd appreciate any insight someone may have on this situation. Thanks in advance.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QtPositioning introduces an error

    Do you have any global static objects, or class static objects? Those are initialised before the main is called, put a break point there and check.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Nov 2016
    Location
    Ridgecrest California
    Posts
    33
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android

    Default Re: QtPositioning introduces an error

    Thanks for your reply Santosh.

    The Ui namespace has global scope but I don't have any variables, classes or functions that are declared as static globaly.

    I know this wasn't part of your suggestion, but since I'm using the QGraphicsObject class, I do have several pure virtual functions that are const with the declarations modified by the Q_DECL_OVERRIDE macro. So just on a whim, and because I've had issues with const values in the past, I tried breakpoints at those points but execution has never advanced even that far.

    Not sure if it will help, but this is the debug dump...

    ~"Dump of assembler code for function _pei386_runtime_relocator:\n"
    ~" 0x004059b8 <+0>:\t55\tpush %ebp\n"
    ~" 0x004059b9 <+1>:\tb9 40 04 45 00\tmov $0x450440,%ecx\n"
    ~" 0x004059be <+6>:\t89 e5\tmov %esp,%ebp\n"
    ~" 0x004059c0 <+8>:\teb 14\tjmp 0x4059d6 <_pei386_runtime_relocator+30>\n"
    ~" 0x004059c2 <+10>:\t8d b6 00 00 00 00\tlea 0x0(%esi),%esi\n"
    ~" 0x004059c8 <+16>:\t8b 51 04\tmov 0x4(%ecx),%edx\n"
    ~" 0x004059cb <+19>:\t8b 01\tmov (%ecx),%eax\n"
    ~" 0x004059cd <+21>:\t83 c1 08\tadd $0x8,%ecx\n"
    ~"=> 0x004059d0 <+24>:\t01 82 00 00 40 00\tadd %eax,0x400000(%edx)\n"
    ~" 0x004059d6 <+30>:\t81 f9 f4 04 45 00\tcmp $0x4504f4,%ecx\n"
    ~" 0x004059dc <+36>:\t72 ea\tjb 0x4059c8 <_pei386_runtime_relocator+16>\n"
    ~" 0x004059de <+38>:\t5d\tpop %ebp\n"
    ~" 0x004059df <+39>:\tc3\tret \n"
    ~" 0x004059e0 <+40>:\t90\tnop\n"
    ~" 0x004059e1 <+41>:\t90\tnop\n"
    ~" 0x004059e2 <+42>:\t90\tnop\n"
    ~" 0x004059e3 <+43>:\t90\tnop\n"
    ~" 0x004059e4 <+44>:\t90\tnop\n"
    ~" 0x004059e5 <+45>:\t90\tnop\n"
    ~" 0x004059e6 <+46>:\t90\tnop\n"
    ~" 0x004059e7 <+47>:\t90\tnop\n"
    ~"End of assembler dump.\n"

Similar Threads

  1. Buiding Android Qt 5.5 on OS X, module QtPositioning, QtLocation not installed
    By don@thegagnes.com in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 18th October 2015, 05:14
  2. Replies: 4
    Last Post: 29th April 2014, 17:20
  3. : error: [\NokiaQtSDK\Symbian\SDK\epoc32\release\gcce\udeb\V ideo.exe] Error 1
    By ranjit.kadam in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st May 2011, 23:11
  4. Replies: 0
    Last Post: 29th October 2009, 20:20

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.