-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 changing orientation of page in layout #46575
Comments
Confirmed. I was able to reproduce it following the steps provided. My console log:
|
@jgrocha That's weird because there is a sefaty in the function to prevent removing out of range index. See https://github.com/qgis/QGIS/blob/master/src/core/layout/qgslayoutmultiframe.cpp#L421 Could it be possible that the elements stored in |
Fix qgis#46575 QgsLayoutPageCollection::endPageSizeChange() calls attemptMove() which emits sizePositionChanged() which may delete frames inside QgsLayoutMultiFrame::recalculateFrameSizes(), so we check if the frame still exists before issuing endCommand() because endCommand() calls QgsLayoutItemUndoCommand::saveState() that ASSERT to have a valid item in the layout (but the item was deleted!). The change in src/core/layout/qgslayoutmultiframe.cpp suppresses a Qt warning when an invalid list index was used.
Fix #46575 QgsLayoutPageCollection::endPageSizeChange() calls attemptMove() which emits sizePositionChanged() which may delete frames inside QgsLayoutMultiFrame::recalculateFrameSizes(), so we check if the frame still exists before issuing endCommand() because endCommand() calls QgsLayoutItemUndoCommand::saveState() that ASSERT to have a valid item in the layout (but the item was deleted!). The change in src/core/layout/qgslayoutmultiframe.cpp suppresses a Qt warning when an invalid list index was used.
Fix #46575 QgsLayoutPageCollection::endPageSizeChange() calls attemptMove() which emits sizePositionChanged() which may delete frames inside QgsLayoutMultiFrame::recalculateFrameSizes(), so we check if the frame still exists before issuing endCommand() because endCommand() calls QgsLayoutItemUndoCommand::saveState() that ASSERT to have a valid item in the layout (but the item was deleted!). The change in src/core/layout/qgslayoutmultiframe.cpp suppresses a Qt warning when an invalid list index was used.
Fix #46575 QgsLayoutPageCollection::endPageSizeChange() calls attemptMove() which emits sizePositionChanged() which may delete frames inside QgsLayoutMultiFrame::recalculateFrameSizes(), so we check if the frame still exists before issuing endCommand() because endCommand() calls QgsLayoutItemUndoCommand::saveState() that ASSERT to have a valid item in the layout (but the item was deleted!). The change in src/core/layout/qgslayoutmultiframe.cpp suppresses a Qt warning when an invalid list index was used.
Fix #46575 QgsLayoutPageCollection::endPageSizeChange() calls attemptMove() which emits sizePositionChanged() which may delete frames inside QgsLayoutMultiFrame::recalculateFrameSizes(), so we check if the frame still exists before issuing endCommand() because endCommand() calls QgsLayoutItemUndoCommand::saveState() that ASSERT to have a valid item in the layout (but the item was deleted!). The change in src/core/layout/qgslayoutmultiframe.cpp suppresses a Qt warning when an invalid list index was used.
Fix #46575 QgsLayoutPageCollection::endPageSizeChange() calls attemptMove() which emits sizePositionChanged() which may delete frames inside QgsLayoutMultiFrame::recalculateFrameSizes(), so we check if the frame still exists before issuing endCommand() because endCommand() calls QgsLayoutItemUndoCommand::saveState() that ASSERT to have a valid item in the layout (but the item was deleted!). The change in src/core/layout/qgslayoutmultiframe.cpp suppresses a Qt warning when an invalid list index was used.
What is the bug or the crash?
the project in QGIS 3.22.1 crashes when in layout changing orientation of the page of map (first page) and length of attribute table (by filter) on the second page report_136.zip
Steps to reproduce the issue
1.Open the project tables_placement from geopackage.
• The project tables_placement has one layout: test with two pages:
• first page – map,
• Second page – table.
• The table has resize mode: repeat until finished
• The content of table changes depending on the orientation of the map by filter expression.
• The orientation of the map is determined by the variable @b.
2.Open the layout test: the map has ‘landscape’ orientation and the table is placed properly and is continued to the next pages (repeated until finished)
3.Change variable @b from ‘landscape’ to’ portrait’ and refresh layout:
CRASH!
Versions
QGIS 3.22.1
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: