-
Notifications
You must be signed in to change notification settings - Fork 272
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 undoing after layer deletion #1412
Comments
Undoing a layer deletion is not supported currently, regardless of what its contents are. What you are probably doing is attempting to undo the image import which crashes because the layer no longer exists. I thought there was an issue for this already but I can't seem to find it at the moment. I've been aware of it for a long time and it will be fixed with #953. This has nothing to do with the movie video import.
Yes. You must use the Movie Audio import separately to import the audio. |
No. I imported a movie video to the default layer (it played OK on the timeline) and after that I deleted that specific layer and tried to undo it, which crashed pencil2d 👍 EDITED: |
Think of it this way. There is a stack with all the undoable actions. When you start a new file it is empty. When you import a movie, it adds many actions to the stack. If for instance the video is a total of 4 frames in length, the stack would look like this:
Now you delete a layer. Since deleting a layer is not an undoable action, it is not added to the stack. Now you hit the undo action. It finds the last undoable action, which in this case is "Insert image of Frame 4 of Layer 1", and attempts to undo it. It does this by reverting Frame 4 on Layer 1 to what it was before the image was added. However, Layer 1 no longer exists, so it doesn't know how to modify that frame and it crashes. The same bug can be reproduced by drawing something on the bitmap layer (rather than using the movie import), deleting it, and then undoing. |
@scribblemaniac |
Issue Summary
I imported a new Movie Video and deleted its layer after that, and when I tried to UNDO it to have the layer back pencil2D closed without warning
Steps to reproduce
Remember not to click any where besides the steps mentioned here, otherwise the issue will not show
File > Import > Movie Video > (I selected a 850kb MP4 movie video with sound). After imported successfully, go to Layers and delete the bitmap layer (which contains the movie video), and then click UNDO
One Note:
When importing a Movie Video, it will not import its audio. Is this intentional?
System Information
Pencil2D Version:
Last stable version v.0.6.5
Operating System:
Windows 10
RAM Size:
32GB
Graphics Tablet:
HUION HD 185
The text was updated successfully, but these errors were encountered: