Skip to content

Crash when undoing the drop of a layer after being deleted #4858

@sentry

Description

@sentry

Sentry Issue: ASEPRITE-2QT

EXCEPTION_ACCESS_VIOLATION_READ / 0xb6: Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ / 0xb6
  File "xutility", line 5987, in std::_Find_unchecked
    const auto _Result    = _STD _Find_vectorized(_First_ptr, _STD _To_address(_Last), _Val);
  File "xutility", line 6024, in std::find
    _STD _Seek_wrapped(_First, _STD _Find_unchecked(_STD _Get_unwrapped(_First), _STD _Get_unwrapped(_Last), _Val));
  File "layer.cpp", line 57, in doc::Layer::getPrevious
    std::find(m_parent->layers().begin(),
  File "drop_on_timeline.cpp", line 237, in app::cmd::DropOnTimeline::onUndo
    layerBefore = layer->getPrevious();
  File "cmd.cpp", line 52, in app::Cmd::undo
    onUndo();
...
(20 additional frame(s) were not displayed)

Been able to reproduce this as follows:

  1. ✨ Create a new file
  2. ✨ Drop a png or jpg file at the bottom of the "Layer 1".
  3. ✨ Delete the layer that was just created because of the drop.
  4. ✨ Undo the deletion.
  5. 💥 Try to undo the drop. You can't, it crashes.

Metadata

Metadata

Assignees

Labels

crash reportIssue originated from a crash report / .dmp file

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions