Bug report #13439

QGIS crashes when expanding the home node (gdb debug details provided)

Added by Mathieu Pellerin - nIRV about 5 years ago. Updated over 4 years ago.

Assignee:Radim Blazek
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21486


Under QGIS master build, the application crashes when trying to expand the home node in the browser panel.

Steps to reproduce:
  1. Launch QGIS
  2. Open the Browser panel
  3. Click on the arrow to expand the home node
  4. boom QGIS dies

GDB debug details:

#0  0x00007fffe98eb03d in PDFDoc::isLinearized(bool) () from /usr/lib/x86_64-linux-gnu/libpoppler.so.52
#1  0x00007fffe98ef58b in PDFDoc::getNumPages() () from /usr/lib/x86_64-linux-gnu/libpoppler.so.52
#2  0x00007fffe98ef601 in PDFDoc::~PDFDoc() () from /usr/lib/x86_64-linux-gnu/libpoppler.so.52
#3  0x00007ffff1117c38 in ?? () from /usr/lib/libgdal.so.1
#4  0x00007ffff111b1d6 in ?? () from /usr/lib/libgdal.so.1
#5  0x00007ffff111b5a9 in ?? () from /usr/lib/libgdal.so.1
#6  0x00007ffff120bd0c in GDALClose () from /usr/lib/libgdal.so.1
#7  0x00007fff70fb4ec6 in QgsGdalLayerItem::QgsGdalLayerItem (this=0x7fff4005ed50, parent=0x4893510, name=..., path=..., uri=..., 
    theSublayers=0x7fff453c3080) at /home/webmaster/dev/cpp/QGIS/src/providers/gdal/qgsgdaldataitems.cpp:48
#8  0x00007fff70fb6843 in dataItem (thePath=..., parentItem=0x4893510)
    at /home/webmaster/dev/cpp/QGIS/src/providers/gdal/qgsgdaldataitems.cpp:271
#9  0x00007ffff6385c51 in QgsDataItemProviderFromPlugin::createDataItem (this=0x4952ff0, path=..., parentItem=0x4893510)
    at /home/webmaster/dev/cpp/QGIS/src/core/qgsdataitemproviderregistry.cpp:45
#10 0x00007ffff637deb4 in QgsDirectoryItem::createChildren (this=0x4893510) at /home/webmaster/dev/cpp/QGIS/src/core/qgsdataitem.cpp:833
#11 0x00007ffff637baac in QgsDataItem::runCreateChildren (item=0x4893510) at /home/webmaster/dev/cpp/QGIS/src/core/qgsdataitem.cpp:385
#12 0x00007ffff6385368 in QtConcurrent::StoredFunctorCall1<QVector<QgsDataItem*>, QVector<QgsDataItem*> (*)(QgsDataItem*), QgsDataItem*>::runFunctor (this=0x48da9c0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267
#13 0x00007ffff6385237 in QtConcurrent::RunFunctionTask<QVector<QgsDataItem*> >::run (this=0x48da9c0)
    at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:106
#14 0x00007ffff5be1dba in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#15 0x00007ffff5beed1c in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007fffedd676aa in start_thread (arg=0x7fff453c4700) at pthread_create.c:333
#17 0x00007ffff4627eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109


#1 Updated by Mathieu Pellerin - nIRV about 5 years ago

Note: as the debug details indicate, the crash has to do with gdal trying to open PDFs. None of the PDFs I have in my home folder are georeferenced. If I remove all PDFs from my home folder, the crasher is gone.

#2 Updated by Radim Blazek about 5 years ago

Poppler library was not thread safe, it should be fixed, see https://bugs.freedesktop.org/show_bug.cgi?id=50992.

Can you verify if your version of poppler lib is a fixed and thread safe?

#3 Updated by Mathieu Pellerin - nIRV about 5 years ago

I'm running on Ubuntu Wily, and the libpoppler52 version is 0.33.0-0ubuntu3. Looking at the bug, the fix was merged back in 2013, I'd expect the package in ubuntu circa 2015 to include that fix.


#4 Updated by Radim Blazek about 5 years ago

The problems with GDAL/OGR thread safety may appear with various drivers. We should probably add mutex lock to QgsGdalLayerItem and QgsOgrLayerItem.

#5 Updated by Jürgen Fischer almost 5 years ago

  • Subject changed from browser: QGIS crashes when expanding the home node (gdb debug details provided) to QGIS crashes when expanding the home node (gdb debug details provided)

#6 Updated by Giovanni Manghi almost 5 years ago

  • Target version deleted (Version 2.12)

#7 Updated by Even Rouault over 4 years ago

  • Status changed from Open to Closed

This is not a problem of thread-safety, but Ubuntu having picked up only one of 2 patches to have support for Poppler >= 0.31.0 in the GDAL 1.11.X series. See https://trac.osgeo.org/gdal/ticket/6118 and today https://trac.osgeo.org/gdal/ticket/6446

Closing as not a QGIS bug.

#8 Updated by Piers van der Torren over 4 years ago

I experience the same problem, it seems really gdal/libpoppler related, as the gdalinfo also crashes on the same pdf files.

Reported to gdal (with example file): https://trac.osgeo.org/gdal/ticket/6446

This bug is solved in GDAL 1.11.3, but not yet in Ubuntu 15.10 packaging. It should be fixed in Ubuntu 16.04.

Ubuntu 15.10, GDAL 1.11.2+dfsg-3ubuntu3, libpoppler52 0.33.0-0ubuntu3

Also available in: Atom PDF