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

Invalid Color Palette value crashes application #717

Closed
jboullion opened this issue Jun 28, 2017 · 6 comments
Closed

Invalid Color Palette value crashes application #717

jboullion opened this issue Jun 28, 2017 · 6 comments

Comments

@jboullion
Copy link

This bug will crash the application for every image in your gallery because the palette tied to your profile is the cause of the issue.

When this error occurs the app is not functional. No buttons work. Screenshot below, including console error log.

Steps to reproduce the bug

  1. go to piskelapp.com
  2. create a new pallette
  3. Copy in a hex value, with possibly incorrect characters ('#','!' Unable to tell for sure what the character is because I cannot access my pallettes or any of my gallery)
  4. Or possibly enter an incorrect RGB value. I am not exactly sure.

Environment details

  • operating system: Windows 10 Chrome Latest
  • browser

Sprite details

  • 3
  • 64x64
  • ~1 hour

capture

@juliandescottes
Copy link
Collaborator

Thanks for the report!
For information, palettes are only stored in your browser, so if you use another browser or use private navigation, you should be able to access your editor again.

You can check the current content of your palettes by running:

console.log(localStorage.getItem('piskel.palettes'))

in the console. Could you attach the result here?

@juliandescottes
Copy link
Collaborator

@jboullion did you import any palette or did you create them all by hand ?

@jboullion
Copy link
Author

Console Prints: [{"id":"dec40105-08dd-e5c2-4ed8-1ced6f5bb790","name":"James Pallette","colors":["#000000","#3161a1","#ffecdb","#fec6ab","#fb6d59",null]}]

I was copying and pasting from another application. I forget which, another painting program, I was using a bunch of new ones that night to test them out.

Using another browser / incognito works great :).

capture

@juliandescottes
Copy link
Collaborator

Thanks for checking! Still not sure how this palette managed to get a 'null' entry in the list of colors but I will at least make sure we don't crash in case it happens.

In the meantime, if you want to reuse your original browser, you can delete this palette by

  1. executing localStorage.clearItem('piskel.palettes') in the console
  2. reloading the page

You will lose all your saved palettes, though.

I was copying and pasting from another application

So you mean you were pasting in the input of the palette creation screen (the one highlighted in the screenshot below) ?

image

@jboullion
Copy link
Author

Yes, that is exactly right. I was copying from the hex code color palette in other photo editors an dthen pasting into that field.

Doh! Uncaught TypeError: localStorage.clearItem is not a function
at :1:14

localstorage

@juliandescottes
Copy link
Collaborator

oops sorry that's localStorage.removeItem('piskel.palettes') :)

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

No branches or pull requests

2 participants