Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS master crash with MySQL layer. While QGIS 2.2 on same machine seems ok #19025

Closed
qgib opened this issue Jun 18, 2014 · 5 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Jun 18, 2014

Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 10622
Affected QGIS version: master
Redmine category:vectors
Assignee: Martin Dobias


After a msg to the list about not showing mysql layer ok on ubuntu:
http://lists.osgeo.org/pipermail/qgis-user/2014-June/028006.html

I downloaded given file

http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip

created a test db and loaded the shapefile with

ogr2ogr -f MySQL MySQL:test,host=localhost,user=test,password=test ne_10m_admin_0_countries.shp -update -overwrite -lco ENGINE=MyISAM

Creating a MySQL connection to this db via (add Vector/Database), and tried to load. QGIS crashes, apparently on a mapcanvas.paint part.

Then I tried QGIS 2.2 (same machine Debian Testing, both build by myself), and that was loading fine.

Part of the crash dump here:

src/providers/ogr/qgsogrprovider.cpp: 2227: (crs) Entering.
src/core/qgscoordinatereferencesystem.cpp: 201: (setupESRIWktFix) set GDAL_FIX_ESRI_WKT : GEOGCS
src/providers/ogr/qgsogrprovider.cpp: 2260: (crs) +proj=longlat +datum=WGS84 +no_defs 
src/core/qgscoordinatereferencesystem.cpp: 441: (createFromWkt) wkt: GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_84",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
src/core/qgscoordinatereferencesystem.cpp: 462: (createFromWkt) authid recognized as EPSG:4326
src/core/qgsdatasourceuri.cpp: 243: (QgsDataSourceURI) invalid connection option "MySQL:test,host" ignored
src/core/qgsmaplayer.cpp: 911: (loadNamedStyle) uri = MySQL:test,host=localhost,user=test,password=test myURI = MySQL:test,host=localhost,user=test,password=test
src/core/qgsmaplayer.cpp: 933: (loadNamedStyle) project fileName: /home/richard/dev/qgis/git/qgis/build
src/core/qgsmaplayer.cpp: 867: (loadNamedStyleFromDb) db = /home/richard/.qgis2//qgis.qmldb uri = MySQL:test,host=localhost,user=test,password=test
src/core/qgsmaplayer.cpp: 877: (loadNamedStyleFromDb) Trying to load style for "MySQL:test,host=localhost,user=test,password=test" from "/home/richard/.qgis2//qgis.qmldb"
src/core/qgsmaplayer.cpp: 867: (loadNamedStyleFromDb) db = /home/richard/apps/qgis/master/debug/share/qgis/resources/qgis.qmldb uri = MySQL:test,host=localhost,user=test,password=test
src/core/qgsmaplayer.cpp: 877: (loadNamedStyleFromDb) Trying to load style for "MySQL:test,host=localhost,user=test,password=test" from "/home/richard/apps/qgis/master/debug/share/qgis/resources/qgis.qmldb"
src/providers/ogr/qgsogrprovider.cpp: 595: (subLayers) Entered.
src/providers/ogr/qgsogrprovider.cpp: 620: (subLayers) id = 0 name = ne_10m_admin_0_countries layerGeomType = 3
src/app/qgisapp.cpp: 2708: (addVectorLayers) got valid layer with 1 sublayers
src/providers/ogr/qgsogrprovider.cpp: 595: (subLayers) Entered.
src/core/qgsmaplayer.cpp: 100: (setLayerName) new original name: 'ne_10m_admin_0_countries'
src/core/qgsmaplayer.cpp: 102: (setLayerName) new display name: 'ne_10m_admin_0_countries'
src/gui/qgsmapcanvas.cpp: 612: (refresh) CANVAS refresh scheduling
src/gui/qgsmapcanvas.cpp: 393: (setLayerSet) Layers changed to: MySQL_test_host_localhost_user_test_password_test20140618141735721
src/gui/qgsmapcanvas.cpp: 427: (setLayerSet) Layers have changed, refreshing
src/core/qgsmaprenderer.cpp: 984: (setLayerSet) Entering: MySQL_test_host_localhost_user_test_password_test20140618141735721
src/core/qgsmaprenderer.cpp: 909: (updateFullExtent) called.
src/core/qgsmaprenderer.cpp: 919: (updateFullExtent) Layer count: 1
src/core/qgsmaprenderer.cpp: 929: (updateFullExtent) Updating extent using ne_10m_admin_0_countries
src/providers/ogr/qgsogrprovider.cpp: 862: (extent) Starting get extent
src/providers/ogr/qgsogrprovider.cpp: 900: (extent) Finished get extent
src/core/qgsvectorlayer.cpp: 829: (extent) Extent of layer: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmaprenderer.cpp: 930: (updateFullExtent) Input extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmaprenderer.cpp: 784: (layerExtentToOutputExtent) proj extent = -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmaprenderer.cpp: 942: (updateFullExtent) Output extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmaprenderer.cpp: 973: (updateFullExtent) Full extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/gui/qgsmapcanvas.cpp: 606: (refresh) CANVAS refresh already scheduled
src/core/qgsmapsettings.cpp: 424: (fullExtent) called.
src/core/qgsmapsettings.cpp: 435: (fullExtent) Layer count: 1
src/core/qgsmapsettings.cpp: 445: (fullExtent) Updating extent using ne_10m_admin_0_countries
src/core/qgsmapsettings.cpp: 446: (fullExtent) Input extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmapsettings.cpp: 305: (layerExtentToOutputExtent) proj extent = -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmapsettings.cpp: 458: (fullExtent) Output extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmapsettings.cpp: 489: (fullExtent) Full extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmapsettings.cpp: 424: (fullExtent) called.
src/core/qgsmapsettings.cpp: 435: (fullExtent) Layer count: 1
src/core/qgsmapsettings.cpp: 445: (fullExtent) Updating extent using ne_10m_admin_0_countries
src/core/qgsmapsettings.cpp: 446: (fullExtent) Input extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmapsettings.cpp: 305: (layerExtentToOutputExtent) proj extent = -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmapsettings.cpp: 458: (fullExtent) Output extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsmapsettings.cpp: 489: (fullExtent) Full extent: -179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181
src/core/qgsscalecalculator.cpp: 131: (calculateGeographicDistance) Distance across map extent (m): 4.03241e+07
src/core/qgsscalecalculator.cpp: 88: (calculate) scale = 3.37182e+08 conversionFactor = 39.3701
src/core/qgsmapsettings.cpp: 147: (updateDerived) Map units per pixel (x,y) : 0.83628318584070827, 0.22233634839713431
src/core/qgsmapsettings.cpp: 148: (updateDerived) Pixmap dimensions (x,y) : 452, 820
src/core/qgsmapsettings.cpp: 149: (updateDerived) Extent dimensions (x,y) : 378.00000000000011369, 182.31580568565013323
src/core/qgsmapsettings.cpp: 150: (updateDerived) -188.9999999999998863,-94.3408525163250005 : 189.0000000000002274,87.9749531693251328
src/core/qgsmapsettings.cpp: 151: (updateDerived) Adjusted map units per pixel (x,y) : 0.83628318584070827, 0.83628318584070827
src/core/qgsmapsettings.cpp: 152: (updateDerived) Recalced pixmap dimensions (x,y) : 452, 820
src/core/qgsmapsettings.cpp: 153: (updateDerived) Scale (assuming meters as map units) = 1:337181607.74003785848617554
src/core/qgsmaprenderer.cpp: 195: (adjustExtentToSize) Map units per pixel (x,y) : 0.83628318584070827, 0.22233634839713431
src/core/qgsmaprenderer.cpp: 196: (adjustExtentToSize) Pixmap dimensions (x,y) : 452, 820
src/core/qgsmaprenderer.cpp: 197: (adjustExtentToSize) Extent dimensions (x,y) : 378.00000000000011369, 182.31580568565013323
src/core/qgsmaprenderer.cpp: 198: (adjustExtentToSize) -188.9999999999998863,-94.3408525163250005 : 189.0000000000002274,87.9749531693251328
src/core/qgsmaprenderer.cpp: 206: (adjustExtentToSize) Adjusted map units per pixel (x,y) : 0.83628318584070827, 0.83628318584070827
src/core/qgsmaprenderer.cpp: 208: (adjustExtentToSize) Recalced pixmap dimensions (x,y) : 452, 820
src/core/qgsscalecalculator.cpp: 131: (calculateGeographicDistance) Distance across map extent (m): 4.03241e+07
src/core/qgsscalecalculator.cpp: 88: (calculate) scale = 3.37182e+08 conversionFactor = 39.3701
src/core/qgsmaprenderer.cpp: 213: (adjustExtentToSize) Scale (assuming meters as map units) = 1:337181607.74003785848617554
src/gui/qgsmapcanvas.cpp: 606: (refresh) CANVAS refresh already scheduled
src/gui/qgsmapcanvas.cpp: 622: (refreshMap) CANVAS refresh!
src/core/qgsmaprendererjob.cpp: 573: (prepareJobs) Rendering at layer item MySQL_test_host_localhost_user_test_password_test20140618141735721
src/core/qgsmaprendererjob.cpp: 590: (prepareJobs) layer ne_10m_admin_0_countries:  minscale:0  maxscale:1e+08  scaledepvis:0  extent:-179.9999999999998863,-90.0000000000000000 : 180.0000000000001990,83.6341006530001181  blendmode:0
src/core/qgsvectorlayerrenderer.cpp: 85: (QgsVectorLayerRenderer) rendering v2:
  SINGLE: FILL SYMBOL (1 layers) color 135,71,174,255
