Bug report #10905

QGIS crashes in Windows when opening a project that does work on Linux

Added by Gavin Fleming about 5 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:Nyall Dawson
Category:Project Loading/Saving
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:19269

Description

I have been developing a project in QGIS Master (2.5) on Ubuntu with lots of edit widgets and drag and drop forms. When I ship it to a client to open on Windows it crashes, generating the attached minidump (main minidump file 23MB, too big to upload, please contact me for it).

windows version info:
QGIS version 2.4.0-Chugiak QGIS code revision 8fdd08a
Compiled against Qt 4.8.5 Running against Qt 4.8.5
Compiled against GDAL/OGR 1.11.0 Running against GDAL/OGR 1.11.0
Compiled against GEOS 3.4.2-CAPI-1.8.2 Running against GEOS 3.4.2-CAPI-1.8.2 r3921
PostgreSQL Client Version 9.2.4 SpatiaLite Version 4.1.1
QWT Version 5.2.3 PROJ.4 Version 480
QScintilla2 Version 2.7.2

Zone.Identifier (23 Bytes) Gavin Fleming, 2014-07-17 01:20 AM

Associated revisions

Revision 111d7d3d
Added by Nyall Dawson about 5 years ago

[composer] Prevent crash when loading project which contains no Grid elements (refs #10905)

Revision 5a6f68be
Added by Nyall Dawson about 5 years ago

[composer] Write a dummy Grid element when saving composer maps, fixes crash when loading project in older QGIS versions (fix #10905)

History

#1 Updated by Gavin Fleming about 5 years ago

  • Crashes QGIS or corrupts data changed from No to Yes

#2 Updated by Giovanni Manghi about 5 years ago

  • Status changed from Open to Feedback
  • Category set to Project Loading/Saving

does you client use qgis master? if not, what happens if he opens the project with qgis master (that can eventually install using osgeo4w)?

what happens if you open the project in qgis 2.4?

#3 Updated by Tim Sutton about 5 years ago

  • Target version set to Version 2.6
  • Assignee set to Nyall Dawson

Note that I tested Gavin's project and it seems something in composer is causing it to crash. Traceback below:

Program received signal SIGABRT, Aborted.
0x00007ffff00d8f79 in __GI_raise ([email protected]=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56    ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff00d8f79 in __GI_raise ([email protected]=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff00dc388 in __GI_abort () at abort.c:89
#2  0x000000000055f047 in qgisCrash (signal=-1) at /home/timlinux/dev/cpp/QGIS/src/app/main.cpp:303
#3  0x000000000055f20a in myMessageOutput (type=QtFatalMsg, 
    msg=0x59e8308 "ASSERT: \\"symbol\\" in file /home/timlinux/dev/cpp/QGIS/src/core/symbology-ng/qgssymbollayerv2utils.cpp, line 509") at /home/timlinux/dev/cpp/QGIS/src/app/main.cpp:356
#4  0x00007ffff2c75bb1 in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffff2c75ff9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007ffff2c76804 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007ffff401ac50 in QgsSymbolLayerV2Utils::symbolPreviewPixmap (symbol=0x0, size=...) at /home/timlinux/dev/cpp/QGIS/src/core/symbology-ng/qgssymbollayerv2utils.cpp:509
#8  0x00007ffff401abd6 in QgsSymbolLayerV2Utils::symbolPreviewIcon (symbol=0x0, size=...) at /home/timlinux/dev/cpp/QGIS/src/core/symbology-ng/qgssymbollayerv2utils.cpp:504
#9  0x000000000082c2d3 in QgsComposerMapWidget::updateLineSymbolMarker (this=0x5982b40) at /home/timlinux/dev/cpp/QGIS/src/app/composer/qgscomposermapwidget.cpp:1387
#10 0x00000000008267ef in QgsComposerMapWidget::QgsComposerMapWidget (this=0x5982b40, composerMap=0x5981090) at /home/timlinux/dev/cpp/QGIS/src/app/composer/qgscomposermapwidget.cpp:112
#11 0x00000000007f83f3 in QgsComposer::addComposerMap (this=0x4dffa00, map=0x5981090) at /home/timlinux/dev/cpp/QGIS/src/app/composer/qgscomposer.cpp:3107
#12 0x00000000008e03c4 in QgsComposer::qt_static_metacall (_o=0x4dffa00, _c=QMetaObject::InvokeMetaMethod, _id=83, _a=0x7fffffffb000)
    at /home/timlinux/dev/cpp/QGIS/build/src/app/composer/moc_qgscomposer.cxx:370
#13 0x00007ffff2d9687a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#14 0x00007ffff4409aed in QgsComposition::composerMapAdded (this=0x5838890, _t1=0x5981090) at /home/timlinux/dev/cpp/QGIS/build/src/core/composer/moc_qgscomposition.cxx:201
#15 0x00007ffff4360a2d in QgsComposition::addComposerMap (this=0x5838890, map=0x5981090, setDefaultPreviewStyle=false)
    at /home/timlinux/dev/cpp/QGIS/src/core/composer/qgscomposition.cpp:2155
#16 0x00007ffff4359b1d in QgsComposition::addItemsFromXML (this=0x5838890, elem=..., doc=..., mapsToRestore=0x4dffdc0, addUndoCommands=false, pos=0x0, pasteInPlace=false)
    at /home/timlinux/dev/cpp/QGIS/src/core/composer/qgscomposition.cpp:955
#17 0x00000000007f7952 in QgsComposer::readXML (this=0x4dffa00, composerElem=..., doc=..., fromTemplate=false) at /home/timlinux/dev/cpp/QGIS/src/app/composer/qgscomposer.cpp:2992
#18 0x000000000058ef38 in QgisApp::loadComposersFromProject (this=0x14575d0, doc=...) at /home/timlinux/dev/cpp/QGIS/src/app/qgisapp.cpp:5309
#19 0x00000000008d1192 in QgisApp::qt_static_metacall (_o=0x14575d0, _c=QMetaObject::InvokeMetaMethod, _id=282, _a=0x7fffffffb810)
    at /home/timlinux/dev/cpp/QGIS/build/src/app/moc_qgisapp.cxx:890
#20 0x00007ffff2d9687a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x00007ffff4403e0f in QgsProject::readProject (this=0x14c1b70, _t1=...) at /home/timlinux/dev/cpp/QGIS/build/src/core/moc_qgsproject.cxx:121
#22 0x00007ffff425157d in QgsProject::read (this=0x14c1b70) at /home/timlinux/dev/cpp/QGIS/src/core/qgsproject.cpp:953
#23 0x00007ffff42505db in QgsProject::read (this=0x14c1b70, file=...) at /home/timlinux/dev/cpp/QGIS/src/core/qgsproject.cpp:809
#24 0x000000000058552b in QgisApp::addProject (this=0x14575d0, projectFile=...) at /home/timlinux/dev/cpp/QGIS/src/app/qgisapp.cpp:3735
#25 0x0000000000587bd3 in QgisApp::openProject (this=0x14575d0, action=0x138dcc0) at /home/timlinux/dev/cpp/QGIS/src/app/qgisapp.cpp:4000
#26 0x00000000008d03ca in QgisApp::qt_static_metacall (_o=0x14575d0, _c=QMetaObject::InvokeMetaMethod, _id=157, _a=0x7fffffffc1a0)
    at /home/timlinux/dev/cpp/QGIS/build/src/app/moc_qgisapp.cxx:761
#27 0x00007ffff2d9687a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#28 0x00007ffff2545212 in QMenu::triggered(QAction*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007ffff2546560 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007ffff2d9687a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#31 0x00007ffff2115a62 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007ffff2117433 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#33 0x00007ffff2545489 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#34 0x00007ffff25499b9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007ffff216b50a in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007ffff254d7bb in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#37 0x00007ffff211be2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
Cannot access memory at address 0x7fffffffc5d8
(gdb) r

Removing the <composer> element from the .qgs file manually resolved the crash issue.

I know we can't guarantee backwards compatibility of projects but perhaps there is something that can be done to prevent older QGIS versions crashing when loading newer version's projects....

If you can't think of any reasonable approach to do that I think we should just close out this ticket.

#4 Updated by Nyall Dawson about 5 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF