nicolson
Canada
Asked
— Edited
Since the EZ revolution updates, EZ builder keeps freezing each time it connects to the robot. It would either take a very long time to run a program or freeze to the point of disconnecting the robot. Because of this the robot is no longer operational. Has anyone experienced this issue? Here is a link to one of the programs:
https://www.dropbox.com/s/yiyc39p2ye1vy5z/ProxyNewServo.EZB
It works fine before connecting, but as soon as the connects it keeps freezing.
A "Dbug " script would be very helpful! Whats happening with the Blue led and the red Bluetooth led? have you tried a different Digital port? Also what Version are you running ...just a few questions! for now...
Both LEDs work fine, I am using EZ b version 3. I run ARC on a windows 8 samsung tablet.
Hey hey don't blame innocent little ARC! It's working for a billion other people. Revolution updates don't affect the v3 users. As for the lockups, we should first look at your program. Second, we can look at Windows - as windows is usually the culprit. Mostly the software is affected by virus scanners and other Helper type software that do more harm than good.
I'll take a look at your project when I'm in front of a PC sometime this weekend
You may also try to run ARC as the administrator.
A Cheap Bluetooth dongle caused freezes for me... Replaced it with a more expensive one and haven't had a freeze since... Never mind, just realized you have built in Bluetooth....
Make sure you have the Microsoft Bluetooth stack.(driver)
Sorry DJ! I didn't mean to blame ARC. I am well aware that it's the best robot control platform in the world. And thank all of you guys for your prompt support. Later after work I'll try your suggestions and let you know what happen
@nicolson Well, that was interesting! I opened your script with an extra EZ-B I had and after connection, it spoke "That was refreshing" and then sure enough, ARC froze. I'm running Windows 8 on a desktop with ARC 2.7.14 (the latest as of today), I don't have any other issues with ARC or this EZ-B.
I don't fully understand everything your script is doing, but you do have a lot going on. Was this a script that worked fine then without any changes caused the issues? Or did you make modifications and then it caused this issue? Can you run a prior version of your script without issue?
My best guess is its something in the startup routine that windows does not like. Perhaps the speech routines? Could you explain what the scripts does at startup?
windows 8 samsung tablet, how much memory? which tablet like 500t? start new project and no controls see if connect.
:) J
@JustinRatliff The startup script worked fine before. At first I suspected it, but even after I removed it and started fresh with a new connection window, it still froze. If you try to run any of the scripts without connecting to the bluetooth, they all work fine. I think it has to do with the bluetooth connection.
@jdebay Since it froze on JustinRatliff's desktop computer, we can dismiss the tablet memory issue. I started new project with only script manager imported and it still froze.
Wow that's a lot of scripts you have starting and stopping at the same time on connection!
That may have something to do with it. If your PC/Tablet isn't powerful enough to manage all of that at the same time it may be having a small hiccup causing a disconnection. My PC jumped up to 21% cpu usage when I hit the init script start button, that's a lot of usage (my PC is 6 core 3.8GHz)
It may also be down to the comms speed, run a benchmark and see how fast/many actions can be sent/received in one second and then check if you are exceeding that.
I'll have better look when I get chance but try disabling the init script on connection and start the scripts manually one by one, in order, and see when/if it drops connection.
I'm looking into this to see if there is a loop... It's always nice to use the Script Flow control to see what everything is doing as well
@DJ Thanks. I totally forgot about this feature of ARC.
Ok, so I have it running again, no change that I made, same desktop Win8 system, same EZ-B. This time I connected a wireless camera too.....it seemed to run a little longer, but so slow. When I minimized the ARC, I could not maximize it without a little windows error ding to let me know it's not going to open. But from the Task Manager I could bring the ARC back in view and while all the functions in the app were stuck were stuck (could not stop, start, move anything, disconnect or minimize the screen), the camera view window was keeping current with the view of the wireless camera. I even turn the EZ-B off and there as no change to this state.
My system is 3.2Ghz, 16gb ram and under the Task Manager when the app stuck it was using 43% CPU resources.
@JustinRatliff So, we can totally dismiss windows as the culprit.
@nicolson I think that is safe to say. I don't perceive this to be Windows, the hardware, the EZ-B or the Bluetooth. I feel this is something in the scripted functions/processes that is causing the system resource to be tied up and the application to hang.
I'm still a little confused on when this broke? To recap - the script ran fine, you updated ARC to version 2014.2.7, ran the script again with out any modifications what so ever? - then the problems started? Do I have that correct?
If that is correct, what was the previous version you had of the ARC where the script did not hang? Ultimately it would be nice to figure out what is the source of it hanging and how to fix it.
I see a new version 2014.2.21 was just released. I'm going to upgrade to it and see if the problem goes away.
Hummzzzz, Well version 2014.2.21 runs the script, no modification needed and no freezing. CPU usage is staying around 5%. @Nicolson - I'd give the newest version a try.
@JustinRatliff I wasn't as fortunate: I tried the latest version but the problem persist.
Darn! confused Probably the only difference between my setup and yours is nothing is connected to my EZ-B. I know that on startup it looks for input from the PING sonar, battery monitor and collision sensors. Some servo routines activate. Voice recognition comes on I think.
Is the problem exactly the same, the app freezes? Or is it just extremely slow? Are you getting high CPU usage when you to go Task Manager? What is the last function that is preformed correct? Does it at least says "That was a good nap"?
The script execution is very very slow, to the point of disconnecting the robot, turning off the blue LED. Yes it says "that was a good nap". 49% percent cpu usage during startup.
It sounds like it's likely to be an issue with a script (or more than one).
Have you got a lot of scripts checking ADC ports quickly? Or a lot of scripts looping too quickly? This can increase the demand that ARC will have and cause an unresponsive computer.
Unfortunately the bluetooth connection can cause something of a bottleneck if you are trying to do too much at once.
Does this happen with all your ARC projects or just this particular project?
I loaded your project and it "kind" of worked for me on an EZ-B v4. However, I noticed it being really really really sluggish. Here are fixes I recommend...
There are 3 controls all using the same HC-SR04 Ping Sensor (radar Scanner, Ping Collision, Distance). There is no need for 3 of those - only use 1. Otherwise, you have a pile of communication requests for redundant queries. Your tablet may be a little slow processor as well, so all of those controls are using up CPU resources. Only use 1.
There is a script called "LightFlashing" and there is no delay. It simply toggles the digital port as fast as the CPU will run. That is going to use up 100% of the CPU. Put a short Sleep() in the loop - perhaps something like Sleep(1000) for a 1 second flash.
There are probably other things but those are the two that popped up right away. Fix those two things and you'll be fine.
I removed the radar scanners and fixed that one loop with a delay, here's the fix: AAProxyNewServo.EZB
How cool is that! @D(octor) J makes house calls Take two EZB's and call me in the morning!
Great thanks DJ! My robot works smoother than before. Thanks for the suggestions in improving my programs