Hyrules / WinHue

Controlling the Philips Hue lighting system from your Windows PC.
http://hyrules.github.io/WinHue/
Other
185 stars 40 forks source link

Error while loading the hotkeys #132

Closed majsboll closed 6 years ago

majsboll commented 6 years ago

I am having problem with hotkeys. I can add them, and they work perfectly, but as soon as i restart the program, there is an error trying to load them at startup.

Added debug-log as attachment winhue-debug-error.txt

Hyrules commented 6 years ago

I will take a look at this asap.

majsboll commented 6 years ago

Great. Just let me know if I can help in any way troubleshooting this.

Hyrules commented 6 years ago

Can you send me your hotkey file ? I would like to see what you have set as hotkey. This will help me find the problem. The file is located in you appdata folder in the WinHue folder.

majsboll commented 6 years ago

Sure, attached... WinHueHotkeys.zip

(had to zip since github dont allow .set)

this one gives the same error: "Error while loading the hotkeys."

majsboll commented 6 years ago

the hotkeys loads fine as long as I dont have anything defined in "properties": { },

If I for example just have:

{ "listHotKeys": [ { "Modifier": 6, "Key": 36, "objecType": "WinHue3.Philips_Hue.HueObjects.LightObject.Light, WinHue3, Version=3.0.311.0, Culture=neutral, PublicKeyToken=null", "id": "11", "Name": "test", "Description": "test" } ] }

It loads fine (but ofcourse is pretty useless)

Hyrules commented 6 years ago

I can see the error. I can replicate it. but i'm still trying to figure out why it happens. I have some hotkeys as well but they don't cause a crash.

Hyrules commented 6 years ago

This version should fix this. The rule creator does not work by the way.

majsboll commented 6 years ago

Thanx for the update. It loads the hotkeys as it should and i can use them. Unfortunally, this version wont let me do any new hotkeys, as soon as I choose a light it crashes. I could do them manually editing in WinHueHotkeys.set with notepad and it loads up fint, but as soon as i edit och create a new hotkey action it crashes.

I have attached crashlog.

crash_log.txt

Hyrules commented 6 years ago

I see... I'll fix that. Be right back.

Hyrules commented 6 years ago

This should do it.

WinHue 3 RC 4 - 3.0.897.0 Setup.zip

majsboll commented 6 years ago

Just tried it and it still crashes... Really appreciate you taking time to try and solve this...

crash_log - 2.txt

Hyrules commented 6 years ago

the error here is not useful. I need to know what you try to do when it crash. Here I can edit, create hotkeys without any crashes.

majsboll commented 6 years ago

I try to create hotkeys, just like before. As soon as I choose a light or a scene, it crashes. Loading hotkeys seems to work fine.

I have tried with a fresh install but still same error.

crash

Hyrules commented 6 years ago

look like for some reason your version does not seems to be able to create the control for the xy value. You should see this. Notice the xy control in the xy_inc property.

image

majsboll commented 6 years ago

Thats strange...

I can try on another computer tomorrow running windows 10 (Iam running win7 on this one) and see if the problem is present on that system aswell...

Hyrules commented 6 years ago

I'll still try to fix this because If you have this chances are other are. I'll post another version here in a few. You can test it when you can.

Hyrules commented 6 years ago

Here is another one.

WinHue 3 RC 4 - 3.0.902.0 Setup.zip

majsboll commented 6 years ago

Okey, so it seems it still crashes on my main computer runnign windows 7. It crashes in the same way, so as soon as i choose a light, it crashes. I still dont see the dual lines for XY.

win7_crash

I just tried the same version on my windows 10 laptop, and there it works fine, with no crashes!

win10_ok

Let me know if and how I can gather more information for you.

Hyrules commented 6 years ago

First thing would be to check the version of .net framework you are running on your windows 7 pc. WinHue requires .net framework 4.5.1.

https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed

majsboll commented 6 years ago

Im running .NET Framework 4.7 framework

Hyrules commented 6 years ago

Indeed that's 4.7. if you select a light in the main view do you see the control ? it should show there as well.

majsboll commented 6 years ago

You mean if I see the X Y in main? If so, yes i do.. main_light_selected

Hyrules commented 6 years ago

No in the property grid. If you expand state you should see XY_INC and XY in the controls that crashes the hotkey editor.

majsboll commented 6 years ago

Hmm, if I try to expand the state it crashes crash

Hyrules commented 6 years ago

I think I know what happens. Try this one and let me know what happens.

WinHue 3 RC 4 - 3.0.927.0 Setup.zip

majsboll commented 6 years ago

YES! This version fixes it. Hotkeys works, and I can ecpand states.

Great work!

Hyrules commented 6 years ago

Thanks. After re-reading the error log you sent me that I was thinking not useful I finally understood what it meant. There was an error converting a value from a string to a decimal which could happen when you are in different language locale. For example with the number 105,7 which in some language can be also 105.7. Here in canada we use the dot symbol as separator the american for example uses the coma. That translated in an error on your side. I changed the string to a float value. more universal.

majsboll commented 6 years ago

Ah I see.

Well good work finding the error. I dont know how this works, but I guess you can close this ticket :)