pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.45k stars 272 forks source link

Consistent crashing creating new file after using Pegbar Alignment under specific conditions #1428

Closed Jose-Moreno closed 4 years ago

Jose-Moreno commented 4 years ago

Issue Summary

Pencil2D crashes once you use the pegbar alignment feature within a file that has at least 2 new layers of the same type (bitmap). For this crash to be reproducible you must create a new bitmap layer by hand or use another feature that automatically creates a new layer (such as the Image Predefined Set, see extra video below)

I believe this could also be tangentially related to the layer naming mismatch problem as reported here: #1414

Expected Results

Pencil2D should not crash when using the pegbar alignment feature nor after creating a new file for any reason.

Video or Image Reference

Minimum reproduction steps. https://youtu.be/PjbLtdR-C2I

Pencil2D Crashing after importing with Image Predefined Set and using the Pegbar alignment feature. https://youtu.be/V7ctw3lN0tQ

Steps to reproduce

  1. Create new file
  2. Create a new bitmap layer
  3. Go to Edit > Pegbar Alignment > a dialog will open
  4. Close the dialog immediately
  5. Go to File > New
  6. Silent crash

System Information

commit: 50a0c7c318f38988af85d34e955a5a78d3953474 date: 2020-08-01_01:32:15

Operating System: Windows 10 (10.0) CPU Architecture: x86_64 Qt Version: 5.12.9

davidlamhauge commented 4 years ago

I looked into this yesterday, and there is a fairly simple solution, so I've assigned my self. The problem is to close the dialog properly.