Opened 14 years ago

Closed 13 years ago

#2903 closed bug (fixed)

Segmentation Fault in 1.4, ubuntu karmic binaries

Reported by: alobo Owned by: jef
Priority: critical: causes crash or data corruption Milestone: Version 1.6.0
Component: Vectors Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description (last modified by jef)

QGIS 1.4 (ubuntu Karmic binary) crashed while I was running plugin points2one. The problem is that QGIS crashes now as soon as I open any shape layer, all I get in the terminal is: Segmentation Fault. I have tried uninstalling the plugin, no improvement.

Before opening any vector layer, the last lines in the console are:

Warning: QObject::connect: Incompatible sender/receiver arguments
        QgsProject::writeProject(QDomDocument&) -->
QgisApp::projectChanged(QDomDocument)

I've tried reinstalling qgis (and the rest of related packages) via Synaptic, same problem.

Output with gdb:

alobo@delia:~$ gdb qgis.bin
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/qgis.bin...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/qgis.bin 
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe233a910 (LWP 9132)]
[Thread 0x7fffe233a910 (LWP 9132) exited]
Python support ENABLED :-) 
/home/alobo/.qgis//python/plugins/imgboundary/__init__.py:38: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  sMsg = "Error import Module \'osgeo\' from package \'gdal-Python-1.5.4-4\'\n\nMessage: %s" % e.message
Loaded : Plugin Installer (package: plugin_installer)
Warning: QObject::connect: Incompatible sender/receiver arguments
        QgsProject::writeProject(QDomDocument&) --> QgisApp::projectChanged(QDomDocument)
[New Thread 0x7fffe233a910 (LWP 9138)]
[New Thread 0x7fffc7fff910 (LWP 9139)]
[New Thread 0x7fffc75f9910 (LWP 9140)]
[New Thread 0x7fffc6df8910 (LWP 9141)]
[Thread 0x7fffe233a910 (LWP 9138) exited]
[Thread 0x7fffc7fff910 (LWP 9139) exited]
[Thread 0x7fffc6df8910 (LWP 9141) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6c178ed in QTextCodec::toUnicode(char const*) const () from /usr/lib/libQtCore.so.4

Change History (13)

comment:1 by jef, 14 years ago

Description: modified (diff)

comment:2 by jef, 14 years ago

please run bt in gdb.

in reply to:  2 ; comment:3 by alobo, 14 years ago

Replying to jef:

please run bt in gdb.

Here:

GNU gdb (GDB) 7.0-ubuntu Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/qgis.bin...(no debugging symbols found)...done. (gdb) run Starting program: /usr/bin/qgis.bin [Thread debugging using libthread_db enabled] [New Thread 0x7fffe233a910 (LWP 9237)] [Thread 0x7fffe233a910 (LWP 9237) exited] Python support ENABLED :-) /home/alobo/.qgispython/plugins/imgboundary/init__.py:38: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

sMsg = "Error import Module \'osgeo\' from package \'gdal-Python-1.5.4-4\'\n\nMessage: %s" % e.message

Loaded : Plugin Installer (package: plugin_installer) Warning: QObject::connect: Incompatible sender/receiver arguments

QgsProject::writeProject(QDomDocument&) --> QgisApp::projectChanged(QDomDocument)

[New Thread 0x7fffe233a910 (LWP 9243)] [New Thread 0x7fffc7fff910 (LWP 9244)] [Thread 0x7fffe233a910 (LWP 9243) exited]

Program received signal SIGBUS, Bus error. 0x00007ffff6c178ed in QTextCodec::toUnicode(char const*) const () from /usr/lib/libQtCore.so.4 (gdb) bt #0 0x00007ffff6c178ed in QTextCodec::toUnicode(char const*) const () from /usr/lib/libQtCore.so.4 #1 0x00007fffdf2e7871 in QgsOgrProvider::loadFields() () from /usr/lib/qgis/libogrprovider.so #2 0x00007fffdf2ed362 in QgsOgrProvider::setSubsetString(QString) () from /usr/lib/qgis/libogrprovider.so #3 0x00007fffdf2f2eeb in QgsOgrProvider::QgsOgrProvider(QString const&) () from /usr/lib/qgis/libogrprovider.so #4 0x00007fffdf2f42f9 in classFactory () from /usr/lib/qgis/libogrprovider.so #5 0x00007ffff7742d26 in QgsProviderRegistry::getProvider(QString const&, QString const&) () from /usr/lib/libqgis_core.so.1.4.0 #6 0x00007ffff776d9fd in QgsVectorLayer::setDataProvider(QString const&) () from /usr/lib/libqgis_core.so.1.4.0 #7 0x00007ffff776e195 in QgsVectorLayer::readXml(QDomNode&) () from /usr/lib/libqgis_core.so.1.4.0 #8 0x00007ffff7725f85 in QgsMapLayer::readXML(QDomNode&) () from /usr/lib/libqgis_core.so.1.4.0 #9 0x00007ffff773243b in QgsProject::_getMapLayers(QDomDocument const&) () from /usr/lib/libqgis_core.so.1.4.0 #10 0x00007ffff7738e29 in QgsProject::read() () from /usr/lib/libqgis_core.so.1.4.0 #11 0x00000000004c996d in QgisApp::fileOpen() () #12 0x000000000069ae0d in QgisApp::qt_metacall(QMetaObject::Call, int, void) () #13 0x00007ffff6bfeddc in QMetaObject::activate(QObject*, int, int, void) () from /usr/lib/libQtCore.so.4 #14 0x00007ffff608c0a7 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4 #15 0x00007ffff608d4ef in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4 #16 0x00007ffff6479ecd in ?? () from /usr/lib/libQtGui.so.4 #17 0x00007ffff647fdea in ?? () from /usr/lib/libQtGui.so.4 #18 0x00007ffff60e09c0 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4 #19 0x00007ffff64825ab in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4 #20 0x00007ffff6091efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #21 0x00007ffff6099011 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #22 0x00007ffff76ef0db in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.1.4.0 #23 0x00007ffff6be9c2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #24 0x00007ffff60988e0 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget, QPointer<QWidget>&) () from /usr/lib/libQtGui.so.4 #25 0x00007ffff60fee2e in ?? () from /usr/lib/libQtGui.so.4 #26 0x00007ffff60fdaa9 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4 #27 0x00007ffff6126d0c in ?? () from /usr/lib/libQtGui.so.4 #28 0x00007ffff21c7bce in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #29 0x00007ffff21cb598 in ?? () from /lib/libglib-2.0.so.0 #30 0x00007ffff21cb6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0 #31 0x00007ffff6c121a6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #32 0x00007ffff61264be in ?? () from /usr/lib/libQtGui.so.4 #33 0x00007ffff6be8532 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #34 0x00007ffff6be8904 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #35 0x00007ffff6beaab9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4 #36 0x00000000004adc28 in main () (gdb)

in reply to:  3 comment:4 by jef, 14 years ago

Replying to alobo:

Here:

Please enclose the output in {{{ and }}} next time - like below. Thanks.

GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/qgis.bin...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/qgis.bin 
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe233a910 (LWP 9237)]
[Thread 0x7fffe233a910 (LWP 9237) exited]
Python support ENABLED :-) 
/home/alobo/.qgis//python/plugins/imgboundary/__init__.py:38: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  sMsg = "Error import Module \'osgeo\' from package \'gdal-Python-1.5.4-4\'\n\nMessage: %s" % e.message
Loaded : Plugin Installer (package: plugin_installer)
Warning: QObject::connect: Incompatible sender/receiver arguments
        QgsProject::writeProject(QDomDocument&) --> QgisApp::projectChanged(QDomDocument)
[New Thread 0x7fffe233a910 (LWP 9243)]
[New Thread 0x7fffc7fff910 (LWP 9244)]
[Thread 0x7fffe233a910 (LWP 9243) exited]

