Bug report #11371

Map Composer: group + move + ungroup + undo = crash

Added by Roy Roge over 4 years ago. Updated almost 3 years ago.

Status:Closed
Priority:High
Assignee:Sandro Santilli
Category:Map Composer/Printing
Affected QGIS version:2.14.3 Regression?:No
Operating System:Windows , Linux Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:Yes

Description

Using the map composer add two rectangles,
group them, move the grouped, ungroup them,
click the undo arrow, you get the program to crash,

thanks,

Roy.


Related issues

Related to QGIS Application - Bug report #11351: [composer] combinations of frame/multiframe undo/redo cra... Closed 2014-10-08

Associated revisions

Revision a211c982
Added by Sandro Santilli almost 3 years ago

Allow to undo/redo composer grouping/ungrouping

Fixes #11371 (crash on ungrouping after moving the group) and more
undo/redo related issues.

Enable pending test for the crash (now passing) and add many more
undo/redo related ones (including signals testing).

Includes a new QgsGroupUngroupItemsCommand class
and its SIP bindings.

Revision df8dca2e
Added by Sandro Santilli almost 3 years ago

Fix crash in composer on ungrouping after group move.

Closes #11371.

Adds support for undo/redo grouping/ungrouping operations.

Enable pending test for the crash (now passing) and add many more
undo/redo related ones (including signals testing).

Includes a new QgsGroupUngroupItemsCommand class
and its SIP bindings.

History

#1 Updated by Giovanni Manghi over 4 years ago

  • Priority changed from High to Severe/Regression

on qgis 2.4 seems ok. Crash confirmed on master.

#2 Updated by Nyall Dawson over 4 years ago

  • Priority changed from Severe/Regression to High

Actually 2.4 and below are affected too, so reducing this from a blocker to high. It's a serious issue though.

#3 Updated by Sandro Santilli about 3 years ago

  • Status changed from Open to Feedback

I cannot reproduce on current master (2.14-pre, 69cb0c4ed3174946c82e32dad4af5a12275079fc) -- can anyone ?

#4 Updated by Nyall Dawson about 3 years ago

  • Status changed from Feedback to Open

Still present. I can't fix this one without major api breaks.

#5 Updated by Sandro Santilli almost 3 years ago

I still cannot reproduce with 2.16-dev d1cac84, how do you "group"/"ungroup" ? I'm using the "select/move" tool for that, clicking outside the group to "ungroup", but I suspect it's not what you mean...

#6 Updated by Sandro Santilli almost 3 years ago

Ah, found the "group" and "ungroup" button, crash reproduced in d1cac842d323ffb13a606e8d598dd0d8af4ade72 (2.16-dev).

#7 Updated by Sandro Santilli almost 3 years ago

  • Operating System changed from windows linux to Windows , Linux
  • Affected QGIS version changed from master to 2.14.3
  • Target version set to Version 2.14
  • Assignee set to Sandro Santilli
  • Status changed from Open to In Progress

Also happens with 2.14.3 LTR

#8 Updated by Sandro Santilli almost 3 years ago

For the record: this ticket already has an ecoded test, just #if-0'ed out, in tests/src/core/testqgscomposergroup.cpp

#9 Updated by Sandro Santilli almost 3 years ago

The problem is that an object (the group) is removed while it would be needed to undo the grouping itself.
Besides, the group-move is not pushed to the undo stack so a quick fix of the crash done by avoiding the destruction of the group results in undo operation never undoing a grouping or ungrouping.

#10 Updated by Sandro Santilli almost 3 years ago

I've started work on this here: https://github.com/qgis/QGIS/pull/3190

#11 Updated by Sandro Santilli almost 3 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • % Done changed from 0 to 80

PR is ready for test. Roy: could you test ? Nyall: could you review ?

#12 Updated by Sandro Santilli almost 3 years ago

  • Status changed from In Progress to Closed

#13 Updated by Sandro Santilli almost 3 years ago

  • Status changed from Closed to Reopened

Reopened to backport to 2.14 (fix so far was only gone to master aka 2.15.0dev)

#14 Updated by Sandro Santilli almost 3 years ago

  • Status changed from Reopened to Closed

#15 Updated by Roy Roge almost 3 years ago

  • % Done changed from 80 to 100

Sandro Santilli wrote:

PR is ready for test. Roy: could you test ?

Thanks Sandro, I tesded both 2.15 and 2.14 nightly
and cannot reproduce the crash, so it's working properly
Roy.

Also available in: Atom PDF