Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS 3.26, 3.28 crashes when printing or exporting layout #50785

Closed
2 tasks done
benstrege opened this issue Nov 3, 2022 · 10 comments
Closed
2 tasks done

QGIS 3.26, 3.28 crashes when printing or exporting layout #50785

benstrege opened this issue Nov 3, 2022 · 10 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks

Comments

@benstrege
Copy link

What is the bug or the crash?

User Feedback

QGIS crashes whenever I try to export. This happens in QGIS 3.26 and 3.28. It does not crash when I use 3.24.

Report Details

Python Stack Trace

Windows fatal exception: code 0x80000003

Current thread 0x00008410 (most recent call first):
<no Python frame>

Stack Trace


my_load_defaults :
raise :
abort :
terminate :
FindHandler<__FrameHandler4> frame.cpp:682
__InternalCxxFrameHandler<__FrameHandler4> frame.cpp:352
__CxxFrameHandler4 risctrnsctrl.cpp:290
RtlpExecuteHandlerForException :
RtlDispatchException :
RtlRaiseException :
RaiseException :
_CxxThrowException throw.cpp:75
qBadAlloc :
QByteArray::reallocData :
QByteArray::resize :
QBuffer::writeData :
QIODevice::write :
QIODevicePrivate::putCharHelper :
QDataStream::operator<< :
QRhiGraphicsPipeline::resourceType :
QPainter::translate :
QPainter::restore :
QgsAbstractProfileSurfaceResults::~QgsAbstractProfileSurfaceResults :
_CallSettingFrameEncoded handlers.asm:183
__FrameHandler4::FrameUnwindToState frame.cpp:1093
__FrameHandler4::FrameUnwindToEmptyState risctrnsctrl.cpp:218
__InternalCxxFrameHandler<__FrameHandler4> frame.cpp:304
__CxxFrameHandler4 risctrnsctrl.cpp:290
QgsLazInfo::vlrData :
RtlpExecuteHandlerForUnwind :
RtlUnwindEx :
__FrameHandler4::UnwindNestedFrames risctrnsctrl.cpp:662
CatchIt<__FrameHandler4> frame.cpp:1302
FindHandler<__FrameHandler4> frame.cpp:600
__InternalCxxFrameHandler<__FrameHandler4> frame.cpp:352
__CxxFrameHandler4 risctrnsctrl.cpp:290
RtlpExecuteHandlerForException :
RtlDispatchException :
RtlRaiseException :
RaiseException :
_CxxThrowException throw.cpp:75
qBadAlloc :
QByteArray::reallocData :
QByteArray::resize :
QBuffer::writeData :
QIODevice::write :
QDataStream::operator<< :
operator<< :
QRhiGraphicsPipeline::resourceType :
QPainter::translate :
QPainter::setClipPath :
QgsSymbolLayer::startFeatureRender :
QgsSymbol::renderFeature :
QgsFeatureRenderer::renderFeature :
QgsVectorLayerProfileResults::visitFeaturesInRange :
QgsVectorLayerProfileResults::visitFeaturesInRange :
QgsVectorLayerProfileResults::visitFeaturesInRange :
QgsMapRendererCustomPainterJob::doRender :
QgsMapRendererCustomPainterJob::startPrivate :
QgsMapRendererCustomPainterJob::renderSynchronously :
QgsLayoutItemMap::drawMap :
QgsLayoutItemMap::paint :
QGraphicsScene::dragMoveEvent :
QGraphicsItem::dragMoveEvent :
QGraphicsEffectSource::draw :
QgsLayoutEffect::draw :
QGraphicsScene::drawItems :
QGraphicsScene::drawItems :
QGraphicsScene::render :
QgsLayoutExporter::renderRegion :
QgsLayoutExporter::renderPage :
QgsLayoutExporter::printPrivate :
QgsLayoutExporter::exportToPdf :
QgsAppLayerHandling::shouldAskUserForSublayers :
QObject::qt_static_metacall :
QAction::activate :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QToolButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.28.0-Firenze
QGIS code revision: ed3ad04
Compiled against Qt: 5.15.3
Running against Qt: 5.15.3
Compiled against GDAL: 3.5.2
Running against GDAL: 3.5.2

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

Steps to reproduce the issue

  1. Create a layout
  2. Export to PDF (it also crashes when I try to do any printing or exporting)
  3. Wait...
  4. Crashes when it is almost done

Versions

3.26, 3.28

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@benstrege benstrege added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Nov 3, 2022
@nicogodet
Copy link
Member

Could you share a sample project to reproduce the issue ?

@nicogodet nicogodet added the Feedback Waiting on the submitter for answers label Nov 3, 2022
@troopa81
Copy link
Contributor

troopa81 commented Nov 3, 2022

Probablyrelated to #50543

I assume that you have masks and you check the full vector export options ?

@benstrege
Copy link
Author

I have masks. I have tried full raster, full vector, and everything in between. I am testing right now, and it might be related to the size of the layout. My layouts are large. I have 48 GB of RAM, so plenty of computing power. A small layout seems to export fine (with the exception of opacity, which is probably a different issue). I am testing with the size, getting larger and larger, to see when it breaks.

@troopa81
Copy link
Contributor

troopa81 commented Nov 3, 2022