Program received signal SIGBUS, Bus error.
0x00007ffff6c178ed in QTextCodec::toUnicode(char const*) const () from /usr/lib/libQtCore.so.4
(gdb) bt
#0  0x00007ffff6c178ed in QTextCodec::toUnicode(char const*) const () from /usr/lib/libQtCore.so.4
#1  0x00007fffdf2e7871 in QgsOgrProvider::loadFields() () from /usr/lib/qgis/libogrprovider.so
#2  0x00007fffdf2ed362 in QgsOgrProvider::setSubsetString(QString) () from /usr/lib/qgis/libogrprovider.so
#3  0x00007fffdf2f2eeb in QgsOgrProvider::QgsOgrProvider(QString const&) () from /usr/lib/qgis/libogrprovider.so
#4  0x00007fffdf2f42f9 in classFactory () from /usr/lib/qgis/libogrprovider.so
#5  0x00007ffff7742d26 in QgsProviderRegistry::getProvider(QString const&, QString const&) () from /usr/lib/libqgis_core.so.1.4.0
#6  0x00007ffff776d9fd in QgsVectorLayer::setDataProvider(QString const&) () from /usr/lib/libqgis_core.so.1.4.0
#7  0x00007ffff776e195 in QgsVectorLayer::readXml(QDomNode&) () from /usr/lib/libqgis_core.so.1.4.0
#8  0x00007ffff7725f85 in QgsMapLayer::readXML(QDomNode&) () from /usr/lib/libqgis_core.so.1.4.0
#9  0x00007ffff773243b in QgsProject::_getMapLayers(QDomDocument const&) () from /usr/lib/libqgis_core.so.1.4.0
#10 0x00007ffff7738e29 in QgsProject::read() () from /usr/lib/libqgis_core.so.1.4.0
#11 0x00000000004c996d in QgisApp::fileOpen() ()
#12 0x000000000069ae0d in QgisApp::qt_metacall(QMetaObject::Call, int, void**) ()
#13 0x00007ffff6bfeddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#14 0x00007ffff608c0a7 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#15 0x00007ffff608d4ef in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#16 0x00007ffff6479ecd in ?? () from /usr/lib/libQtGui.so.4
#17 0x00007ffff647fdea in ?? () from /usr/lib/libQtGui.so.4
#18 0x00007ffff60e09c0 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#19 0x00007ffff64825ab in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007ffff6091efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007ffff6099011 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007ffff76ef0db in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.1.4.0
#23 0x00007ffff6be9c2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#24 0x00007ffff60988e0 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&) () from /usr/lib/libQtGui.so.4
#25 0x00007ffff60fee2e in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007ffff60fdaa9 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#27 0x00007ffff6126d0c in ?? () from /usr/lib/libQtGui.so.4
#28 0x00007ffff21c7bce in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#29 0x00007ffff21cb598 in ?? () from /lib/libglib-2.0.so.0
#30 0x00007ffff21cb6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#31 0x00007ffff6c121a6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0x00007ffff61264be in ?? () from /usr/lib/libQtGui.so.4
#33 0x00007ffff6be8532 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0x00007ffff6be8904 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0x00007ffff6beaab9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#36 0x00000000004adc28 in main ()
(gdb) 

in reply to:  3 comment:5 by jef, 14 years ago

Replying to alobo:

> #0  0x00007ffff6c178ed in QTextCodec::toUnicode(char const*) const () from /usr/lib/libQtCore.so.4
> #1  0x00007fffdf2e7871 in QgsOgrProvider::loadFields() () from /usr/lib/qgis/libogrprovider.so
> #2  0x00007fffdf2ed362 in QgsOgrProvider::setSubsetString(QString) () from /usr/lib/qgis/libogrprovider.so
> #3  0x00007fffdf2f2eeb in QgsOgrProvider::QgsOgrProvider(QString const&) () from /usr/lib/qgis/libogrprovider.so

Which encoding is selected in the 'add vector layer' dialog? And does that also happen, when you disable third party plugins? Anything special (eg. non-ascii characters in column names) in your shapefiles?

comment:6 by alobo, 14 years ago

Seems to be solved: The problem occurred with any vector layer and the reason was that actually no encoding was selected by default, the box was empty. Once UTF8 is selected, vector layers and projects open normally (UTF8 keeps selected as default). Actually, I do not know how to make that box empty again todouble check. I think that plugin points2one made that happen at crashing and from then on I could not open any vector layer again.

Do you want me to do any further test using gdb to fully clarify the issue?

Thanks! Agus

comment:7 by lutra, 14 years ago

this ticket can be closed?

comment:8 by alobo, 14 years ago

Yes, I think so. The problem is caused by plugin points2one leaving the encoding box empty by default.

Agus

comment:9 by alobo, 14 years ago

Resolution: invalid
Status: newclosed

comment:10 by marisn, 14 years ago

Platform: DebianAll
Resolution: invalid
Status: closedreopened
Version: 1.4.0Trunk

Remind me - how it's NOT a bug?!? How "Add vector" dialog can turn itnto state where it offers no encoding that leads to crash at first place?!?

Work flow: Create a new Shapefile with "Points2One" without specifying encoding (I had no attribute data and thus left it blank); After crash, QGIS still has this empy encoding option active by default and it causes crash on any shapefile.

comment:11 by alobo, 14 years ago

I'm away of the machine where I had the problem and cannot verify until Wedn.5/11/2010, but I bet this was again the problem, as I was actually running points2one just before the crash.

I understand I could have been wrong when I said that the ticket could be closed, but the fact is that this is an error in a plugin and this track does not follow errors on python plugins.

Nevertheless, as the consequence is very serious for the user and very hard for him/her to make the actual link to the plugin:

  1. Could the author of points2one be asked to check the plugin and eventually do not keep it

in the official repository until is fixed? Or at least, could a warning message be added to the plugin?

  1. Could QGIS be made more robust to the fact that there is an empty space in the encoding field?

Agus

in reply to:  10 comment:12 by jef, 14 years ago

crash fixed in r14490.

comment:13 by pcav, 13 years ago

Resolution: fixed
Status: reopenedclosed

It should be fixed. Please check against 1.6 or trunk, and reopen if still valid.

Note: See TracTickets for help on using tickets.