Bug report #15769

Crash at QGIS exit related to OGR provider

Added by Even Rouault over 7 years ago. Updated over 6 years ago.

Assignee:Even Rouault
Category:Data Provider/OGR
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:Yes Copied to github as #:23691


I get random (but rather frequent) crashes at QGIS opening on Linux with master.


[Switching to Thread 0x7fffad763700 (LWP 18872)]
malloc_consolidate (av=av@entry=0x7ffff4286760 <main_arena>) at malloc.c:4157
4157 malloc.c: Aucun fichier ou dossier de ce type.
(gdb) bt
#0 malloc_consolidate (av=av@entry=0x7ffff4286760 <main_arena>) at malloc.c:4157
#1 0x00007ffff3f47ce8 in _int_malloc (av=av@entry=0x7ffff4286760 <main_arena>, bytes=bytes@entry=1009) at malloc.c:3423
#2 0x00007ffff3f496d1 in _int_realloc (av=0x7ffff4286760 <main_arena>, oldp=0x4661470, oldsize=1008, nb=1024) at malloc.c:4286
#3 0x00007ffff3f4aed9 in GI_libc_realloc (oldmem=0x4661480, bytes=1008) at malloc.c:3029
#4 0x00007ffff2ee6158 in VSIReallocVerbose (pOldPtr=<optimized out>, nNewSize=1008, pszFile=0x7ffff3532a25 "gdaldrivermanager.cpp",
nLine=426) at cpl_vsisimple.cpp:1166
#5 0x00007ffff2e27ca8 in GDALDriverManager::RegisterDriver (this=0x1228610, poDriver=0x7fff9c3b61f0) at gdaldrivermanager.cpp:426
#6 0x00007ffff322721f in OGRRegisterAllInternal () at ogrregisterall.cpp:222
#7 0x00007ffff2a00e55 in GDALAllRegister () at gdalallregister.cpp:552
#8 0x00007fffc1e14585 in QgsOgrLayerItem::QgsOgrLayerItem (this=0x7fff9c998360, parent=0x2c67af0, name=..., path=..., uri=...,
layerType=QgsLayerItem::Vector) at /home/even/qgis/qgis-qt5/src/providers/ogr/qgsogrdataitems.cpp:41
#9 0x00007fffc1e1690b in dataItem (thePath=..., parentItem=0x2c67af0)
at /home/even/qgis/qgis-qt5/src/providers/ogr/qgsogrdataitems.cpp:349
#10 0x00007ffff5cb668e in QgsDataItemProviderFromPlugin::createDataItem (this=0x1221440, path=..., parentItem=0x2c67af0)
at /home/even/qgis/qgis-qt5/src/core/qgsdataitemproviderregistry.cpp:50
#11 0x00007ffff5cada36 in QgsDirectoryItem::createChildren (this=0x2c67af0) at /home/even/qgis/qgis-qt5/src/core/qgsdataitem.cpp:851
#12 0x00007ffff5caa3da in QgsDataItem::runCreateChildren (item=0x2c67af0) at /home/even/qgis/qgis-qt5/src/core/qgsdataitem.cpp:353
#13 0x00007ffff5cb5cf8 in QtConcurrent::StoredFunctorCall1<QVector<QgsDataItem*>, QVector<QgsDataItem*> ()(QgsDataItem), QgsDataItem*>::runFunctor (this=0x32987e0) at /home/even/qgis/install-py3-qt5/include/QtConcurrent/qtconcurrentstoredfunctioncall.h:257
#14 0x00007ffff5cb5be8 in QtConcurrent::RunFunctionTask<QVector<QgsDataItem*> >::run (this=0x32987e0)
at /home/even/qgis/install-py3-qt5/include/QtConcurrent/qtconcurrentrunbase.h:102
#15 0x00007ffff484d2ee in ?? () from /home/even/qgis/install-py3-qt5/lib/libQt5Core.so.5
#16 0x00007ffff4850489 in ?? () from /home/even/qgis/install-py3-qt5/lib/libQt5Core.so.5
#17 0x00007ffff0070184 in start_thread (arg=0x7fffad763700) at pthread_create.c:312
#18 0x00007ffff3fc237d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Seems to be related to QgsOgrLayerItem calling OGRRegisterAll. I guess it shouldn't do that and that should rely on global GDAL / OGR init/deinit


#1 Updated by Even Rouault over 7 years ago

Note: happens when opening "qgis my.gpkg"

#2 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#3 Updated by Even Rouault over 6 years ago

  • Resolution set to not reproducable
  • Description updated (diff)

Cannot reproduce anymore

#4 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF