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

ctrl-c with no selection - Bad state for CUT callback in SelectionManager #261

Closed
leegrey opened this issue Mar 29, 2015 · 3 comments
Closed
Labels

Comments

@leegrey
Copy link
Contributor

leegrey commented Mar 29, 2015

Here's a little bug I encountered early on.

To reproduce, just open the desktop build, and hit ctrl-c without doing anything else. You will go straight to the node-webkit crash screen, with the message, "Uncaught node.js Error. Bad state for CUT callback in SelectionManager". If you draw on the canvas and then hit ctrl-c without a selection, you get the "Your piskel seems to have unsaved changes..." message. If you select ok, it will crash in the same way.

Ctrl-c works fine if you have a selection, but crashes without one. Maybe just don't throw an error in SelectionManager?

By the way, I noticed that the node-webkit version defined in package.json is v~0.10.1, which is a bit behind. It might be safe enough to say "latest"?

@juliandescottes
Copy link
Collaborator

Thanks for the report !

Looks like every uncaught exception leads to this in node-webkit. I will review the rest of the project and will swap exceptions for error logs.

@leegrey
Copy link
Contributor Author

leegrey commented Apr 3, 2015

I'm not completely sure about this, but can you use process.on('uncaughtException') to create a generic exception handler? Then you could just log it from there.

https://nodejs.org/api/process.html

juliandescottes added a commit that referenced this issue Apr 13, 2015
…dewebkit

#261 replaced throw by console.error for recoverable errors
@juliandescottes
Copy link
Collaborator

Moved all non critical errors to console.error for now. Should reduce the amount of crashes for desktop

Will be released for v0.5.0

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

2 participants