src/core/qgsmaprendererjob.cpp: 768: (start) QThreadPool max thread count is 4
src/core/qgsmaprendererjob.cpp: 914: (renderLayerStatic) job 7ad8390 start
QGIS died on signal 11src/gui/qgsmapcanvasmap.cpp: 45: (paint) map paint DIFFERENT SIZE: img 452,820  item 2,4

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[New LWP 11869]
[New LWP 11868]
[New LWP 11867]
[New LWP 11866]
[New LWP 11846]
[New LWP 11845]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fffcabfe000
0x00007ff46d0b3d5d in poll () at ../sysdeps/unix/syscall-template.S:81
81	../sysdeps/unix/syscall-template.S: No such file or directory.
[Current thread is 1 (Thread 0x7ff474d6f7c0 (LWP 11842))]
#_0  0x00007ff46d0b3d5d in poll () at ../sysdeps/unix/syscall-template.S:81
No locals.
#_1  0x00007ff46b903fe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#_2  0x00007ff46b9040ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#_3  0x00007ff4701bc655 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#_4  0x00007ff46f5cd7c6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
No symbol table info available.
#_5  0x00007ff47018dfef in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#_6  0x00007ff47018e2e5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#_7  0x00007ff470193ab9 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#_8  0x000000000055aafb in main (argc=1, argv=0x7fffcaade028) at /home/richard/dev/qgis/git/qgis/src/app/main.cpp:1017
        qgistor = <incomplete type>
        mySnapshotHeight = 600
        args = {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 7816}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x1161f50}, d = 0x1161f50}}, <No data fields>}
        myApp = {<QApplication> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0x7ff46ffd3440 <QApplication::staticMetaObject>, stringdata = 0x7ff471ad5800 <qt_meta_stringdata_QgsApplication> "QgsApplication", data = 0x7ff471ad5780 <qt_meta_data_QgsApplication>, extradata = 0x7ff471de7f50 <QgsApplication::staticMetaObjectExtraData>}}, static staticMetaObjectExtraData = {objects = 0x0, static_metacall = 0x7ff471a52758 <QgsApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, static QGIS_ORGANIZATION_NAME = 0x7ff471a738d6 "QGIS", static QGIS_ORGANIZATION_DOMAIN = 0x7ff471a738db "qgis.org", static QGIS_APPLICATION_NAME = 0x7ff471a738e4 "QGIS2", static mFileOpenEventReceiver20300 = 0x13a7ef0, static mFileOpenEventList20300 = {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 7816}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0xe9f9a0 <QListData::shared_null>}, d = 0xe9f9a0 <QListData::shared_null>}}, <No data fields>}, static mPrefixPath20300 = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 12741}, alloc = 0, size = 0, data = 0xea1b9a <QString::shared_null+26>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 5492}, alloc = 0, size = 0, data = 0x7ff4704f591a <QString::shared_empty+26>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x1340210, static codecForCStrings = 0x0}, static mPluginPath20300 = {static null = <same as static member of an already seen type>, static shared_null = <same as static member of an already seen type>, static shared_empty = <same as static member of an already seen type>, d = 0x1342160, static codecForCStrings = 0x0}, static mPkgDataPath20300 = {static null = <same as static member of an already seen type>, static shared_null = <same as static member of an already seen type>, static shared_empty = <same as static member of an already seen type>, d = 0x1341e90, static codecForCStrings = 0x0}, static mLibraryPath20300 = {static null = <same as static member of an already seen type>, static shared_null = <same as static member of an already seen type>, static shared_empty = <same as static member of an already seen type>, d = 0x1342410, static codecForCStrings = 0x0}, static mLibexecPath20300 = {static null = <same as static member of an already seen type>, static shared_null = <same as static member of an already seen type>, static shared_empty = <same as static member of an already seen type>, d = 0x13424a0, static codecForCStrings = 0x0}, static mThemeName20300 = {static null = <same as static member of an already seen type>, static shared_null = <same as static member of an already seen type>, static shared_empty = <same as static member of an already seen type>, d = 0x1424940, static codecForCStrings = 0x0}, static mDefaultSvgPaths20300 = {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 7816}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x1341f40}, d = 0x1341f40}}, <No data fields>}, static mSystemEnvVars20300 = {{d = 0x0, e = 0x0}}, static mConfigPath20300 = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 12741}, alloc = 0, size = 0, data = 0xea1b9a <QString::shared_null+26>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 5492}, alloc = 0, size = 0, data = 0x7ff4704f591a <QString::shared_empty+26>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x1340f00, static codecForCStrings = 0x0}, static mRunningFromBuildDir20300 = false, static mBuildSourcePath20300 = {static null = <same as static member of an already seen type>, static shared_null = <same as static member of an already seen type>, static shared_empty = <same as static member of an already seen type>, d = 0x0, static codecForCStrings = 0x0}, static mBuildOutputPath20300 = {static null = <same as static member of an already seen type>, static shared_null = <same as static member of an already seen type>, static shared_empty = <same as static member of an already seen type>, d = 0xea1b80 <QString::shared_null>, static codecForCStrings = 0x0}, static mGdalSkipList20300 = {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 7816}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x0}, d = 0x0}}, <No data fields>}, static mMaxThreads20300 = 0}
        myLocaleOverrideFlag = false
        __FUNCTION__ = "main"

