Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi,

I've open a Beta phase for my RAAS lua project on Avsim forum.

It appears that RAAS lua script execution is blocked if hidBravoButtons is active at the same time.

I have no clue of what I'm supposed to modify to grant compatibility with other lua scripts, any tips?

For your information, here is the Avsim thread:

https://www.avsim.com/forums/topic/615876-runway-awareness-and-advisory-system-raas-beta-test/?do=findComment&comment=4733509

Thanks

  • roland_lfor changed the title to Incompatibility between 2 lua scripts - hidBravoButtons
Posted
43 minutes ago, roland_lfor said:

It appears that RAAS lua script execution is blocked if hidBravoButtons is active at the same time.

Maybe its using the same virtual flags? You can change the offset/flags used in one of the scripts so that they don't clash.
However, you don't need to use the hidBravoButtons lua script any more, nor the Alpha script. These scripts were needed to recognise the buttons with ids > 31. However, FSUIPC7 now recognises up to 128 buttons natively, and has done now for a long time (since v7.2.0 I think). I suggest you remove the hidBravo/Alpha scripts, and update your assignments to use the actual button numbers rather then the virtual buttons/flags that those scripts use.

John

Posted
9 minutes ago, John Dowson said:

Maybe its using the same virtual flags? You can change the offset/flags used in one of the scripts so that they don't clash.

Sorry, I don't see what "virtual flag" means in lua scripts.

 

Quote

I suggest you remove the hidBravo/Alpha scripts, and update your assignments to use the actual button numbers rather then the virtual buttons/flags that those scripts use.

Ok, I'll copy your explanation to the Beta user who is using it, thanks.

Posted

John,

A user has the same issue - RAAS script starts but seems frozen after - however he doesn't use hidBravoButtons or Alpha scripts.

Symptoms are:

- RAAS starts ("test Ok" annoucement is played correctly). This correspond to the initialization of my program

- No other annoucements are heard, making the user think the program does not work.

As after initialization, my program starts an infinite while true do / end loop, paused using ipc.sleep(Timer) call, I believe that ipc.sleep() never returns for some reason.

I don't have the issue myself so I can't put some debug trace to understand.

 

Any help or advice is welcome

Thanks

Posted

Get the user to set logging for Lua Plugins and take a look at his log.

7 minutes ago, roland_lfor said:

I believe that ipc.sleep() never returns for some reason.

I don't see how this can occur, or what would be causing it if this was the reason. The logging should tell.

John

Posted

John, 

I don't know if you will trust me, but the issue on my script is caused by the "Lua Plugins" log option itself.

My understanding is that your logging capacity is overflown during my RegionalRwy() search function, as it goes through the 90 000 lines of R4.csv.

Funny to see that the debugging tool is causing the issue!

Posted
49 minutes ago, roland_lfor said:

I don't know if you will trust me, but the issue on my script is caused by the "Lua Plugins" log option itself.

But I thought it was working for you, but wasn't working for another user who didn't have Lua Plugins log option activated, so how can this be the issue?

50 minutes ago, roland_lfor said:

My understanding is that your logging capacity is overflown during my RegionalRwy() search function, as it goes through the 90 000 lines of R4.csv.

Maybe something is overflowing, I don't know. Maybe continual logging is having an affect - I have noticed this in MSFS with other logging on occasion. I can take a look at some point but not for the next few days (re-organising my office at the moment...).

52 minutes ago, roland_lfor said:

Funny to see that the debugging tool is causing the issue!

But how can it be if the user had an issue before he activated lua plugin logging? Or are you saying that he already had Lua Plugin logging activated, and it works for him when this is disabled? if thats the case, then there probably isn't an issue - just get him to disable the lua plugun logging!

 

Posted

It seems that when Lua Plugin is enabled, but Log lua separately is Disabled then the overflow occurs (and lua script exits).

If both are enabled the issue is gone. (I have to verify myself)

Actually I'm not sure if that user had Lua Plugin ON since the beginning, but I guess yes.

Posted
22 minutes ago, roland_lfor said:

It seems that when Lua Plugin is enabled, but Log lua separately is Disabled then the overflow occurs (and lua script exits).

If both are enabled the issue is gone. (I have to verify myself)

Ok. I will check this at some point, but it will be low priority.

23 minutes ago, roland_lfor said:

Actually I'm not sure if that user had Lua Plugin ON since the beginning, but I guess yes.

Maybe check, otherwise the user's issue is somewhere else....

Posted

He has just disabled the Lua Plugin log option, and for the first time RAAS worked on his side , without any code change on my side.

I replicated on my computer that once Lua Plugins log is enabled, RAAS is exiting during runway parsing loop. (I never used this log option during devpt).

Nothing urgent 🙂

Posted

Ok. I suspect that its too much logging not giving other threads time to react, or maybe a threading issue when multiple threads are logging and one (the lua thread) is hogging the log - I have noticed strange behavior on other occasions when logging is being thrashed. I'll take a look when I get time (as I've been meaning to try the RAAS  script anyway), but I'm not sure if I can do anything, except maybe throttle the logging.... I can also add a note to the documentation to the effect that if you are logging lua plugins and this logs fast and/or produces a large log, then you should also enable Log Lua Separately.

John

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.