Bug #3505

Crash when GPSD goes away and trying to connect again

Added by Volker Fröhlich about 2 years ago. Updated 5 months ago.

Status:Feedback Start Date:
Priority:High Due date:
Assigned to:- % Done:

0%

Category:Digitising
Target version:Version 2.0.0
Platform:Fedora Patch supplied:No
Platform version: Affected version:1.7.4
Status info: Causes crash or corruption:Yes
Resolution:

Description

Connection was created mostly following this guide.

  • Connect to a GPS device
  • Stop GPSD (data is still delivered to /dev/rfcomm0)
  • Click Disconnect
  • Click Connect
  • Segfault

No settings regarding GPS were changed in QGIS. The build actually uses a system wide Qwtpolar and Spatialindex lib, but I suppose that's not the cause. The build is like 4 days old.

No idea what debugging info is missing here.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#3905  0x00000000006c4052 in [[QgsGPSInformationWidget]]::disconnectGps (this=0x1fa8e50)
    at /usr/src/debug/qgis-1.7.0/src/app/gps/qgsgpsinformationwidget.cpp:370
#3906  0x00000000007045a4 in [[QgsGPSInformationWidget]]::qt_metacall (this=0x1fa8e50, _c=QMetaObject::InvokeMetaMethod, 
    _id=<value optimized out>, _a=0x7fffffffc750)
    at /usr/src/debug/qgis-1.7.0/src/app/gps/moc_qgsgpsinformationwidget.cxx:103
#3907  0x00000032f377004f in QMetaObject::activate (sender=0x1fa73f0, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0x7fffffffc750) at kernel/qobject.cpp:3272
#3908  0x00000032f70288e2 in QAbstractButton::toggled (this=<value optimized out>, _t1=false)
    at .moc/release-shared/moc_qabstractbutton.cpp:213
#3909  0x00000032f6d72593 in QAbstractButton::setChecked (this=0x1fa73f0, checked=false)
    at widgets/qabstractbutton.cpp:766
#3910  0x00000000006c3eb4 in [[QgsGPSInformationWidget]]::timedout (this=0x1fa8e50)
    at /usr/src/debug/qgis-1.7.0/src/app/gps/qgsgpsinformationwidget.cpp:351
#3911  0x000000000070454c in [[QgsGPSInformationWidget]]::qt_metacall (this=0x1fa8e50, _c=QMetaObject::InvokeMetaMethod, 
    _id=<value optimized out>, _a=0x7fffffffc880)
    at /usr/src/debug/qgis-1.7.0/src/app/gps/moc_qgsgpsinformationwidget.cxx:119
#3912  0x00000032f377004f in QMetaObject::activate (sender=0x202fd20, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3272
#3913  0x00007ffff7ba875a in [[QgsGPSDetector]]::advance (this=0x202fd20)
    at /usr/src/debug/qgis-1.7.0/src/core/gps/qgsgpsdetector.cpp:135
#10 0x00007ffff7d4a50c in [[QgsGPSDetector]]::qt_metacall (this=0x202fd20, _c=QMetaObject::InvokeMetaMethod, 
    _id=<value optimized out>, _a=0x7fffffffca40)
    at /usr/src/debug/qgis-1.7.0/src/core/gps/moc_qgsgpsdetector.cxx:83
#3914 0x00000032f377004f in QMetaObject::activate (sender=0x1ff1e70, m=<value optimized out>, 
    local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3272
#3915 0x00000032f3776aef in QSingleShotTimer::timerEvent (this=0x1ff1e70) at kernel/qtimer.cpp:308
#3916 0x00000032f376f879 in QObject::event (this=0x1ff1e70, e=<value optimized out>) at kernel/qobject.cpp:1175
#3917 0x00000032f69b78c4 in QApplicationPrivate::notify_helper (this=0xb3c990, receiver=0x1ff1e70, e=0x7fffffffd200)
    at kernel/qapplication.cpp:4445
#3918 0x00000032f69bc3da in QApplication::notify (this=<value optimized out>, receiver=0x1ff1e70, e=0x7fffffffd200)
    at kernel/qapplication.cpp:4324
#3919 0x00007ffff7bfa3c6 in [[QgsApplication]]::notify (this=<value optimized out>, receiver=<value optimized out>, 
    event=<value optimized out>) at /usr/src/debug/qgis-1.7.0/src/core/qgsapplication.cpp:88
#3920 0x00000032f375b7ac in QCoreApplication::notifyInternal (this=0x7fffffffd6b0, receiver=0x1ff1e70, event=
    0x7fffffffd200) at kernel/qcoreapplication.cpp:732
#3921 0x00000032f37893fe in sendEvent (this=0xb41a90) at kernel/qcoreapplication.h:215
#3922 QTimerInfoList::activateTimers (this=0xb41a90) at kernel/qeventdispatcher_unix.cpp:603
#3923 0x00000032f37861f8 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#3924 idleTimerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:231
#3925 0x00000032e7641e33 in g_main_dispatch (context=0xb40920) at gmain.c:2149
#3926 g_main_context_dispatch (context=0xb40920) at gmain.c:2702
#3927 0x00000032e7642610 in g_main_context_iterate (context=0xb40920, block=1, dispatch=1, self=<value optimized out>)
    at gmain.c:2780
#3928 0x00000032e76428ad in g_main_context_iteration (context=0xb40920, may_block=1) at gmain.c:2843
#3929 0x00000032f37868bf in QEventDispatcherGlib::processEvents (this=0xb3df30, flags=<value optimized out>)
    at kernel/qeventdispatcher_glib.cpp:415
#3930 0x00000032f6a5c59e in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, 
    flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#3931 0x00000032f375ab42 in QEventLoop::processEvents (this=<value optimized out>, flags=...)
    at kernel/qeventloop.cpp:149
#3932 0x00000032f375ad8c in QEventLoop::exec (this=0x7fffffffd490, flags=...) at kernel/qeventloop.cpp:201
#3933 0x00000032f375f24b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#3934 0x00000000004c7320 in main (argc=1, argv=<value optimized out>)
    at /usr/src/debug/qgis-1.7.0/src/app/main.cpp:804
(gdb)

History

Updated by Giovanni Manghi over 1 year ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Giovanni Manghi over 1 year ago

  • Assigned to deleted (nobody -)
  • Patch supplied set to No
  • Affected version set to master
  • Causes crash or corruption set to Yes

Updated by Giovanni Manghi about 1 year ago

  • Priority changed from Low to High

Updated by Giovanni Manghi about 1 year ago

  • Status changed from New to Feedback

Can you confirm with a recent (possibly master) qgis version?

Updated by Volker Fröhlich about 1 year ago

I'll try to do that.

But I think no part of the responsible code was seriously changed.

Updated by Paolo Cavallini about 1 year ago

  • Target version changed from Version 1.7.4 to Version 1.8.0

Updated by Volker Fröhlich about 1 year ago

Honestly, it is a bit difficult to reproduce for me, 1 year later. I tried with QGIS 1.7.4 for now.

I can't manage to connect via gpsd at all. It only works by using the device directly. The gpsd daemon certainly works. I can watch data by connecting to the gpsd port.

What I probably saw, when I first created this ticket:

If I just use "Autodetect" I get a direct connection. Starting gpsd later on, disconnecting and connecting again, crashes QGIS. Although the scenario might be somewhat unconventional, QGIS should not crash.

Concerning gpsd, I'm maybe doing something wrong.

Updated by Paolo Cavallini 9 months ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

Updated by Giovanni Manghi 8 months ago

  • Priority changed from High to Normal
  • Status info deleted (0)
  • Affected version changed from master to 1.7.4

More tests with qgis 1.8 and master are necessary.

Updated by Giovanni Manghi 5 months ago

  • Priority changed from Normal to High

Also available in: Atom PDF