These are chat archives for CoraleStudios/Colore

Dec 2015
Roxas Keyheart
Dec 02 2015 04:53
So I tried to adapt the transition code you guys wrote for me to be in a constant loop (ie. scroll to color 1, scroll to color 2, repeat), however I'm getting some weird errors appearing. These errors don't exactly stop the effect from working, however after a few loops of the cycle the app crashes. I'm running the effect in a new thread as to not interrupt the main program.

Errors that appear in the debugger:

Call to native Chroma SDK function DeleteEffect failed with error: Unknown: Unknown. (1168)
Call to native Chroma SDK function SetEffect failed with error: Unknown: Unknown. (1168)

Adam Hellberg
Dec 02 2015 06:28
according to MSDN
Damn enter
According to MSDN that error is:
1168 (0x490)

Element not found.
Ryan Hill
Dec 02 2015 06:29
Adam Hellberg
Dec 02 2015 06:29
Trying to format messages in Gitter on phone is annoying
IIRC someone (Brandon?) had a similar error with multi-threading, starting to wonder if the SDK has some kind of issue with multiple threads.
What happens if you init on the same thread updates are made in?
Roxas Keyheart
Dec 02 2015 07:41
@Sharparam The loops runs fine on the same thread, although it obviously locks it up to only running the loop.
So its probably multithreading which is the problem.
Adam Hellberg
Dec 02 2015 08:01
@technicaldaniel and it also works when both init and updates are done on the other thread?
Roxas Keyheart
Dec 02 2015 08:05
@Sharparam I would assume so however it's difficult to test due to the sheer amount of Colore calls in my code.
Dec 02 2015 08:52
@Sharparam, @technicaldaniel I had issues with multithreading, too. I also have the feeling if you call the SDK at the same time from two different threads that can cause issues and throw exceptions. I have a Helper method in my code that does all the Colore work and locks around it. Never had any issues afterwards.
Roxas Keyheart
Dec 02 2015 08:56
Can you guys think of a work around without using threads?
Adam Hellberg
Dec 02 2015 09:12
Possibly, but if the SDK itself doesn't support multi-threading our options are limited but it should be possible by using more locking (like we are currently doing in the initialize functions)
Locking does incur a performance cost as well but it might be negligible
Dec 02 2015 20:47
Agreed with Adrian there, also making use of locking around certain tasks
Also if you're doing a while loop for animations, you'll need to throttle it to about 24 miliseconds