Air Manager Has totally Crashed!!

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: Ralph, russ

Post Reply
Message
Author
The Artful Dodger
Posts: 84
Joined: Sat Jul 09, 2022 3:20 pm

Air Manager Has totally Crashed!!

#1 Post by The Artful Dodger »

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

User avatar
Corjan
Posts: 2638
Joined: Thu Nov 19, 2015 9:04 am

Re: Air Manager Has totally Crashed!!

#2 Post by Corjan »

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

The Artful Dodger
Posts: 84
Joined: Sat Jul 09, 2022 3:20 pm

Re: Air Manager Has totally Crashed!!

#3 Post by The Artful Dodger »

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

The Artful Dodger
Posts: 84
Joined: Sat Jul 09, 2022 3:20 pm

Re: Air Manager Has totally Crashed!!

#4 Post by The Artful Dodger »

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

User avatar
Ralph
Posts: 6625
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Air Manager Has totally Crashed!!

#5 Post by Ralph »

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.

User avatar
Corjan
Posts: 2638
Joined: Thu Nov 19, 2015 9:04 am

Re: Air Manager Has totally Crashed!!

#6 Post by Corjan »

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

The Artful Dodger
Posts: 84
Joined: Sat Jul 09, 2022 3:20 pm

Re: Air Manager Has totally Crashed!!

#7 Post by The Artful Dodger »

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

User avatar
Corjan
Posts: 2638
Joined: Thu Nov 19, 2015 9:04 am

Re: Air Manager Has totally Crashed!!

#8 Post by Corjan »

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 Artful Dodger
Posts: 84
Joined: Sat Jul 09, 2022 3:20 pm

Re: Air Manager Has totally Crashed!!

#9 Post by The Artful Dodger »

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

User avatar
Corjan
Posts: 2638
Joined: Thu Nov 19, 2015 9:04 am

Re: Air Manager Has totally Crashed!!

#10 Post by Corjan »

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

Post Reply