These are chat archives for CoraleStudios/Colore

22nd
Oct 2015
Dariusz Niemczyk
@Palid
Oct 22 2015 12:48
@brandonscott for instance I have to surround all the set effects in try/catch block, because it can throw a native unhandled exception
I'll be releasing the shitty (I'm not a C# dev, it's really bad :D) code in a few days with comments in the code why it's not working and where is the problem.
there's also a problem with Color - Color.R/G/B return a 0-255 value, while constructor takes only 0-1 values. It gave me some headache.
Brandon Scott
@brandonscott
Oct 22 2015 12:49
Well yes, setting an effect than is interacting with the SDK
So an unhandled exception can be expected.
Dariusz Niemczyk
@Palid
Oct 22 2015 12:50
@brandonscott that's why I said that I can hardly debug it myself - I guess you guys are better in the SDK ;)
Brandon Scott
@brandonscott
Oct 22 2015 12:50
The exception will provide details to you
As to what the exception is
Dariusz Niemczyk
@Palid
Oct 22 2015 12:50
It provided 'native code' information.
nothing else, or I just can't use Visual Studio. ;)
Brandon Scott
@brandonscott
Oct 22 2015 12:50
Can you provide a stacktrace?
Color can take multiple constructors
Floats, Doubles, Bytes
etc
Dariusz Niemczyk
@Palid
Oct 22 2015 12:51
Sure, I'll do it when I replicate the error again (if there's any stacktrace at all - last time I just had [native code], my function, [native code] stack trace)
@brandonscott Yeah, but I'm talking more about it being inconsistent with it's returning values. It returns 0-255 value when asking for current RGB, but takes 0-1 value
and does weird magic when provided something higher - I was wondering for a longer while why my keys aren't getting darker, but are randomly flashing around haha
Brandon Scott
@brandonscott
Oct 22 2015 12:54
RGB values are returned from the object as byte
Dariusz Niemczyk
@Palid
Oct 22 2015 12:56
@brandonscott I'm not talking about types, I'm talking about possible values ;)
when you do it as byte it also takes 0-1 range
Adam Hellberg
@Sharparam
Oct 22 2015 15:15
http://coralestudios.github.io/Colore/docs/struct_corale_1_1_colore_1_1_core_1_1_color.html this page has all possible constructors for color. If it's invoking the float or double constructor it means your are passing floating point values to one or more of the constructor parameters.
@Palid ^
Nico
@njbmartin
Oct 22 2015 15:32
@palid I would imagine the issue is more how you are casting the RGB values when setting the color
This message was deleted
Dariusz Niemczyk
@Palid
Oct 22 2015 18:47
If you do a long-running animation for keyboard.Instance.setGrid() without using Clear method, the leds crashes and you have to replug (restart doesn't have). I suppose the same thing goes for other animations (that may be the reason I have these try-catches).
OSSing the code right now.
Brandon Scott
@brandonscott
Oct 22 2015 18:48
How long is "long running"?
Dariusz Niemczyk
@Palid
Oct 22 2015 18:50
~~10-20seconds, changes every 125ms
lemme count.
counted 25s.
Brandon Scott
@brandonscott
Oct 22 2015 18:51
Does it crash with an error?
Dariusz Niemczyk
@Palid
Oct 22 2015 18:52
after another 10 to 20seconds it throws an error
sec, pasting stack
'very helpful'
here's the repo
compile&click fail button
I know that the code sucks, sorry. :D
I can't get used to non-dynamic objects without duck typing
@brandonscott ^
if you add keyboard.Clear(); in line 195, the animation's going to freak out but it won't crash after those 20something seconds
also, if you can point me to tutorials/docs/anything that can tell me how to rewrite this piece of crap to something better, I'd be grateful. ;)
Adam Hellberg
@Sharparam
Oct 22 2015 18:59
The code referenced in the StackTrace does not exist in the linked repo (Game.failAnimationFrame)
Dariusz Niemczyk
@Palid
Oct 22 2015 18:59
Wait, maybe I didn't push.
Sec.
Yep, didn't push. Sorry.
@Sharparam try now
love you guys for this reaction time. ;)
using SDK 0.4.8, that's probably pretty important info.
And 64bit windows 10.
Adam Hellberg
@Sharparam
Oct 22 2015 19:33
@Palid Pressing the "Show Fail" button starts the effect and no exception is thrown. Windows 8.1 64-bit running through VS 2013 Ultimate
@Palid Can you try snake (http://rzr.to/snakeapp) and see if that works properly?
Dariusz Niemczyk
@Palid
Oct 22 2015 19:37
@Sharparam even after extended time/
Brandon Scott
@brandonscott
Oct 22 2015 19:37
Just try playing the game
For like 2 minutes
Because that uses a custom effect
Adam Hellberg
@Sharparam
Oct 22 2015 19:37
@Palid ran it for over 2 minutes and no issue
Dariusz Niemczyk
@Palid
Oct 22 2015 19:40
no issue with snake
and now I started my code and it crashed almost instantly.
What the heck.
Brandon Scott
@brandonscott
Oct 22 2015 19:41
The difference between those is WinForms and WPF.
I am unsure what, if any, the issue is.
But can you test a simplified version in WPF?
Dariusz Niemczyk
@Palid
Oct 22 2015 19:41
@brandonscott Sure.
Dariusz Niemczyk
@Palid
Oct 22 2015 19:46
Same code, using WPF instead of WinForms. Same problem.
sec, I'll post it to github,.
I turned off synapse. It doesn't crash anymore (even though current SDK allows using synapse at the same time!)...
@brandonscott you're closer the the razer guys, aren't you? Can you report the problem to the SDK devs? It looks like it's certainly a problem with SDK screwing up with Synapse on in certain cases.
Adam Hellberg
@Sharparam
Oct 22 2015 19:50
@Palid brandon went to grab some food, he'll be back in a bit
Dariusz Niemczyk
@Palid
Oct 22 2015 19:51
No problem, I really appreciate what you guys do and sorry if I'm an annoying bother ;)
Adam Hellberg
@Sharparam
Oct 22 2015 19:51
nothing annoying :P
we're here to help ^^
Dariusz Niemczyk
@Palid
Oct 22 2015 19:52
also, @brandonscott: any chances for opesourcing the snake?
there have been a few requests for that in the thread (including mine)
Adam Hellberg
@Sharparam
Oct 22 2015 19:57
@Palid also note that it's still recommended to close synapse when running apps, it's not guaranteed to work in tandem with apps (this is also especially true if synapse is running the chroma configurator profiles)
they are working to make it a seamless integration in the future
Dariusz Niemczyk
@Palid
Oct 22 2015 19:58
Yeah, I just learned it the hard way.