Bug report #21246

Composer Crashes QGIS when memory required is somewhat above 1500 MB

Added by Pedro Venâncio over 5 years ago. Updated over 5 years ago.

Status:Open
Priority:High
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:3.5(master) Regression?:Yes
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:29064

Description

Please see the screencast: https://cld.pt/dl/download/e89f376a-94f5-4c1a-9303-d09142b2a000/Composer_Crash_Memory_Allocation.gif

I've tested with several combinations of page size and export resolution, using Atlas or not, and the pattern is always the same. It seems that when the memory required is below 1500 MB, everything runs smoothly. When memory required is somewhat above 1500 MB, QGIS crashes.

Crash ID: 00226ca5e38762d367246255f3534bd55ed3d875

Stack Trace

memmove :
QVectorPath::convertToPainterPath :
QVectorPath::convertToPainterPath :
QVectorPath::convertToPainterPath :
QVectorPath::convertToPainterPath :
QVectorPath::convertToPainterPath :
QRasterPaintEngine::rasterBuffer :
QRasterPaintEngine::rasterBuffer :
QRasterPaintEngine::fill :
QPaintEngineEx::draw :
QPaintEngineEx::drawPath :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QGraphicsScene::dragMoveEvent :
QGraphicsItem::dragMoveEvent :
QGraphicsEffectSource::draw :
QgsGraduatedSymbolRenderer::addClass :
QGraphicsScene::drawItems :
QGraphicsScene::drawItems :
QGraphicsScene::render :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgsGraduatedSymbolRenderer::addClass :
QgisAppInterface::actionPan :
QgisAppInterface::actionPan :
QgisAppInterface::actionPan :
QgisAppInterface::actionPan :
QMetaObject::activate :
QAction::activate :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QToolButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsGraduatedSymbolRenderer::addClass :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsGraduatedSymbolRenderer::addClass :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
DispatchMessageW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
QgisAppInterface::actionPan :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.4.4-Madeira
QGIS code revision: c327dec672
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.0
Running against GDAL: 2.4.0

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

QGIS 2.18 seems to support a few more memory requirement without crash. Above some limit, it shows the memory allocation error message attached, and do not crash.

Tested in Windows 10 with QGIS 3.4.4, Master and 2.18.28 (OSGeo4W 64bits). This machine has 16GB of RAM.

memory_allocation_error_qgis_2_18.jpg (22.8 KB) Pedro Venâncio, 2019-02-12 06:51 PM

linux_atlas_export_error_memory_overflow.jpg (14 KB) Pedro Venâncio, 2019-02-13 12:02 AM

linux_image_export_error_memory_overflow.jpg (15.5 KB) Pedro Venâncio, 2019-02-13 12:02 AM

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Is this a regression compared to 2.18?

#2 Updated by Adje Prado over 5 years ago

This looks very similar to the issue that I've been having (#21247). I thought it was a layout size, but it's probably more closely related to memory.

#3 Updated by Pedro Venâncio over 5 years ago

Giovanni Manghi wrote:

Is this a regression compared to 2.18?

I think so Giovanni.

I've tested now in Linux, and here QGIS 3.4.4 has a similar behavior to QGIS 2.18.28 in Windows, that is, it throws a window with a warning

Trying to create image of 27165×27165 @ 300dpi resulted in a memory overflow.

Please try a lower resolution or a smaller paper size.

and QGIS does not crash.

So, the crash and regression seems circumscribed to QGIS 3.4.4 and Master, in Windows machines.

Also in Linux, the warning message is showed when Composer needs somewhat above 1500 MB of memory. Could this limit be increased in 64bits versions?

#4 Updated by Giovanni Manghi over 5 years ago

  • Regression? changed from No to Yes

#5 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Open

Also available in: Atom PDF