Penecruz / VAICOMPRO-Community

VAICOM PRO for DCS World
MIT License
164 stars 27 forks source link

[BUG] communication menu is not visible after reloading a mission or starting a 2nd mission #136

Open r2dseu opened 2 months ago

r2dseu commented 2 months ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

r2dseu commented 2 months ago

It looks like when reloading missions, there seems to be a conflict between Vaicompro and DCRealistic's lua export where the former's doesn't load correctly and doesn't recognize the module with None Detected on PTT.

Looking at export.lua:

local vaicomlfs = require('lfs'); dofile(vaicomlfs.writedir()..[[Scripts\VAICOMPRO\VAICOMPRO.export.lua]]) --[[RKAPPS_REFERENCE]]dofile("C:\\Users\\Ryan\\Desktop\\Standalone Softwares\\DCRealistic/Plugins\\rkApps_Export.lua") --[[DCREALISTIC_AUTOSTART]]os.execute('start "" "C:\\Users\\Ryan\\Desktop\\Standalone Softwares\\DCRealistic\\DCRealistic.exe"')

commenting out rkApps's lua scripts seems to have fixed the problem (reloading the mission loads the module in the PTT correctly).

rkApp has obfuscated their script so I can't debug it further but can't be sure if the issue is on their side. I'll file a bug on their discord.

r2dseu commented 2 months ago

Testing a bit further, it looks like the buggy behavior occurs only when:

It seems like Vaicom does not like the fact that os.execute trys to invoke DCSRealistic.exe again when it's already running?

The windows start command returns 0 even when the executable is started again so I don't think vaicom is erroring out on a return error.

OTOH, I'm not sure if it's exactly safe for DCRealistic to be invoking a shell command in the lua export script that has to play nicely with other mods.