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

Pencil2D crashes when drawing on vector layer under specific conditions #1096

Closed
Jose-Moreno opened this Issue Oct 6, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@Jose-Moreno
Copy link
Member

Jose-Moreno commented Oct 6, 2018

Issue Summary

Okay! I found another crash inducing bug that happens when you delete a camera layer making it so that the current active layer is of vector type. After drawing on the vector layer AND undoing the stroke Pencil2D will crash.

Expected Results

Pencil2D should not crash under any circumstance (hopefully)

Steps to reproduce

Follow along with the attached PCLX file:
vector_layer_Drawing_crash_test_file.zip

  1. Open the provided PCLX file.
  2. Select the bottom-most camera layer and delete it.
  3. If you don't have a drawing tool selected already, select one, either pencil or pen will work.
  4. Make a stroke.
  5. Undo that stroke.
  6. Crash.

Note: I believe this happens because the vector layer becomes active and not because of having 2 cameras otherwise the other layers would crash too (I tested with bitmap layers, and it worked fine, but I have to test with sound layers import though..)

System Information

  • Pencil2D Version:

Version: 0.6.2
commit: ecbe853
date: 2018-10-05_13:12:56
Development build
Operating System: Windows 7 SP 1 (6.1)
CPU Architecture: x86_64

@scribblemaniac

This comment has been minimized.

Copy link
Member

scribblemaniac commented Oct 6, 2018

The pencil/pen tools do not draw properly for me with a mouse when I get to step 4. Can reproduce stroke on macOS 10.13.

The issue has to do with not everything getting updated properly when a non-last layer is deleted because the layer id stays the same and the managers are not notified of the change. I have a fix for this, but I don't really like it. Some refactoring should be done instead to, among other things, remove mCurrentLayerIndex from editor.

@chchwy

This comment has been minimized.

Copy link
Member

chchwy commented Oct 7, 2018

Just a note, will have to refactor the view manager if you want to remove mCurrentLayerIndex from editor.

@scribblemaniac

This comment has been minimized.

Copy link
Member

scribblemaniac commented Oct 7, 2018

I have pushed a quick fix to solve this issue so that the we can release it along with the other critical fixes as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.