Bug report #3505

Crash when GPSD goes away and trying to connect again

Added by Volker Fröhlich about 13 years ago. Updated over 10 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Digitising
Affected QGIS version:1.7.4 Regression?:No
Operating System:Fedora Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:Yes Copied to github as #:13565

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

#1 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#2 Updated by Giovanni Manghi about 12 years ago

  • Assignee deleted (nobody -)
  • Pull Request or Patch supplied set to No
  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to Yes

#3 Updated by Giovanni Manghi almost 12 years ago

  • Priority changed from Low to High

#4 Updated by Giovanni Manghi almost 12 years ago

  • Status changed from Open to Feedback

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

#5 Updated by Volker Fröhlich almost 12 years ago

I'll try to do that.

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

#6 Updated by Paolo Cavallini almost 12 years ago

  • Target version changed from Version 1.7.4 to Version 1.8.0

#7 Updated by Volker Fröhlich almost 12 years 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.

#8 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#9 Updated by Giovanni Manghi over 11 years ago

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

More tests with qgis 1.8 and master are necessary.

#10 Updated by Giovanni Manghi about 11 years ago

  • Priority changed from Normal to High

#11 Updated by Sandro Santilli almost 11 years ago

I suggest to close this if nobody can reproduce it. Someone will file it again when first seen...
Volker, what do you think ?

#12 Updated by Volker Fröhlich almost 11 years ago

I think actually nobody ever tried to reproduce it. I also doubt that re-checking at random will bring up a different result, as most of the code in this area remained unchanged -- at least when I last had a look. I'm somewhat disappointed of having this issue hanging around for 27 months without being seriously considered. Feel free to close it!

#13 Updated by Giovanni Manghi over 10 years ago

  • Status changed from Feedback to Closed
  • Resolution set to worksforme

not long ago I made a bunch of tests and resumed here

https://issues.qgis.org/wiki/quantum-gis/Gps_units_download_data_and_live_tracking

I don't recall any crash when using gpsd.

Please reopen if necessary.

Also available in: Atom PDF