These are chat archives for CoraleStudios/Colore

10th
Mar 2018
cindylove
@cindylove
Mar 10 2018 14:06
Hello, i do have a question about "Uninitialize()". When I start my Application, i can instantiate Chroma via "Corale.Colore.Core.Chroma.Instance;" Instance delivers "IChroma". But when is use "Uninitialize()" I am not able to get another Instance back after this. So "Corale.Colore.Core.Chroma.Instance;" delivers an object, but when I want to use it, i receive the following error message "The group or resource is not in the correct state to perform the requested operation".
What I want to do: I want to use custom styles while running certain programms. As soon as these programms stop, I want the default set (whatever the user has configured in his chroma settings from razer). At the moment my application is searching for different programms so i dont want to restart my application every time i close a programm and start another one. Any Ideas?
Adam Hellberg
@Sharparam
Mar 10 2018 15:41
@cindylove i'm not sure what state the Chroma SDK is in regarding initializing/uninitializing without closing the executable using the SDK. calling uninitialize should return control to Synapse if no other custom chroma apps are running
at one point there was a bug in the SDK from Razer where it wouldn't relinquish control unless the application actually terminated, but i thought they pushed a fix for that
cindylove
@cindylove
Mar 10 2018 16:07
So this is a Bug/Problem in the SDK from Razer and not in the Colore Library?
Adam Hellberg
@Sharparam
Mar 10 2018 16:08
it might be, i don't remember what the final answer from razer was
calling Uninitialize in Colore will call the UnInit function in the SDK, and beyond that we can't do much else
the AnyCPU version of Colore will also unload the native library, so if you're currently using the x86 or x64 build, you can try using the AnyCPU build to see if that solves it (if you're using Colore from NuGet, you are already using the AnyCPU version)
cindylove
@cindylove
Mar 10 2018 16:10
I am using the NuGet Version
Adam Hellberg
@Sharparam
Mar 10 2018 16:10
then it might be the SDK refuses to take back control until the app actually exits
cindylove
@cindylove
Mar 10 2018 16:11
This looks like the problem at the moment.
Too bad, this means i have to close my application befor i can use the sdk again.
Adam Hellberg
@Sharparam
Mar 10 2018 16:12
if you want it to return to Synapse effects, yeah
i don't think Razer anticipated background apps when they designed the sdk
cindylove
@cindylove
Mar 10 2018 16:13
Probably not. I guess I have to try and ask there
cindylove
@cindylove
Mar 10 2018 16:22
Do you think it is possible that there might be a bug(error) in your library? Like in the background there are not all parameters correct? For example you erase some, but forget to reset the default?
Adam Hellberg
@Sharparam
Mar 10 2018 16:24
if you call Uninitialize then it calls UnInit in the SDK, so i don't think there's a bug in that particular part
cindylove
@cindylove
Mar 10 2018 16:24
Okay, thanks
Adam Hellberg
@Sharparam
Mar 10 2018 16:25
i have asked Razer whether it's expected behaviour
Colore 6.0 will support the REST API version of Chroma, it's possible the UnInit works better there
it will not be as performant as using the C++ api though
(in 6.0 you will be able to choose whether to use the native API or the REST version)
cindylove
@cindylove
Mar 10 2018 16:26
As usual, but you and i know that microservices are the future anyway
Do you have a roadmap for 6.0?
or timetable?
Adam Hellberg
@Sharparam
Mar 10 2018 16:28
it's pretty stable right now, so we could probably do a release, but i want to be sure of the new structure and stuff first
cindylove
@cindylove
Mar 10 2018 16:29
Allright, so I guess I have to wait. Thank you for your help and time :)
Adam Hellberg
@Sharparam
Mar 10 2018 16:29
we do have some pre-release builds on myget though: https://www.myget.org/feed/coralestudios/package/nuget/Colore
cindylove
@cindylove
Mar 10 2018 16:29
Okay, I will take a look
Adam Hellberg
@Sharparam
Mar 10 2018 16:29
you can add the feed to your nuget settings and get 6.0 from there, it should be pretty stable
and if you find any bugs, please let us know with an issue on GitHub :)
cindylove
@cindylove
Mar 10 2018 16:30
For sure ;)
Adam Hellberg
@Sharparam
Mar 10 2018 16:30
note that in 6.0 the way to create an instance has changed, and code has moved around quite a bit in an attempt to make it easier
cindylove
@cindylove
Mar 10 2018 16:31
Alright, at the moment I am not as fare as I wanted to be, so this will be not a problem at all
Adam Hellberg
@Sharparam
Mar 10 2018 16:31
we have new documentation for it which you can read here: http://coralestudios.github.io/Colore/devdocs/api/Corale.Colore.ColoreProvider.html
cindylove
@cindylove
Mar 10 2018 16:34
I will check it out. Thank you
cindylove
@cindylove
Mar 10 2018 16:45
Same Error in Rest version.
var appInfo = new Corale.Colore.Data.AppInfo("Old and Rusty Gaming","Old and Rusty Gaming Chroma Deluxe","cindy", "https://www.old-and-rusty-gaming.de/index.php/contact/index/index",Corale.Colore.Data.Category.Application);
var chroma = await ColoreProvider.CreateRest(appInfo);
await chroma.Keyboard.SetKeyAsync(Corale.Colore.Effects.Keyboard.Key.A, Corale.Colore.Data.Color.Blue);
await chroma.UninitializeAsync();
System.Threading.Thread.Sleep(3000);
chroma = await ColoreProvider.CreateRest(appInfo);
await chroma.Keyboard.SetKeyAsync(Corale.Colore.Effects.Keyboard.Key.A, Corale.Colore.Data.Color.Red);
I do not receive an error text (probably I am just to stupid) but i guess its the same Problem
also tried to make a new app info (in the runtime). Does not make a differens.
Adam Hellberg
@Sharparam
Mar 10 2018 16:51
so after the call to Uninitialize and during the Thread.Sleep, the colors do not return to the synapse default?
cindylove
@cindylove
Mar 10 2018 17:02
It does, but i am not able to get another working instance of chroma (CreateRest)
Adam Hellberg
@Sharparam
Mar 10 2018 17:03
you should be able to use the instance you created the first time if you call Initialize again
cindylove
@cindylove
Mar 10 2018 17:03
okay, let me try this
Same error
Adam Hellberg
@Sharparam
Mar 10 2018 17:05
hm
cindylove
@cindylove
Mar 10 2018 17:05
var appInfo = new Corale.Colore.Data.AppInfo("Old and Rusty Gaming","Old and Rusty Gaming Chroma Deluxe","cindy", "https://www.old-and-rusty-gaming.de/index.php/contact/index/index",Corale.Colore.Data.Category.Application);
var chroma = await ColoreProvider.CreateRest(appInfo);
await chroma.Keyboard.SetKeyAsync(Corale.Colore.Effects.Keyboard.Key.A, Corale.Colore.Data.Color.Blue);
await chroma.UninitializeAsync();
System.Threading.Thread.Sleep(3000);
await chroma.InitializeAsync(appInfo);
await chroma.Keyboard.SetKeyAsync(Corale.Colore.Effects.Keyboard.Key.A, Corale.Colore.Data.Color.Red);
Adam Hellberg
@Sharparam
Mar 10 2018 17:07
so on the last call to SetKeyAsync, nothing happens and it stays on the synapse-configured effect?
cindylove
@cindylove
Mar 10 2018 17:13
It crashed
"The Application is in break mode"
there is no code to show because all threads were executed externaly
So, I am not able to tell which error occured
Adam Hellberg
@Sharparam
Mar 10 2018 17:15
does it show anything in the console or debug output?
also, if you go under "Exception settings" and enable everything for "Common language runtime exceptions" and then run again, does it give a better view when the exception occurs?
it should look like this: https://rfl.im/JB7
normally it has a bunch of exceptions disabled, which is useful to not get a bunch of false positives, but in certain situations it hides exceptions you do want to break on
you can reset it to the default afterwards by right clicking and choosing to restore default settings
cindylove
@cindylove
Mar 10 2018 17:22
Output: An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll
One or more errors occurred.
Settingschange did nothing
Adam Hellberg
@Sharparam
Mar 10 2018 17:23
what exceptions are in the aggregateexception?
or is that the output in the console?
cindylove
@cindylove
Mar 10 2018 17:23
That is the Output. Nothing more
Adam Hellberg
@Sharparam
Mar 10 2018 17:23
i see
there are apparently some fixes related to init/uninit that will be released according to Razer
cindylove
@cindylove
Mar 10 2018 17:23
We are calling rest. I start, fiddler, maybe there is something to see
This is odd. Don't we do Web Requests?
Adam Hellberg
@Sharparam
Mar 10 2018 17:27
yes
i don't know about fiddler, but some sniffing tools can't sniff localhost-only requests without some special drivers or configs
wireshark for example
cindylove
@cindylove
Mar 10 2018 17:30
Yes it has some trouble with localhost
Too bad
so i guess another dead end
Adam Hellberg
@Sharparam
Mar 10 2018 17:31
are you getting any log output from colore? it should output to the console, or the debug output in visual studio
cindylove
@cindylove
Mar 10 2018 17:34
Using VS 2017. Console.Writeline is not posting to the output anymore
Wait
Adam Hellberg
@Sharparam
Mar 10 2018 17:36
colore uses Common.Logging for its logging
you may have to configure some logging framework for it to show output, i'm not sure
but i think it should be possible to make it write to the console
cindylove
@cindylove
Mar 10 2018 17:37
System.Net.Sockets.SocketException: 'No connection could be made because the target machine actively refused it'
Adam Hellberg
@Sharparam
Mar 10 2018 17:37
hm
cindylove
@cindylove
Mar 10 2018 17:37
Default Windows Settings (Log just my code)
Adam Hellberg
@Sharparam
Mar 10 2018 17:37
is that when calling uninit or when trying to init the second time?
cindylove
@cindylove
Mar 10 2018 17:39
After unit
When calling the second init
Adam Hellberg
@Sharparam
Mar 10 2018 17:44
hm
this might actually be a bug in colore!
it looks like the session base address is not reset when calling init the second time
cindylove
@cindylove
Mar 10 2018 17:45
Okay, so you can fix that?
Adam Hellberg
@Sharparam
Mar 10 2018 17:45
yes
cindylove
@cindylove
Mar 10 2018 17:45
Please let me know when its done :)
Adam Hellberg
@Sharparam
Mar 10 2018 17:52
@cindylove there should be a new version on myget now with the fix
cindylove
@cindylove
Mar 10 2018 17:53
116?
Same Problem
Adam Hellberg
@Sharparam
Mar 10 2018 17:53
117
cindylove
@cindylove
Mar 10 2018 17:54
okay
Corale.Colore.Rest.RestException: 'Call to heartbeat API failed'
Adam Hellberg
@Sharparam
Mar 10 2018 17:55
odd
there were no changes to the heartbeat code :o
when is the error thrown?
is it after the uninit?
i might have discovered another bug :P
the heartbeat timer doesn't seem to stop after you call uninit, so it keeps trying to send heartbeats to the SDK when it shouldn't
cindylove
@cindylove
Mar 10 2018 17:57
On second initialization
Okay
Adam Hellberg
@Sharparam
Mar 10 2018 18:03
there should be a new version in myget now (118) with the fix
cindylove
@cindylove
Mar 10 2018 18:05
Nuget doesn't finde it...
Adam Hellberg
@Sharparam
Mar 10 2018 18:06
maybe it takes a while to refresh
cindylove
@cindylove
Mar 10 2018 18:07
Think so. I wait a few minutes
Adam Hellberg
@Sharparam
Mar 10 2018 18:07
maybe you can try installing the version directly with one of the commands listed on the page: https://www.myget.org/feed/coralestudios/package/nuget/Colore/6.0.0-unstable0118
cindylove
@cindylove
Mar 10 2018 18:08

