Air Manager Has totally Crashed!!
-
- Posts: 204
- Joined: Sat Jul 09, 2022 3:20 pm
Air Manager Has totally Crashed!!
Hello:
I was just in the process of debugging an instrument when AM simply stopped - wouldn't do anything. I had to use Task Manager to stop it. Now, when I attempt to restart it, it begins to load instruments, gets part way through and quits!
I attempted to re-install but that failed. I am a bit nervous about uninstalling and reinstalling for fear of losing my license. What do I do next?
My system is on a laptop, Windows 10, x64, Version 21H2, build 19044.1826, 16GB RAM, AMD Ryzen 9 4900HS with Radeon Graphics 3.00 GHz. Air Marshal is 4.1. I just got a message of a new version, but that failed too!
Sparky
I was just in the process of debugging an instrument when AM simply stopped - wouldn't do anything. I had to use Task Manager to stop it. Now, when I attempt to restart it, it begins to load instruments, gets part way through and quits!
I attempted to re-install but that failed. I am a bit nervous about uninstalling and reinstalling for fear of losing my license. What do I do next?
My system is on a laptop, Windows 10, x64, Version 21H2, build 19044.1826, 16GB RAM, AMD Ryzen 9 4900HS with Radeon Graphics 3.00 GHz. Air Marshal is 4.1. I just got a message of a new version, but that failed too!
Sparky
Re: Air Manager Has totally Crashed!!
Hi,
Don't worry about loosing your license, reinstalling has no effect on that.
My first guess would be that there is an instrument that has a never ending loop in it. A for or while loop.
Could it be that you created something similar just before the problems began?
Corjan
Don't worry about loosing your license, reinstalling has no effect on that.
My first guess would be that there is an instrument that has a never ending loop in it. A for or while loop.
Could it be that you created something similar just before the problems began?
Corjan
-
- Posts: 204
- Joined: Sat Jul 09, 2022 3:20 pm
Re: Air Manager Has totally Crashed!!
Hello, Corjan:
Well, yes, if you only look at the code, there's no way out. But I was using it with a breakpoint so, it did one loop, printed a value and stopped. I know all about endless loops.
Would that kill AM?
Sparky
Well, yes, if you only look at the code, there's no way out. But I was using it with a breakpoint so, it did one loop, printed a value and stopped. I know all about endless loops.
Would that kill AM?
Sparky
-
- Posts: 204
- Joined: Sat Jul 09, 2022 3:20 pm
Re: Air Manager Has totally Crashed!!
Further to my last, I uninstalled, reinstalled, then the system downloaded an update, installed that, attempted to execute, and, again, loaded instruments part way and stopped.
Now, I don't see why this would cause the program to die, but I added an underscore (_) to the front of a bunch of the instrument folder names in an effort to make AM forget about the instrument I was debugging. No joy. Should I put them back?
Sparky
Now, I don't see why this would cause the program to die, but I added an underscore (_) to the front of a bunch of the instrument folder names in an effort to make AM forget about the instrument I was debugging. No joy. Should I put them back?
Sparky
Re: Air Manager Has totally Crashed!!
As mentioned here on the forums, it is not recommend to use while loops. Adding a _ does not help. You can use Notepad++ to find the instrument with the while loop and then edit the script.
Re: Air Manager Has totally Crashed!!
Hi,
On boot, Air Manager runs the lua code once to figure out stuff like configured hardware etc.
If there is a endless loop in the script, then this process will never be finished, hence AM will hang.
Not 100% sure if that is the case here, but like Ralph suggested, check the last instruments you worked on, and try to see what code you added lately.
Corjan
On boot, Air Manager runs the lua code once to figure out stuff like configured hardware etc.
If there is a endless loop in the script, then this process will never be finished, hence AM will hang.
Not 100% sure if that is the case here, but like Ralph suggested, check the last instruments you worked on, and try to see what code you added lately.
Corjan
-
- Posts: 204
- Joined: Sat Jul 09, 2022 3:20 pm
Re: Air Manager Has totally Crashed!!
Hello (sheepishly):
That was the problem! I wouldn't know to look to see if part of the LUA language shouldn't be used! Is there a site that lists all of these constructs?
But, it's working again and I thank both of you for your very rapid response!!
Sparky
That was the problem! I wouldn't know to look to see if part of the LUA language shouldn't be used! Is there a site that lists all of these constructs?
But, it's working again and I thank both of you for your very rapid response!!
Sparky
Re: Air Manager Has totally Crashed!!
Hi,
The whole API is event driven (using callbacks), so there shouldn't be any active 'threads' or processes running anywhere.
Note that you can still use while and for loops, it works fine. But you have to be 100% sure that it will break out of it at some point.
I might add some kind of deadlock timer some day, to prevent AM hanging. But to be honest, this doesn't happen that often.
Corjan
The whole API is event driven (using callbacks), so there shouldn't be any active 'threads' or processes running anywhere.
Note that you can still use while and for loops, it works fine. But you have to be 100% sure that it will break out of it at some point.
I might add some kind of deadlock timer some day, to prevent AM hanging. But to be honest, this doesn't happen that often.
Corjan
-
- Posts: 204
- Joined: Sat Jul 09, 2022 3:20 pm
Re: Air Manager Has totally Crashed!!
To be honest, I would never leave code like that in a production item - I was having trouble finding where AM was putting some text so I used that logic so I could find what I was looking for. It turned out that my initial value for the loop was what I was looking for!
I've been programming a long time, I've written code that answered interrupts (much like the callback - in fact that is how I think about it) but I've never had this kind of a problem before!
But, I appreciate you and Ralph getting me out of a bind!!
Sparky
I've been programming a long time, I've written code that answered interrupts (much like the callback - in fact that is how I think about it) but I've never had this kind of a problem before!
But, I appreciate you and Ralph getting me out of a bind!!
Sparky
Re: Air Manager Has totally Crashed!!
Hi,
Blocking a callback function in most GUI frameworks like winforms, wpf, javafx, qt etc would also lock up the application. Unless you use async stuff, but that is another topic…
Corjan
Blocking a callback function in most GUI frameworks like winforms, wpf, javafx, qt etc would also lock up the application. Unless you use async stuff, but that is another topic…
Corjan