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

Crash when duplicating a layout #54012

Closed
2 tasks
Energeo1 opened this issue Aug 1, 2023 · 5 comments
Closed
2 tasks

Crash when duplicating a layout #54012

Energeo1 opened this issue Aug 1, 2023 · 5 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

@Energeo1
Copy link

Energeo1 commented Aug 1, 2023

What is the bug or the crash?

When I want to start editing a layout that I just duplicated, QGIS gets stuck for a moment and then crashes.
This happens often with any project I am working on.

Here ar the Report Details:

Python Stack Trace

Windows fatal exception: access violation

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

Stack Trace


UserCallWinProcCheckWow :
DispatchClientMessage :
_fnDWORD :
KiUserCallbackDispatcherContinue :
NtUserPeekMessage :
_PeekMessage :
PeekMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
QgisApp::showLayerProperties :
QgisApp::layerProperties :
QObject::qt_static_metacall :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::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 :
QMenu::exec :
QMenu::exec :
QgsLayerTreeView::contextMenuEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
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 :

Steps to reproduce the issue

  1. Create a layout in your project
  2. Duplicate the layout
  3. Try editing the duplicated layout

Versions

QGIS Info
QGIS Version: 3.28.9-Firenze
QGIS code revision: 66f4d63
Compiled against Qt: 5.15.3
Running against Qt: 5.15.3
Compiled against GDAL: 3.7.1
Running against GDAL: 3.7.1

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

Supported QGIS version

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

New profile

Additional context

No response

@Energeo1 Energeo1 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Aug 1, 2023
@agiudiceandrea agiudiceandrea added Crash/Data Corruption Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks labels Aug 1, 2023
@agiudiceandrea
Copy link
Contributor

@Energeo1 thanks for reporting. Could you please specify if the issue does occur every time a duplicated layout is edited or only some times? Could you please provide a sample project and exact steps in order to replica the issue? Have you tried if the issue does occur using a new QGIS user profile with no external plugin installed?

@agiudiceandrea agiudiceandrea added the Feedback Waiting on the submitter for answers label Aug 2, 2023
@Energeo1
Copy link
Author

Energeo1 commented Aug 3, 2023

@agiudiceandrea thank you for your feedback!

Strangely the issue does not occur every time I edit a duplicated layout, only sometimes. Unfortunately I cannot relate the issue to a prior common step, because there is none.
I open the duplicated layout and either zoom in or try to change an inserted element in the map layout and then qgis crashes. Sometimes it also crashes directly without trying to edit anything. Then in some cases the window "QGIS ended unexpectedly" occurs and in others QGIS crashes without any information.
The issue does not occur when using a new QGIS user profile, but unfortunately I cannot get my work done without any external plugins installed.
Creating a comparable example project is difficult because I have a lot of layers, also different layers in the project, and I cannot share the data I'm working with because they are sensitive.
The working flow is the following:

  1. Create a layout
  2. Close this layout an duplicate it in the layout manager
  3. Open the duplicated layout and try to edit

I hope this helps to understand the issue as well.
Does anyone else know this problem?

Thank you!

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Aug 3, 2023

I've caught a segmentation fault after various attempt to replicate the crash. The following is a gdb backtrace (QGIS built at 3e0517c) which will hopefully help some dev to find the root cause of the issue:

Thread 1 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 9308.0x27d8]
0x000007fedd0c9dbc in QGraphicsItemEffectSourcePrivate::draw(QPainter*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
(gdb) backtrace
#0  0x000007fedd0c9dbc in QGraphicsItemEffectSourcePrivate::draw(QPainter*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#1  0x000007fedd15bd45 in QGraphicsEffectSource::draw(QPainter*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#2  0x000007fecc1cf013 in QgsLayoutEffect::draw () at /__w/QGIS/QGIS/src/core/layout/qgslayouteffect.cpp:33
#3  0x000007fedd103726 in QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem*, QPainter*, QTransform const*, QRegion*, QWidget*, double, QTrans
form const*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#4  0x000007fedd103df3 in QGraphicsScenePrivate::drawItems(QPainter*, QTransform const*, QRegion*, QWidget*) ()
   from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#5  0x000007fedd1222ef in QGraphicsView::paintEvent(QPaintEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#6  0x000007fec1547ade in QgsLayoutView::paintEvent () at /__w/QGIS/QGIS/src/gui/layout/qgslayoutview.cpp:1144
#7  0x000007fedce37b90 in QWidget::event(QEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#8  0x000007fedcedac82 in QFrame::event(QEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#9  0x000007fee2e57dd1 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Core.dll
#10 0x000007fedcdf7d9e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#11 0x000007fecbf190a3 in QgsApplication::notify () at /__w/QGIS/QGIS/src/core/qgsapplication.cpp:580
#12 0x000007fee2e58078 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Core.dll
#13 0x000007fedce2f628 in QWidgetPrivate::sendPaintEvent(QRegion const&) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#14 0x000007fedce2fb42 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*,
QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#15 0x000007fedce313f2 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWi
dgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#16 0x000007fedce300a2 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*,
QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#17 0x000007fedce313f2 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWi
dgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#18 0x000007fedce300a2 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*,
QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#19 0x000007fedce313f2 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWi
dgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#20 0x000007fedce300a2 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*,
QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#21 0x000007fedce313f2 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWi
dgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#22 0x000007fedce3123f in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWi
dgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#23 0x000007fedce3123f in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWi
dgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#24 0x000007fedce300a2 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*,
QWidgetRepaintManager*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#25 0x000007fedce07e2c in QWidgetRepaintManager::paintAndFlush() () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#26 0x000007fedce38528 in QWidget::event(QEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll
#27 0x000007fedcdf7dae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from F:\QGIS\QGIS-Portable\bin\Qt5Widgets.dll

@agiudiceandrea agiudiceandrea removed the Feedback Waiting on the submitter for answers label Aug 3, 2023
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Oct 3, 2023
nyalldawson added a commit that referenced this issue Oct 3, 2023
qgis-bot pushed a commit that referenced this issue Oct 3, 2023
@nyalldawson
Copy link
Collaborator

Related to #52079

@nyalldawson
Copy link
Collaborator

Duplicate of #52079

@nyalldawson nyalldawson marked this as a duplicate of #52079 Oct 4, 2023
nyalldawson added a commit that referenced this issue Oct 6, 2023
nyalldawson added a commit that referenced this issue Oct 27, 2023
nyalldawson added a commit that referenced this issue Oct 28, 2023
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

3 participants