From a46e77b86ef11985f5fba8891647fe5d3ac93886 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 5 Jan 2025 18:56:59 +0100 Subject: [PATCH 1/2] fix #3727 --- .../opencomputers/loot/openos/lib/core/boot.lua | 2 +- .../opencomputers/loot/openos/lib/process.lua | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/core/boot.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/core/boot.lua index f60e8155c..61496667a 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/core/boot.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/core/boot.lua @@ -1,7 +1,7 @@ -- called from /init.lua local raw_loadfile = ... -_G._OSVERSION = "OpenOS 1.8.6" +_G._OSVERSION = "OpenOS 1.8.7" -- luacheck: globals component computer unicode _OSVERSION local component = component diff --git a/src/main/resources/assets/opencomputers/loot/openos/lib/process.lua b/src/main/resources/assets/opencomputers/loot/openos/lib/process.lua index 49f0848fd..be4ad3e58 100644 --- a/src/main/resources/assets/opencomputers/loot/openos/lib/process.lua +++ b/src/main/resources/assets/opencomputers/loot/openos/lib/process.lua @@ -68,15 +68,19 @@ function process.load(path, env, init, name) if type(msg) == "table" and msg.reason == "terminated" then return msg.code or 0 end - local stack = debug.traceback():gsub("^([^\n]*\n)[^\n]*\n[^\n]*\n","%1") - io.stderr:write(string.format("%s:\n%s", msg or "", stack)) - return 128 -- syserr + return debug.traceback() end, ...) } - --result[1] is false if the exception handler also crashed if not result[1] and type(result[2]) ~= "number" then - io.stderr:write("process library exception handler crashed: ", tostring(result[2])) + -- run exception handler + xpcall(function() + local stack = result[2]:gsub("^([^\n]*\n)[^\n]*\n[^\n]*\n","%1") + io.stderr:write(string.format("%s:\n%s", msg or "", stack)) + end, + function(msg) + io.stderr:write("process library exception handler crashed: ", tostring(msg)) + end) end -- onError opens a file, you can't open a file without a process, we close the process last From e8595d2086788c5d1ad969e0716eae7a3427a79f Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 5 Jan 2025 19:00:52 +0100 Subject: [PATCH 2/2] update changelog --- build.properties | 2 +- changelog.md | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build.properties b/build.properties index 15558c735..c29e5da88 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ minecraft.version=1.7.10 forge.version=10.13.4.1614-1.7.10 -oc.version=1.8.6-snapshot +oc.version=1.8.7-snapshot ae2.version=rv2-stable-10 bc.version=7.1.24 diff --git a/changelog.md b/changelog.md index 0ef527973..7aed87005 100644 --- a/changelog.md +++ b/changelog.md @@ -1,8 +1,16 @@ ## Fixes/improvements -* [#3731] Fix string.format() omission in OpenOS package.lua. -* [#3735] Fix server hangs on long-lasting HTTP requests. +* [#3703] Fix potential packet memory leak. +* [#3729] Fix potential crash when opening the manual. +* Added a configuration option for network packet TTL. (Timothé GRISOT) +* Improved mod load times on certain platforms. (charagarland) +* Updated Chinese translation. (HfSr) +* Updated Unifont to 16.0.02. + +## OpenOS fixes/improvements + +* [#3727] Fix an exception handler bug in process.lua, uncovered by fixing recursive xpcall() handling in 1.8.4. ## List of contributors -asie, REUSS-dev +asie, charagarland, HfSr, Timothé GRISOT