I have tried full raster, full vector,

Did you disable this options ?

exportopts

Regarding the stacktrace, I'm quite confident that the options is disabled and that's the reason of the crash!

@benstrege
Copy link
Author

benstrege commented Nov 3, 2022

Is it supposed to be checked or not checked?

I found when it broke. At 300x300 mm at 300 dpi, it exported fine. At 400x400 mm and 300 dpi, it crashed.

@benstrege
Copy link
Author

Here is the stacktrace when "Always export as vectors" is checked.

User Feedback

Crash at 400x400 mm, 300 dpi, "Always export as vectors" enabled.

Report Details

Python Stack Trace

Windows fatal exception: code 0x80000003

Current thread 0x0000ced8 (most recent call first):
<no Python frame>

Stack Trace


my_load_defaults :
raise :
abort :
terminate :
FindHandler<__FrameHandler4> frame.cpp:682
__InternalCxxFrameHandler<__FrameHandler4> frame.cpp:352
__CxxFrameHandler4 risctrnsctrl.cpp:290
RtlpExecuteHandlerForException :
RtlDispatchException :
RtlRaiseException :
RaiseException :
_CxxThrowException throw.cpp:75
qBadAlloc :
QByteArray::reallocData :
QByteArray::resize :
QBuffer::writeData :
QIODevice::write :
QIODevicePrivate::putCharHelper :
QDataStream::operator<< :
QRhiGraphicsPipeline::resourceType :
QPainter::translate :
QPainter::restore :
QgsAbstractProfileSurfaceResults::~QgsAbstractProfileSurfaceResults :
_CallSettingFrameEncoded handlers.asm:183
__FrameHandler4::FrameUnwindToState frame.cpp:1093
__FrameHandler4::FrameUnwindToEmptyState risctrnsctrl.cpp:218
__InternalCxxFrameHandler<__FrameHandler4> frame.cpp:304
__CxxFrameHandler4 risctrnsctrl.cpp:290
QgsLazInfo::vlrData :
RtlpExecuteHandlerForUnwind :
RtlUnwindEx :
__FrameHandler4::UnwindNestedFrames risctrnsctrl.cpp:662
CatchIt<__FrameHandler4> frame.cpp:1302
FindHandler<__FrameHandler4> frame.cpp:600
__InternalCxxFrameHandler<__FrameHandler4> frame.cpp:352
__CxxFrameHandler4 risctrnsctrl.cpp:290
RtlpExecuteHandlerForException :
RtlDispatchException :
RtlRaiseException :
RaiseException :
_CxxThrowException throw.cpp:75
qBadAlloc :
QByteArray::reallocData :
QByteArray::resize :
QBuffer::writeData :
QIODevice::write :
QDataStream::operator<< :
operator<< :
QRhiGraphicsPipeline::resourceType :
QPainter::translate :
QPainter::setClipPath :
QgsSymbolLayer::startFeatureRender :
QgsSymbol::renderFeature :
QgsFeatureRenderer::renderFeature :
QgsVectorLayerProfileResults::visitFeaturesInRange :
QgsVectorLayerProfileResults::visitFeaturesInRange :
QgsVectorLayerProfileResults::visitFeaturesInRange :
QgsMapRendererCustomPainterJob::doRender :
QgsMapRendererCustomPainterJob::startPrivate :
QgsMapRendererCustomPainterJob::renderSynchronously :
QgsLayoutItemMap::drawMap :
QgsLayoutItemMap::paint :
QGraphicsScene::dragMoveEvent :
QGraphicsScene::drawItems :
QGraphicsScene::drawItems :
QGraphicsScene::render :
QgsLayoutExporter::renderRegion :
QgsLayoutExporter::renderPage :
QgsLayoutExporter::printPrivate :
QgsLayoutExporter::exportToPdf :
QgsAppLayerHandling::shouldAskUserForSublayers :
QObject::qt_static_metacall :
QAction::activate :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QToolButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.28.0-Firenze
QGIS code revision: ed3ad04
Compiled against Qt: 5.15.3
Running against Qt: 5.15.3
Compiled against GDAL: 3.5.2
Running against GDAL: 3.5.2

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

@nicogodet nicogodet added Crash/Data Corruption Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks and removed Feedback Waiting on the submitter for answers labels Nov 4, 2022
@agiudiceandrea
Copy link
Contributor

@benstrege, what happens if you remove the masks applied to the layers? What happens if you export the layout in a format different from PDF?

@benstrege
Copy link
Author

@agiudiceandrea If I hide the layers with masks, it exports fine. As soon as I have a layer with a mask, it crashes. I tried both the PDF export and the image export, and both of them crash if they have masks and are over 300x300 mm (300 DPI).

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Nov 10, 2022

If I hide the layers with masks, it exports fine. As soon as I have a layer with a mask, it crashes. I tried both the PDF export and the image export, and both of them crash if they have masks and are over 300x300 mm (300 DPI).

@troopa81 it seems to me this is the same issue previously reported at #50543. In this case this one should be closed as duplicate of that one.

@troopa81
Copy link
Contributor

@agiudiceandrea I think you're right. I close it!

@agiudiceandrea agiudiceandrea closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
Development

No branches or pull requests

4 participants