Bug report #17959

QGIS crashes when Print Layout attempts to render an ESRI MapServer layer

Added by David Jordan over 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:master Regression?:Yes
Operating System:Windows 10 64-bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:25855

Description

QGIS crashes when Print Layout attempts to draw a raster layer served from an ESRI MapServer, in this case the layer is ESRI World Topo.

Crash may be replicated by following these steps:

Add ESRI World Topo (or indeed any ESRI MapServer layer) to the map canvas via: Layer - Add Layer - Add ArcGIS MapServer Layer. Create a New Print Layout and then add a map to the print canvas. QGIS almost immediately crashes while rendering the map.

Same layer renders fine in the Print Layout if it's served via WMS.

Here's my Stack Trace:

Crash ID: 9777098370aa1c2cc88f87cf21c3eef841ab2b42

Stack Trace

QRasterPaintEngine::transformChanged :
QPainter::translate :
QGraphicsScene::drawForeground :
QGraphicsScene::dragMoveEvent :
QGraphicsItem::dragMoveEvent :
QGraphicsEffectSource::draw :
QgsLayoutEffect::draw qgslayouteffect.cpp:33
QGraphicsScene::drawItems :
QGraphicsScene::drawItems :
QGraphicsView::paintEvent :
QgsLayoutView::paintEvent qgslayoutview.cpp:1146
QWidget::event :
QFrame::event :
QGraphicsView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:317
QCoreApplication::notifyInternal2 :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QApplication::windowIcon :
QWidget::event :
QMainWindow::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:317
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
QGraphicsScene::~QGraphicsScene :
QObject::event :
QGraphicsScene::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:317
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main main.cpp:1431
WinMain mainwin.cpp:128
__scrt_common_main_seh exe_common.inl:253
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 2.99.0-Master
QGIS code revision: c91e33d332
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.3
Running against GDAL: 2.2.3

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.16299

Associated revisions

Revision bbe974cd
Added by Nyall Dawson about 6 years ago

[layouts] Fix crash when using maps containing AMS layers

Implement a similar hack to what the canvas uses to workaround
the badly behaved AMS and WCS providers

Fixes #17959

History

#1 Updated by David Jordan about 6 years ago

  • Assignee deleted (David Jordan)

#2 Updated by Nyall Dawson about 6 years ago

  • Status changed from Open to Feedback

Can you share a url for the layer?

#3 Updated by David Jordan about 6 years ago

Nyall Dawson wrote:

Can you share a url for the layer?

Sure. Here's a url: https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer

QGIS crashes for all ArcGIS MapServer layers, no matter what the source. Here's another from the Geological Survey of Ireland:

https://secure.dccae.gov.ie/arcgis/rest/services/Bedrock/BedrockGeology100k/MapServer

#4 Updated by Nyall Dawson about 6 years ago

  • Regression? changed from No to Yes
  • Crashes QGIS or corrupts data changed from No to Yes

#5 Updated by Nyall Dawson about 6 years ago

  • Status changed from Feedback to In Progress

#6 Updated by Nyall Dawson about 6 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

#7 Updated by Giovanni Manghi about 6 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF