Bug report #16402

regression: opening attribute table of a 4mb .OSM vector dataset freezes QGIS

Added by Mathieu Pellerin - nIRV over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Attribute table
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 #:24311

Description

Under QGIS master, opening a (panel-mode) attribute table for a 4mb .OSM vector dataset freezes QGIS while eating CPU.

Steps to reproduce
  1. Launch QGIS, and make sure the attribute table is set to open as a dockable panel (if not, switch that option on and restart)
  2. Create a new project, and add the attached test.osm dataset (choose the line geometry)
  3. Right-click on the layer and select "attribute table"
  4. Notice how QGIS freezes to death :)

For some reason, problem doesn't occur when attribute table opens as a window.

test.osm (3.91 MB) Mathieu Pellerin - nIRV, 2017-03-31 09:57 PM

Associated revisions

Revision 25d9936d
Added by Mathieu Pellerin - nIRV over 2 years ago

[OGR] fix feature count issue for OSM datasets (fixes #16402) (#4322)

History

#1 Updated by Mathieu Pellerin - nIRV over 2 years ago

More details coming in.

When QGIS goes into freeze mode, the console is flooded with the following messages (that repeats indefinitely):

src/gui/qgsmapcanvas.cpp: 476: (refresh) [110ms] CANVAS refresh already scheduled
src/providers/ogr/qgsogrprovider.cpp: 3432: (open) [4ms] mFilePath: /home/webmaster/Desktop/test.osm
src/providers/ogr/qgsogrprovider.cpp: 3433: (open) [0ms] mLayerIndex: 1
src/providers/ogr/qgsogrprovider.cpp: 3434: (open) [0ms] mLayerName: 
src/providers/ogr/qgsogrprovider.cpp: 3435: (open) [0ms] mSubsetString: 
src/providers/ogr/qgsogrprovider.cpp: 3488: (open) [12ms] OGR opened using Driver OSM
src/providers/ogr/qgsogrprovider.cpp: 514: (setSubsetString) [0ms] checking validity
src/providers/ogr/qgsogrprovider.cpp: 516: (setSubsetString) [0ms] Done checking validity
src/gui/qgsmapcanvas.cpp: 476: (refresh) [115ms] CANVAS refresh already scheduled
src/providers/ogr/qgsogrprovider.cpp: 3432: (open) [3ms] mFilePath: /home/webmaster/Desktop/test.osm
src/providers/ogr/qgsogrprovider.cpp: 3433: (open) [0ms] mLayerIndex: 1
src/providers/ogr/qgsogrprovider.cpp: 3434: (open) [0ms] mLayerName: 
src/providers/ogr/qgsogrprovider.cpp: 3435: (open) [0ms] mSubsetString: 
src/providers/ogr/qgsogrprovider.cpp: 3488: (open) [13ms] OGR opened using Driver OSM
src/providers/ogr/qgsogrprovider.cpp: 514: (setSubsetString) [0ms] checking validity
src/providers/ogr/qgsogrprovider.cpp: 516: (setSubsetString) [0ms] Done checking validity
src/gui/qgsmapcanvas.cpp: 476: (refresh) [115ms] CANVAS refresh already scheduled
src/providers/ogr/qgsogrprovider.cpp: 3432: (open) [4ms] mFilePath: /home/webmaster/Desktop/test.osm
src/providers/ogr/qgsogrprovider.cpp: 3433: (open) [0ms] mLayerIndex: 1
src/providers/ogr/qgsogrprovider.cpp: 3434: (open) [0ms] mLayerName: 
src/providers/ogr/qgsogrprovider.cpp: 3435: (open) [0ms] mSubsetString: 
src/providers/ogr/qgsogrprovider.cpp: 3488: (open) [13ms] OGR opened using Driver OSM
src/providers/ogr/qgsogrprovider.cpp: 514: (setSubsetString) [0ms] checking validity
src/providers/ogr/qgsogrprovider.cpp: 516: (setSubsetString) [0ms] Done checking validity
src/gui/qgsmapcanvas.cpp: 476: (refresh) [114ms] CANVAS refresh already scheduled
src/providers/ogr/qgsogrprovider.cpp: 3432: (open) [4ms] mFilePath: /home/webmaster/Desktop/test.osm
src/providers/ogr/qgsogrprovider.cpp: 3433: (open) [0ms] mLayerIndex: 1
src/providers/ogr/qgsogrprovider.cpp: 3434: (open) [0ms] mLayerName: 
src/providers/ogr/qgsogrprovider.cpp: 3435: (open) [0ms] mSubsetString: 
src/providers/ogr/qgsogrprovider.cpp: 3488: (open) [12ms] OGR opened using Driver OSM
src/providers/ogr/qgsogrprovider.cpp: 514: (setSubsetString) [0ms] checking validity
src/providers/ogr/qgsogrprovider.cpp: 516: (setSubsetString) [0ms] Done checking validity

Here's the gdb where output, when QGIS is forzen:

#0  0x00007ffff33059a7 in __tzfile_read ([email protected]=0x7ffff33d341b "/etc/localtime", [email protected]=0, [email protected]=0x0) at tzfile.c:124
#1  0x00007ffff3305481 in tzset_internal (explicit=1, always=1) at tzset.c:441
#2  0x00007ffff3305481 in __tzset () at tzset.c:589
#3  0x00007ffff3303b49 in __GI_mktime (tp=0x7fffffff3400) at mktime.c:588
#4  0x00007ffff3c9d899 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff3c9f0f1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff3ca1a02 in QDateTime::setMSecsSinceEpoch(long long) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff3ca4881 in QDateTime::fromMSecsSinceEpoch(long long, Qt::TimeSpec, int) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff3ca4bec in QDateTime::currentDateTime() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff3ca4ca1 in QTime::currentTime() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff3ca4d7d in QTime::elapsed() const () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff59d0bb4 in QgsVectorLayerCache::setFullCache(bool) (this=0x55556242ff10, fullCache=true)
    at /home/webmaster/dev/cpp/QGIS/src/core/qgsvectorlayercache.cpp:107
#12 0x00007ffff66875d7 in QgsDualView::rebuildFullLayerCache() (this=0x555562451270) at /home/webmaster/dev/cpp/QGIS/src/gui/attributetable/qgsdualview.cpp:689
#13 0x00007ffff668d881 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (QgsDualView::*)()>::call(void (QgsDualView::*)(), QgsDualView*, void**) (f=(void (QgsDualView::*)(QgsDualView * const)) 0x7ffff66874f2 <QgsDualView::rebuildFullLayerCache()>, o=0x555562451270, arg=0x7fffffff3990)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:141
#14 0x00007ffff668d2a3 in QtPrivate::FunctionPointer<void (QgsDualView::*)()>::call<QtPrivate::List<>, void>(void (QgsDualView::*)(), QgsDualView*, void**) (f=(void (QgsDualView::*)(QgsDualView * const)) 0x7ffff66874f2 <QgsDualView::rebuildFullLayerCache()>, o=0x555562451270, arg=0x7fffffff3990)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:160
#15 0x00007ffff668c545 in QtPrivate::QSlotObject<void (QgsDualView::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x5555624aa3e0, r=0x555562451270, a=0x7fffffff3990, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120
#16 0x00007ffff3e5781e in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff5cbc6d7 in QgsVectorLayerCache::invalidated() (this=0x55556242ff10) at /home/webmaster/dev/cpp/QGIS/bm-qt5/src/core/moc_qgsvectorlayercache.cpp:264
#18 0x00007ffff59d1702 in QgsVectorLayerCache::invalidate() (this=0x55556242ff10) at /home/webmaster/dev/cpp/QGIS/src/core/qgsvectorlayercache.cpp:277
#19 0x00007ffff59d3e64 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (QgsVectorLayerCache::*)()>::call(void (QgsVectorLayerCache::*)(), QgsVectorLayerCache*, void**) (f=(void (QgsVectorLayerCache::*)(QgsVectorLayerCache * const)) 0x7ffff59d16d2 <QgsVectorLayerCache::invalidate()>, o=0x55556242ff10, arg=0x7fffffff3b90) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:141
#20 0x00007ffff59d3c0e in QtPrivate::FunctionPointer<void (QgsVectorLayerCache::*)()>::call<QtPrivate::List<>, void>(void (QgsVectorLayerCache::*)(), QgsVectorLayerCache*, void**) (f=(void (QgsVectorLayerCache::*)(QgsVectorLayerCache * const)) 0x7ffff59d16d2 <QgsVectorLayerCache::invalidate()>, o=0x55556242ff10, arg=0x7fffffff3b90) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:160
#21 0x00007ffff59d372f in QtPrivate::QSlotObject<void (QgsVectorLayerCache::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x5555624aa4d0, r=0x55556242ff10, a=0x7fffffff3b90, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120
#22 0x00007ffff3e5781e in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff5cb14e5 in QgsMapLayer::dataChanged() (this=0x55555f6fbff0) at /home/webmaster/dev/cpp/QGIS/bm-qt5/src/core/moc_qgsmaplayer.cpp:426
#24 0x00007ffff57eb63a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (QgsMapLayer::*)()>::call(void (QgsMapLayer::*)(), QgsMapLayer*, void**) (f=(void (QgsMapLayer::*)(QgsMapLayer * const)) 0x7ffff5cb14bc <QgsMapLayer::dataChanged()>, o=0x55555f6fbff0, arg=0x7fffffff3d70)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:141
#25 0x00007ffff57eb336 in QtPrivate::FunctionPointer<void (QgsMapLayer::*)()>::call<QtPrivate::List<>, void>(void (QgsMapLayer::*)(), QgsMapLayer*, void**) (f=(void (QgsMapLayer::*)(QgsMapLayer * const)) 0x7ffff5cb14bc <QgsMapLayer::dataChanged()>, o=0x55555f6fbff0, arg=0x7fffffff3d70)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:160
#26 0x00007ffff57eab5f in QtPrivate::QSlotObject<void (QgsMapLayer::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x5555620e7120, r=0x55555f6fbff0, a=0x7fffffff3d70, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120
#27 0x00007ffff3e5781e in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff5caea7b in QgsDataProvider::dataChanged() (this=0x55555f700de0) at /home/webmaster/dev/cpp/QGIS/bm-qt5/src/core/moc_qgsdataprovider.cpp:161
#29 0x00007fff3b24e0f5 in QgsOgrProvider::setSubsetString(QString const&, bool) (this=0x55555f700de0, theSQL=..., updateFeatureCount=true)
    at /home/webmaster/dev/cpp/QGIS/src/providers/ogr/qgsogrprovider.cpp:520
#30 0x00007fff3b268149 in QgsOgrProvider::open(QgsOgrProvider::OpenMode) (this=0x55555f700de0, mode=QgsOgrProvider::OpenModeSameAsCurrent)
    at /home/webmaster/dev/cpp/QGIS/src/providers/ogr/qgsogrprovider.cpp:3509
#31 0x00007fff3b268f76 in QgsOgrProvider::reloadData() (this=0x55555f700de0) at /home/webmaster/dev/cpp/QGIS/src/providers/ogr/qgsogrprovider.cpp:3623
#32 0x00007ffff59a342d in QgsVectorLayer::reload() (this=0x55555f6fbff0) at /home/webmaster/dev/cpp/QGIS/src/core/qgsvectorlayer.cpp:240
#33 0x00007ffff68b5982 in QgsMapCanvas::refreshAllLayers() (this=0x55555645a0a0) at /home/webmaster/dev/cpp/QGIS/src/gui/qgsmapcanvas.cpp:2076
#34 0x00007ffff71b4658 in QgisApp::refreshMapCanvas() (this=0x555555c9c800) at /home/webmaster/dev/cpp/QGIS/src/app/qgisapp.cpp:8145
#35 0x00007ffff7234cc5 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (QgisApp::*)()>::call(void (QgisApp::*)(), QgisApp*, void**) (f=(void (QgisApp::*)(QgisApp * const)) 0x7ffff71b459e <QgisApp::refreshMapCanvas()>, o=0x555555c9c800, arg=0x7fffffff43b0)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:141
#36 0x00007ffff722ff15 in QtPrivate::FunctionPointer<void (QgisApp::*)()>::call<QtPrivate::List<>, void>(void (QgisApp::*)(), QgisApp*, void**) (f=(void (QgisApp::*)(QgisApp * const)) 0x7ffff71b459e <QgisApp::refreshMapCanvas()>, o=0x555555c9c800, arg=0x7fffffff43b0)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:160
#37 0x00007ffff7226a99 in QtPrivate::QSlotObject<void (QgisApp::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x55556261da50, r=0x555555c9c800, a=0x7fffffff43b0, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:120
#38 0x00007ffff3e5781e in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00007ffff5caea7b in QgsDataProvider::dataChanged() (this=0x55555f700de0) at /home/webmaster/dev/cpp/QGIS/bm-qt5/src/core/moc_qgsdataprovider.cpp:161
#40 0x00007fff3b24e0f5 in QgsOgrProvider::setSubsetString(QString const&, bool) (this=0x55555f700de0, theSQL=..., updateFeatureCount=true)
    at /home/webmaster/dev/cpp/QGIS/src/providers/ogr/qgsogrprovider.cpp:520
#41 0x00007fff3b268149 in QgsOgrProvider::open(QgsOgrProvider::OpenMode) (this=0x55555f700de0, mode=QgsOgrProvider::OpenModeSameAsCurrent)
    at /home/webmaster/dev/cpp/QGIS/src/providers/ogr/qgsogrprovider.cpp:3509
#42 0x00007fff3b268f76 in QgsOgrProvider::reloadData() (this=0x55555f700de0) at /home/webmaster/dev/cpp/QGIS/src/providers/ogr/qgsogrprovider.cpp:3623
#43 0x00007ffff59a342d in QgsVectorLayer::reload() (this=0x55555f6fbff0) at /home/webmaster/dev/cpp/QGIS/src/core/qgsvectorlayer.cpp:240
#44 0x00007ffff68b5982 in QgsMapCanvas::refreshAllLayers() (this=0x55555645a0a0) at /home/webmaster/dev/cpp/QGIS/src/gui/qgsmapcanvas.cpp:2076

#2 Updated by Mathieu Pellerin - nIRV over 2 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF