Bug report #21690
Qgis 3.4.6-Madeira composer crash opening layout
Status: | Open | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Map Composer/Printing | ||
Affected QGIS version: | 3.6.1 | Regression?: | No |
Operating System: | Windows 10 pro x64 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 29506 |
Description
Hello
I am tgryiong to print a layout with 2 locked layers maps (different layers) and some HTML labels
I was trying to open a 2.18 project with the layout I wanted but composer crashed any time I tried to open it.
Then I eliminated that layout and started to create a new one, step by step.
All objects that I added were working fine.
I added the two map windows and some HTML labels and pictures, all fine
Then I saved, reopened my project and bang! Crash with composer.
No way to open my layout
Windows 10 pro (x64) on a powerful laptop
Qgis 3.4.6 downloaded via OSGEO4W
Here is the report
Thanks
User Feedback¶
Crash during composer layout loading
Report Details¶
Crash ID: 4506cf147db7f8b616b11400b921b9abd4b43470
Stack Trace
QRasterPaintEngine::transformChanged : QPainter::translate : QGraphicsScene::drawForeground : QGraphicsScene::dragMoveEvent : QGraphicsItem::dragMoveEvent : QGraphicsEffectSource::draw : QgsLayoutEffect::draw : QGraphicsScene::drawItems : QGraphicsScene::drawItems : QGraphicsView::paintEvent : QgsLayoutView::paintEvent : QWidget::event : QFrame::event : QGraphicsView::viewportEvent : QCoreApplicationPrivate::sendThroughObjectEventFilters : QApplicationPrivate::notify_helper : QApplication::notify : QgsApplication::notify : QCoreApplication::notifyInternal2 : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QApplication::windowIcon : QWidget::event : QApplicationPrivate::notify_helper : QApplication::notify : QgsApplication::notify : QCoreApplication::notifyInternal2 : QCoreApplicationPrivate::sendPostedEvents : qt_plugin_query_metadata : QEventDispatcherWin32::processEvents : CallWindowProcW : DispatchMessageW : QEventDispatcherWin32::processEvents : qt_plugin_query_metadata : QEventLoop::exec : QgsLayoutItemLabel::contentChanged : QgsLayoutItemLabel::draw : QgsLayoutItem::paint : QGraphicsScene::~QGraphicsScene : QGraphicsScene::drawForeground : QGraphicsScene::dragMoveEvent : QGraphicsItem::dragMoveEvent : QGraphicsEffectSource::draw : QgsLayoutEffect::draw : QGraphicsScene::drawItems : QGraphicsScene::drawItems : QGraphicsView::paintEvent : QgsLayoutView::paintEvent : QWidget::event : QFrame::event : QGraphicsView::viewportEvent : QCoreApplicationPrivate::sendThroughObjectEventFilters : QApplicationPrivate::notify_helper : QApplication::notify : QgsApplication::notify : QCoreApplication::notifyInternal2 : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QWidgetPrivate::paintSiblingsRecursive : QWidgetPrivate::drawWidget : QApplication::windowIcon : QWidgetPrivate::syncBackingStore : QSizePolicy::QSizePolicy : QSizePolicy::QSizePolicy : QApplicationPrivate::notify_helper : QApplication::notify : QgsApplication::notify : QCoreApplication::notifyInternal2 : QGuiApplicationPrivate::processExposeEvent : QWindowSystemInterface::sendWindowSystemEvents : QWindowSystemInterface::flushWindowSystemEvents : CallWindowProcW : CallWindowProcW : IsWindowVisible : KiUserCallbackDispatcher : NtUserDispatchMessage : DispatchMessageW : QEventDispatcherWin32::processEvents : qt_plugin_query_metadata : QEventLoop::exec : QCoreApplication::exec : main : BaseThreadInitThunk : RtlUserThreadStart :
QGIS Info
QGIS Version: 3.4.6-Madeira
QGIS code revision: 5f7d4f5f08
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.1
Running against GDAL: 2.4.1
System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134
History
#1 Updated by Pietro Rossin over 5 years ago
Same behaviour with 3.6.1
#2 Updated by Giovanni Manghi over 5 years ago
- Affected QGIS version changed from 3.4.6 to 3.6.1
- Priority changed from Normal to High
#3 Updated by Pietro Rossin over 5 years ago
I was able to isolate the problem
I created item by item a new layout in a new project
As I added map frames to the layout there is no problem
As I inserted an HTML label pointing to a picture driven by atlas Qgis worked fine, maps were changing in their frames and picture is correctly changed in the HTML label frame.
Then I saved my project and reopen it, all ok. As I open the layout two map frames are initialized and the HTML label isn't, then qgis crashes
In the HTML label there is this code
<style>- {margin: 0px; padding: 0px; vertical-align: middle; horizontal-align: middle}
</style>
<img src="file:///E:/GIS/Monitoraggio/balneazione/fotoaree/[% "foto_area" ]"
style="max-width: 100; height: auto; display: block; margin: 0px 0px 0px 0px;" />
So a path with the column containing the picture to load for each atlas feature
Here is the crash report
Crash ID: 89ab25358ceb11d6072ea7f2decf0cd21afc41e2
Stack Trace
QRasterPaintEngine::transformChanged :
QPainter::translate :
QGraphicsScene::drawForeground :
QGraphicsScene::dragMoveEvent :
QGraphicsItem::dragMoveEvent :
QGraphicsEffectSource::draw :
QgsLayoutEffect::draw :
QGraphicsScene::drawItems :
QGraphicsScene::drawItems :
QGraphicsView::paintEvent :
QgsLayoutView::paintEvent :
QWidget::event :
QFrame::event :
QGraphicsView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QApplication::windowIcon :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QgsLayoutItemLabel::contentChanged :
QgsLayoutItemLabel::draw :
QgsLayoutItem::paint :
QGraphicsScene::~QGraphicsScene :
QGraphicsScene::drawForeground :
QGraphicsScene::dragMoveEvent :
QGraphicsItem::dragMoveEvent :
QGraphicsEffectSource::draw :
QgsLayoutEffect::draw :
QGraphicsScene::drawItems :
QGraphicsScene::drawItems :
QGraphicsView::paintEvent :
QgsLayoutView::paintEvent :
QWidget::event :
QFrame::event :
QGraphicsView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QApplication::windowIcon :
QWidgetPrivate::syncBackingStore :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processExposeEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QWindowSystemInterface::flushWindowSystemEvents :
CallWindowProcW :
CallWindowProcW :
IsWindowVisible :
KiUserCallbackDispatcher :
NtUserDispatchMessage :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :
QGIS Info
QGIS Version: 3.4.6-Madeira
QGIS code revision: 5f7d4f5f08
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.1
Running against GDAL: 2.4.1
System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134
#4 Updated by Pietro Rossin over 5 years ago
I can confirm the problem is related to the html label
I opened my new project and saved as .qgs text file
Then I looked for the HTML label
The code I found is
<LayoutItem opacity="1" blendMode="0" position="282,3,mm" type="65641" size="135,83.859,mm" uuid="{befd256b-55d9-4d8b-a2bd-2e5bb9b8b3da}" excludeFromExports="0" positionOnPage="282,3,mm" outlineWidthM="1,mm" frame="true" htmlState="1" marginX="0" positionLock="false" id="" frameJoinStyle="miter" background="false" groupUuid="" referencePoint="0" marginY="0" zValue="3" visibility="1" labelText="<style>
* {margin: 0px; padding: 0px; vertical-align: middle; horizontal-align: middle}
</style>
<img src="file:///E:/GIS/Monitoraggio/balneazione/fotoaree/[% "foto_area" %]"
style="max-width: 100%; height: auto; display: block; margin: 0px 0px 0px 0px;" />" valign="32" templateUuid="{befd256b-55d9-4d8b-a2bd-2e5bb9b8b3da}" itemRotation="0" halign="8">
<FrameColor alpha="255" green="158" red="245" blue="7"/>
<BackgroundColor alpha="255" green="255" red="255" blue="255"/>
<LayoutObject>
<dataDefinedProperties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</dataDefinedProperties>
<customproperties/>
</LayoutObject>
<LabelFont style="" description="Arial,10,-1,5,50,0,0,0,0,0"/>
<FontColor green="0" red="0" blue="0"/>
</LayoutItem>
changing the value visibility="1" to visibility="0" makes my layout open correctly.
The HTML label is hidden and I can toggle its visibility to on and pictures are shown. So it works.
If I set visible "on" for html label on my objects list then again next time I save/close qgis/ open project/load layout makes Qgis crash (the value visibility="1" is restored)
Pictures are .JPG 1134x780 res, 250/1100KB each