PM> Install-Package Colore -Version 6.0.0-unstable0118 -Source https://www.myget.org/F/coralestudios/api/v3/index.json

Attempting to gather dependency information for package 'Colore.6.0.0-unstable0118' with respect to project 'OldAndRustyChroma2', targeting '.NETFramework,Version=v4.6.1'
Install-Package : Package 'Colore 6.0.0-unstable0118' is not found in the following primary source(s): 'https://www.myget.org/F/coralestudios/api/v3/index.json'. Please verify all your online package sources
are available (OR) package id, version are specified correctly.
At line:1 char:1

  • Install-Package Colore -Version 6.0.0-unstable0118 -Source https://ww ...
  • ~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Install-Package], Exception
    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Time Elapsed: 00:00:00.0391809

Trying to do so
Adam Hellberg
@Sharparam
Mar 10 2018 18:10
huh
i guess maybe wait a couple of minutes and see if it refreshes
cindylove
@cindylove
Mar 10 2018 18:10
I can access the json file via chrome browser... funny
[Corale] The V2 feed at 'https://www.myget.org/F/coralestudios/symbols/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='net461'&includePrerelease=true&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '404 The symbols endpoint on your MyGet feed should not be configured as a NuGet package source.'.
Adam Hellberg
@Sharparam
Mar 10 2018 18:14
did you add the feed in your nuget settings?
the message seems to say you added it in the wrong place
cindylove
@cindylove
Mar 10 2018 18:15
This message is shown in the nuget settings and when trying to access via console (then pasted in debug)
404 trying to access it
Adam Hellberg
@Sharparam
Mar 10 2018 18:15
that looks like a search page url
cindylove
@cindylove
Mar 10 2018 18:16
This is the message when I try to get the nuget page via nuget console
package
Adam Hellberg
@Sharparam
Mar 10 2018 18:16
there's a new version now (no code changes, just had to fix some issues to make it build on travis), try installing with this: Install-Package Colore -Version 6.0.0-unstable0119 -Source https://www.myget.org/F/coralestudios/api/v3/index.json
also, what does your nuget settings look like in visual studio?
cindylove
@cindylove
Mar 10 2018 18:17
Same Error. Settings are back to default
Adam Hellberg
@Sharparam
Mar 10 2018 18:18
hm
weird that it worked before
cindylove
@cindylove
Mar 10 2018 18:19
Yes. It worked with the versions before
Adam Hellberg
@Sharparam
Mar 10 2018 18:20
i am able to add it on my end
what does your symbol server settings look like? (Tools -> Options -> Debugging -> Symbols)
also see if it works if you add the feed in the settings like this: https://files.sharparam.com/2018/03/10/2018-03-10_19-21-48-869.png
and then add the package via the nuget manager or in the console with Install-Package Colore -Version 6.0.0-unstable0119 (omitting the Source parameter)
cindylove
@cindylove
Mar 10 2018 18:24
Funny, could install it now
Adam Hellberg
@Sharparam
Mar 10 2018 18:24
when adding the feed in the settings?
maybe nuget does some kind of caching and doing that made it refresh the cache
cindylove
@cindylove
Mar 10 2018 18:25
Yes, when added it worked
Adam Hellberg
@Sharparam
Mar 10 2018 18:25
i think that's what the "Update" button there does as well, in case you have the issue again
cindylove
@cindylove
Mar 10 2018 18:25
And the Version is working as well
Now it workes as exptected
expected
Adam Hellberg
@Sharparam
Mar 10 2018 18:25
nice :D
cindylove
@cindylove
Mar 10 2018 18:25
Thank you for you help! Appreciate it!
Adam Hellberg
@Sharparam
Mar 10 2018 18:26
always glad to help :)
cindylove
@cindylove
Mar 10 2018 18:26
Now I can start with my Ideas! I wish you a nice weekend.
Adam Hellberg
@Sharparam
Mar 10 2018 18:26
you too! i think it's time to order pizza to celebrate :P