# Crash on undo cut polyline

**URL:** https://discourse.gplates.org/t/crash-on-undo-cut-polyline/446
**Category:** Bug Reports
**Created:** [12 December 2021 09:39 UTC](https://discourse.gplates.org/t/crash-on-undo-cut-polyline/446 "2021-12-12T09:39:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Robbie](https://discourse.gplates.org/user_avatar/discourse.gplates.org/robbie/32/47_2.png) [@Robbie](https://discourse.gplates.org/u/Robbie)
#### Post date: [12 December 2021 09:39 UTC](https://discourse.gplates.org/t/crash-on-undo-cut-polyline/446/1 "2021-12-12T09:39:38Z")

</div>

I cut a polyline in the wrong spot, instinctively pressed Ctrl-z to undo it, and GPlates crashed. I was able to replicate this with both my main project and in GDB.

Version: GPlates 2.3.0  
OS: Linux x86-64

Steps to reproduce:

1. Draw a polyline
2. Cut it anywhere
3. Press ctrl-z to undo the cut

Expected result: line should be reverted to pre-cut state

---

<div class="post-metadata">

### Author: ![john.cannon](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/j/3e96dc/32.png) [@john.cannon](https://discourse.gplates.org/u/john.cannon)
#### Post date: [14 December 2021 04:32 UTC](https://discourse.gplates.org/t/crash-on-undo-cut-polyline/446/2 "2021-12-14T04:32:23Z")

</div>

Hi Robbie,

Thanks for reporting that, I can confirm the crash.

Undo-redo is not yet implemented outside of digitizing a _new_ feature. In other words, it doesn’t work when modifying an _existing_ feature. I think Split Feature is one of the exceptions (unlike Move Vertex, etc, which don’t allow _undo_ing) but it’s currently flakey so I’ve disabled it’s _undo_ just now (you’ll still be able to split a feature, just won’t be able to undo it).

There are plans to implement undo-redo (for _existing_ features) once the internal model changes (that were necessary to birth pyGPlates) are integrated back into GPlates. However it’s fairly low priority at this stage.

---

<div class="post-metadata">

### Author: ![Robbie](https://discourse.gplates.org/user_avatar/discourse.gplates.org/robbie/32/47_2.png) [@Robbie](https://discourse.gplates.org/u/Robbie)
#### Post date: [19 December 2021 23:56 UTC](https://discourse.gplates.org/t/crash-on-undo-cut-polyline/446/3 "2021-12-19T23:56:42Z")

</div>

Are there plans to implement a universal undo/redo, and what would be required to maintain an internal undo tree for a given session?

Most operations cannot be undone, although Split Feature is the only one that results in a crash as far as I can tell. It would be immensely useful to be able to arbitrarily undo and redo various operations and feature modifications.

---

<div class="post-metadata">

### Author: ![john.cannon](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/j/3e96dc/32.png) [@john.cannon](https://discourse.gplates.org/u/john.cannon)
#### Post date: [20 December 2021 13:52 UTC](https://discourse.gplates.org/t/crash-on-undo-cut-polyline/446/4 "2021-12-20T13:52:49Z")

</div>

Yes, we plan to implement undo/redo (in fact it is being worked on as a low priority background task). As I mentioned it’s a matter of integrating the internal model versioning changes made for pyGPlates back into GPlates. It’s not trivial though, and it’s low priority because users can use the `reload` button (in `Manage Feature Collections` dialog) to undo changes (although understandably it’s much better to have proper undo/redo).
