roland_lfor Posted March 5 Report Share Posted March 5 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 Quote Link to comment Share on other sites More sharing options...
John Dowson Posted March 5 Report Share Posted March 5 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 Quote Link to comment Share on other sites More sharing options...
roland_lfor Posted March 5 Author Report Share Posted March 5 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. Quote Link to comment Share on other sites More sharing options...
roland_lfor Posted March 10 Author Report Share Posted March 10 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 Quote Link to comment Share on other sites More sharing options...
John Dowson Posted March 10 Report Share Posted March 10 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 Quote Link to comment Share on other sites More sharing options...
roland_lfor Posted March 10 Author Report Share Posted March 10 Will do, thanks Quote Link to comment Share on other sites More sharing options...
roland_lfor Posted March 11 Author Report Share Posted March 11 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! Quote Link to comment Share on other sites More sharing options...
John Dowson Posted March 11 Report Share Posted March 11 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! Quote Link to comment Share on other sites More sharing options...
roland_lfor Posted March 11 Author Report Share Posted March 11 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. Quote Link to comment Share on other sites More sharing options...
John Dowson Posted March 11 Report Share Posted March 11 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.... Quote Link to comment Share on other sites More sharing options...
roland_lfor Posted March 11 Author Report Share Posted March 11 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 🙂 Quote Link to comment Share on other sites More sharing options...
John Dowson Posted March 11 Report Share Posted March 11 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.