@qgib
Copy link
Contributor Author

qgib commented Jun 19, 2014

Author Name: Saber Razmjooei (@saberraz)


Further info from terminal:

QGIS died on signal 11ptrace: Operation not permitted.
No thread selected
No stack.
gdb returned 0
Aborted (core dumped)

Seems to be related to the MTR.


  • assigned_to_id was configured as Martin Dobias

@qgib
Copy link
Contributor Author

qgib commented Jun 19, 2014

Author Name: Martin Dobias (@wonder-sk)


This is related to multi-threaded rendering, but in fact it is a bug in OGR MySQL driver: http://trac.osgeo.org/gdal/ticket/5528

I have prepared a patch for OGR.

Not sure if we can do anything in QGIS with it. The only way to avoid the problem would be a special configuration option that would force the rendering to be done in main thread - for cases like this.


  • version was changed from 2.2.0 to master

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2014

Author Name: Jürgen Fischer (@jef-n)


Martin Dobias wrote:

This is related to multi-threaded rendering, but in fact it is a bug in OGR MySQL driver: http://trac.osgeo.org/gdal/ticket/5528

I have prepared a patch for OGR.

Not sure if we can do anything in QGIS with it. The only way to avoid the problem would be a special configuration option that would force the rendering to be done in main thread - for cases like this.

BTW http://download.osgeo.org/osgeo4w/x86_64/release/gdal/gdal-1.11.0-1-src.tar.bz2 has a similar patch (just made to build with MySQL 6; it still passes on the args to @mysql_library_init@).

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

Author Name: Jürgen Fischer (@jef-n)


  • fixed_version_id was changed from Version 2.4 to Future Release - High Priority

@qgib
Copy link
Contributor Author

qgib commented Sep 14, 2014

Author Name: Martin Dobias (@wonder-sk)


Fixed in GDAL 1.11.1 / trunk (will be 2.0)


  • resolution was changed from to up/downstream
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 25, 2019
@qgib qgib added this to the Future Release - High Priority milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant