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

Sketch crashes after deleting all States in an Artboard #15

Closed
alienresident opened this issue Aug 8, 2016 · 10 comments
Closed

Sketch crashes after deleting all States in an Artboard #15

alienresident opened this issue Aug 8, 2016 · 10 comments
Assignees
Labels

Comments

@alienresident
Copy link

alienresident commented Aug 8, 2016

Hi,

Great Plugin!

I found a bug that causes Sketch to crash. If I duplicate an Artboard with States, then select all of the States and delete them, Sketch deletes them but then crashes.

If I select all but one and delete them it's fine.

States-Crash.txt

Attaching Crash log.

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: self.defaultState == nil'

Thanks,
Mark

@rodionovd rodionovd added the bug label Aug 9, 2016
@rodionovd
Copy link
Contributor

rodionovd commented Aug 9, 2016

Hi @alienresident! Thanks for you report — we'll look into it and fix as soon as possible.

@rodionovd rodionovd self-assigned this Aug 9, 2016
@rodionovd
Copy link
Contributor

rodionovd commented Aug 9, 2016

I can't reproduce this issue locally for some reason. When I select all states (by pressing cmd+A) it selects all of them, then when I click Delete in the context menu it prompts me with an alert listing all of the states I've selected but the Initial State is not in this list (since, well, you shouldn't be able to remove the default state). Does it work the same way for you?

Also, do you happen to be using the latest States version 0.99? (You can check your plugins versions by going to Plugins > Manage Plugins… menu in Sketch)

@edenvidal
Copy link
Owner

Tried to go through this process for a few times and don't get the bug you
are describing. Am I missing something? (:

On Tue, Aug 9, 2016 at 8:26 AM, Dmitry Rodionov [email protected]
wrote:

I can't reproduce this issue locally for some reason. When I select all
states (by pressing cmd+A) it selects all of them, then when I click Delete
in the context menu it prompts me with an alert listing all of the states
I've selected but the Initial State is not in this list (since, well, you
shouldn't be able to remove the default state). Does it works the same way
for you?

Also, do you happen to be using the latest States version 0.99? (You can
check your plugins versions by going to Plugins > Manage Plugins… menu in
Sketch)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#15 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMzAeGTacLxAhou0STNHYEr_1AOqMo56ks5qeA9-gaJpZM4JfWso
.

Eden Vidal
edenvidal.com

@alienresident
Copy link
Author

I updated to 0.99 (from 0.98) and it's not crashing anymore!
Thanks,
Mark

@alienresident
Copy link
Author

Actually it still crashes. 0.99

I renamed the initial state to 'start' not sure if that is an issue.

  1. Add Artboard
  2. Create various layers and states
  3. Duplicate Artboard
  4. Delete All States (shift click or CMD + A; Right click on delete; Select OK on Popup)
  5. Sketch Crashes after you try to do something else!

Note: the States list is now empty!

I tested this with a new file and it also crashed!

screenshot 2016-08-09 14 03 25

@rodionovd
Copy link
Contributor

@alienresident you're right: when I rename the default state to smth like "Start" I experience the same crash as you do. That's definitely a bug and we'll fix it as soon as possible now since it's 100% reproducible.

@rodionovd
Copy link
Contributor

@alienresident please check out the attached version — it should fix the issue you have with renaming the default state.

States.sketchplugin.0.991-debug-alienresident.zip

@rodionovd
Copy link
Contributor

rodionovd commented Aug 16, 2016

@alienresident I'm closing this issue for now since I've pushed this fix into production (https://github.com/edenvidal/States/releases/tag/v1.0.0) — but you’re always welcome to re-open it if the same crash still happens for you.

@alienresident
Copy link
Author

@rodionovd sorry I never got back to you. I tested the patch and Sketch no longer crashes!
Thanks,
Mark

@rodionovd
Copy link
Contributor

@alienresident awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants