Actium Posted February 24 Posted February 24 (edited) Clean (no mods, no scripts), freshly repaired (full verification) DCS 2.9.13.6818 install. Running the following Lua code will cause a segmentation fault (ACCESS_VIOLATION): local res = {net.dostring_in("mission", [[ return {a_do_script("return {1, 2, 3, 4}", 1, 2, 3, 4)} ]])} Steps to reproduce: Save segfault_a_do_script.lua in %USERPROFILE%\Saved Games\DCS.openbeta\Scripts\Hooks\ Run an arbitrary mission from the mission editor. Game should crash with a "DCS Crash" popup once loading completes. Crash trace for comparison: dcs.20250224-084219.crash How did I stumble upon this? I got curious what the updated a_do_script() can do and started messing around with it. Quote from the changelog: Quote Scripting API. Added possibility to pass args and return values from mission scripting a_do_script() and a_do_file() APIs. Edited February 24 by Actium
Actium Posted February 24 Author Posted February 24 The dedicated server is also affected (same lua.dll, presumably). The code does not cause a segfault with server version 2.9.12.5336. Server crash trace: dcs.20250224-092739.crash
Flappie Posted February 24 Posted February 24 Good news: the fix for the former issue you reported works for this issue as well. 1 ---
Actium Posted March 20 Author Posted March 20 @Flappie While said former issue has been fixed with 2.9.14.8222, above issue is still present. 1
Flappie Posted March 20 Posted March 20 Thanks for your feedback. I'll try harder to reproduce the issue. ---
Actium Posted March 20 Author Posted March 20 The steps to reproduce from my first posts still trigger the crash on both client and dedicated server. dcs.20250320-214042.crash
MarcosR Posted April 19 Posted April 19 I was using this in my server and now i can't see any returned values ... is there any other way i should be using this sentence? local safeScript = escape_lua_string(script) local result = net.dostring_in("mission", " return a_do_script( \"" .. safeScript .. "\" )" ) This was working before the update..
MarcosR Posted April 19 Posted April 19 Just to clarify we don't get any result.. script gets ran on the mission side but the return value doesn't arrive back... any idea @Flappie?
Actium Posted April 19 Author Posted April 19 @Flappie I can confirm that the fix presumably broke the underlying scripting feature entirely. Removed the solution mark. @MarcosR I took the liberty to create a separate bug report for the issue you discovered, as it is kinda off topic here: 1
Actium Posted June 23 Author Posted June 23 The return value pass-thru is still broken as of DCS 2.9.17.11733. I'd have liked to report that in the separate post I created for that issue, but, unfortunately, it was closed.
Flappie Posted June 23 Posted June 23 Yes, all bugs don't get fixed in the next update unfortunately. It's on the devs todo-list. 1 ---
Actium Posted June 24 Author Posted June 24 22 hours ago, Flappie said: Yes, all bugs don't get fixed in the next update unfortunately. It's on the devs todo-list. Certainly. I'm not pushing either. Just wanted to a) report to those not privy to the ED-internal bug tracker or todo list that the bug is still present and b) express my displeasure about the forum post reporting said bug being closed, which, unfortunately, prevents distributing up-to-date information, e.g., that a workaround is feasible for those who might need it. I fail to see the logic behind immediately closing forum posts that report game bugs.
Recommended Posts