Bug report #15684
Updated by Giovanni Manghi over 6 years ago
Creating a PNG snapshot from the command line on Linux of a map containing a vector layer causes a segmentation fault after creating the PNG. Crashes with projects containing either SpatiaLite and shapefile layers, but no crash with just a raster layer (GeoTIFF). No crash if creating a PNG from the GUI (Project -> Save As Image...). Crashes with or without --noplugins, --extent, --height, or --width. A number of failed Gtk assertions are reported just before the segfault. The attached minimal (not) working example consists of a project containing a single vector layer that is just a single polygon that I created in QGIS:
<pre>
qgis --snapshot output.png test_map.qgsWarning: loading of qgis translation failed [/usr/share/qgis/i18n//qgis_en_US]
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Warning: QCss::Parser - Failed to load file "/style.qss"
loaded the Generic plugin
Warning: QObject::startTimer: QTimer can only be used with threads started with QThread
(qgis:11254): Gtk-CRITICAL **: IA__gtk_container_add: assertion 'GTK_IS_CONTAINER (container)' failed
(qgis:11254): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 'GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
</pre>
(These two assertion failures are reported many times; full output is attached.)
<pre>
Segmentation fault (core dumped)
</pre>
<pre>
qgis --snapshot output.png test_map.qgsWarning: loading of qgis translation failed [/usr/share/qgis/i18n//qgis_en_US]
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Warning: QCss::Parser - Failed to load file "/style.qss"
loaded the Generic plugin
Warning: QObject::startTimer: QTimer can only be used with threads started with QThread
(qgis:11254): Gtk-CRITICAL **: IA__gtk_container_add: assertion 'GTK_IS_CONTAINER (container)' failed
(qgis:11254): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 'GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
</pre>
(These two assertion failures are reported many times; full output is attached.)
<pre>
Segmentation fault (core dumped)
</pre>