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 crashes when undoing moving of elements in map layout #52740

Closed
2 tasks done
effjot opened this issue Apr 17, 2023 · 5 comments · Fixed by #54959
Closed
2 tasks done

QGIS crashes when undoing moving of elements in map layout #52740

effjot opened this issue Apr 17, 2023 · 5 comments · Fixed by #54959
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Feedback Waiting on the submitter for answers Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks

Comments

@effjot
Copy link

effjot commented Apr 17, 2023

What is the bug or the crash?

Bug report from crash dialog:

User Feedback

I have moved elements in the map layout (using cursor keys) and then pressed Undo (Ctrl Z).

Report Details

Python Stack Trace

Windows fatal exception: access violation

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

Stack Trace


QgsLayoutTable::rowsVisible :
QgsLayoutTable::rowRange :
QgsLayoutTable::render :
QgsLayoutFrame::draw :
QgsLayoutItem::paint :
QGraphicsScene::~QGraphicsScene :
QGraphicsScene::drawForeground :
QGraphicsScene::dragMoveEvent :
QGraphicsItem::dragMoveEvent :
QGraphicsEffectSource::draw :
QgsLayoutEffect::draw :
QGraphicsScene::drawItems :
QGraphicsScene::drawItems :
QGraphicsView::paintEvent :
QgsLayoutView::paintEvent :
QWidget::event :
QFrame::event :
QGraphicsView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::paintSiblingsRecursive :
QWidgetPrivate::drawWidget :
QWidgetPrivate::moveRect :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
QGraphicsScene::~QGraphicsScene :
QObject::event :
QGraphicsScene::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.28.5-Firenze
QGIS code revision: 50adba3
Compiled against Qt: 5.15.3
Running against Qt: 5.15.3
Compiled against GDAL: 3.6.3
Running against GDAL: 3.6.3

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

Steps to reproduce the issue

  1. Open a map layout.
  2. Move an element (seemed to happen when fixed tables and/or labels have been involved).
  3. Undo.

Happens not always but quite often. I think it is more likely when pressing the keys quickly. My layout is rather complex (atlas with several maps and labels/tables with expressions).

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS-Version 3.28.5-Firenze QGIS-Codeversion 50adba3
Qt-Version 5.15.3
Python-Version 3.9.5
GDAL-Version 3.6.3
PROJ-Version 9.2.0
EPSG-Registraturdatenbankversion v10.082 (2023-02-06)
GEOS-Version 3.11.2-CAPI-1.17.2
SQLite-Version 3.41.1
PDAL-Version 2.5.2
PostgreSQL-Client-Version unknown
SpatiaLite-Version 5.0.1
QWT-Version 6.1.6
QScintilla2-Version 2.13.1
BS-Version Windows 10 Version 2009
       
Aktive Python-Erweiterungen
address_search 0.1
pg_metadata 1.2.2-gci2
quick_map_services 0.19.33
SpreadsheetLayers 2.1.0-alpha1
db_manager 0.1.20
grassprovider 2.12.99
MetaSearch 0.3.6
processing 2.12.99
sagaprovider 2.12.99
QGIS-Version 3.28.5-Firenze QGIS-Codeversion [50adba3](https://github.com/qgis/QGIS/commit/50adba36f2) Qt-Version 5.15.3 Python-Version 3.9.5 GDAL-Version 3.6.3 PROJ-Version 9.2.0 EPSG-Registraturdatenbankversion v10.082 (2023-02-06) GEOS-Version 3.11.2-CAPI-1.17.2 SQLite-Version 3.41.1 PDAL-Version 2.5.2 PostgreSQL-Client-Version unknown SpatiaLite-Version 5.0.1 QWT-Version 6.1.6 QScintilla2-Version 2.13.1 BS-Version Windows 10 Version 2009

Aktive Python-Erweiterungen
address_search
0.1
pg_metadata
1.2.2-gci2
quick_map_services
0.19.33
SpreadsheetLayers
2.1.0-alpha1
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99
sagaprovider
2.12.99

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

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

I fail to reproduce in master. Could you share a sample project/data and tell what element you try to move

@effjot
Copy link
Author

effjot commented Jun 19, 2023

Thanks for having a look into it!

I’ll try to find a reproducible example. So far, the problem occured mostly on complex projects and semi-randomly (it seems to be more likely when working quickly, i.e. moving elements quickly and immediately undoing).

@troopa81 troopa81 added the Feedback Waiting on the submitter for answers label Jun 19, 2023
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 4, 2023
@effjot
Copy link
Author

effjot commented Jul 17, 2023

I didn’t manage to reproduce this with a simple project. The project where the undo issue happens is quite big and contains confidential data, so I cannot share it.
A simpler project derived from it also works nicely without the undo issue, so I guess the problem is that the project is just to big and complex.
Therefore, I think we can close this issue.

@effjot effjot closed this as completed Jul 17, 2023
@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 17, 2023
@troopa81 troopa81 reopened this Oct 17, 2023
@troopa81
Copy link
Contributor

I managed to reproduce the issue with the project from #52268 and the following steps

  1. Open the project in #
  2. Open layout
  3. Display it in full screen so the legend layer tree view is completely visible
  4. Copy paste the legend
  5. Edit the pasted legend
  6. Press quickly suppr, then Ctrl+Z
  7. Crash

I'm gonna propose a fix for this issue

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 Feedback Waiting on the submitter for answers Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants