Vmax549 wrote:While I cannot see teh sorce code I did investigate a bit further. When the Plugin starts up it DOES hog a huge amount of CPU Resources and on some systems that may cause a crash.
Just a thought, (;-) TP
cncdrive wrote:Yes, those are the 2 lines which can be used to set the thread cultureinfo to EN-us and that fixes the problem.
But if you create for example 10 different threads in your plugin from different functions then you have to take care to write those 2 lines into all of the functions which are used to create the plugin threads before you start calling UCCNC functions from the threads.
Ofcourse there are other ways also to take care of this if you know what functions you calling and what conversion problems can different cultureinfos incompatibility can cause, then you could handle them one by one if you want without switching cultureinfo.
For example if you read strings from DROs and you convert them to numbers yourself then you could write your own conversion routine which takes care of all possible cultureinfos.
Ofcourse this was just an example, just to let you see what I ment, because in practice this would be not too easy, because number representation can differ by culture and there are lots of possible representations.
And definately adding those 2 lines is the easiest way to deal with the problem, because then your plugin thread and the UCCNC will use the same cultureinfo, so they will be sure compatible.
And in case your plugin still needs to use other cultureinfos for any reason then you can switch the cultureinfo of your thread back to other cultures the same way, using the same code lines, but with other cultureinfo strings in the parameter.
Kelevra wrote:I've gotten the Plugin to work now after i switched the language of my OS to english.
Basically it looks like you guys were right on track with the guess regarding the cultureinfo.
All the issues went away magically and i'm currently running 1.2029 with the Plugin version 1.0006.
Thanks to you guys and the guys on CNC Zone for helping me out on this.
regards
Patrick
A_Camera wrote:Kelevra wrote:I've gotten the Plugin to work now after i switched the language of my OS to english.
Basically it looks like you guys were right on track with the guess regarding the cultureinfo.
All the issues went away magically and i'm currently running 1.2029 with the Plugin version 1.0006.
Thanks to you guys and the guys on CNC Zone for helping me out on this.
regards
Patrick
Good to know that it was so easy to fix it, but hopefully Dan will add those lines so others won't experience the same issue and you can switch back to use German.
Hi TP, I did see when plugin loaded my CPU usage went up 20%, due to UCCNC software security I'm unable to use a profiler to easily see what's using theses resources. I did test a stripped down version of the plugin with basically just the macro running in the plugin 25hz plugin loop and there was no difference. I THINK its safe to assume that if using the 25hz loop you are going to see an increase in CPU usage. Oddly though when using as a macro loop the CPU usage was lower. Of course there's other programing directions to go and not use the 25hz plugin loop but my CPU running at 20-25% don't seem like a issue to me.
Return to Ask a question from support here
Users browsing this forum: No registered users and 18 guests