PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Color Picker Custom format name crash

Open arvidkarlsson opened this issue 2 years ago • 4 comments

Microsoft PowerToys version

0.65.0

Installation method

PowerToys auto-update, WinGet

Running as admin

No

Area(s) with issue?

ColorPicker

Steps to reproduce

  1. Create custom format and name somthing. I named it Test and made it in format #RrXGgXBbX
  2. Rename it to HEX
  3. PowerToys closes
  4. I try to redo but another name (HEX (#)) but it closes again.
  5. Now I it's crashing when I try to acces the Color Picker page in the settings. I can still use the picker image

✔️ Expected Behavior

Not Crash

❌ Actual Behavior

PowerToys crashes when I go to the Color Picker settings page.

Other Software

No response

arvidkarlsson avatar Dec 07 '22 09:12 arvidkarlsson

/bugreport

jaimecbernardo avatar Dec 07 '22 11:12 jaimecbernardo

Hi there!

We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!
Report Bug

ghost avatar Dec 07 '22 11:12 ghost

Hi @arvidkarlsson! Thanks for finding this issue! Whit custom color formats the idea is that the name identifies the color format. Therefore it should be unique and a not empty string. You proved, that the code wasn't good enough to prevent the user to create 'bad' color formats (with name empty or duplicated). Thanks for that! The provided fixes should fix this and also loading of such a settings file should be possible (those color fomats with wrong names present in the settings file will be skipped). I suppose you managed to fix your settings, but if not, plese find the settings.json file, it should be in the directory c:\Users\ \AppData\Local\Microsoft\PowerToys\ColorPicker, and edit it with any text editor or delete it if you don't mind to start next time with a default setting. Best regards, Laszlo

donlaci avatar Dec 07 '22 16:12 donlaci

Hi, I am not sure if the fix covered it, but I just came across a different issue similar to this one. I created a format named "rgba" and later decided I wanted to have the name uppercase. So I went to edit the format, but as soon as I typed the "B" in "RGB" (without saving), the app would crash. I got around it by typing "RGA" and then putting the "B" in place later. I suppose it has something to do with a clash with the "RGB" default format. However, this crashes the app before you can add anything else, so giving a format a name that would start with a name of an already existing format crashes it.

Pandicon avatar Dec 31 '22 16:12 Pandicon

@Pandicon Does this still happen with the latest version of PowerToys? /needinfo

stefansjfw avatar Jul 25 '23 13:07 stefansjfw

Nope, since at least 0.70 in case of a name conflict it just doesn't let me save the format, which is something I would expect.

Pandicon avatar Jul 25 '23 14:07 Pandicon

Thanks for quick confirmation

stefansjfw avatar Jul 25 '23 14:07 stefansjfw

This is already fixed and available since PowerToys v0.70.0

stefansjfw avatar Jul 25 '23 14:07 stefansjfw