RE-UE4SS icon indicating copy to clipboard operation
RE-UE4SS copied to clipboard

[BUG - Release] After pressing "Restart All Mods" in gui console, any lua error will crash the game

Open nyutie opened this issue 1 year ago • 0 comments

Branch or Release v2.5.2

Game and Engine Version Severed Steel - 4.27

Describe the bug After pressing "Restart All Mods" in gui console, any error thrown in a lua mod will cause the game to crash.

To Reproduce

  1. Create a lua mod that will throw an error and enable it
  2. Launch game with gui console enabled
  3. Press the "Restart All Mods" button
  4. Have your mod throw an error

Expected behavior Game not crashing upon a lua error.

Desktop:

  • OS: Win 10

Additional context Here is an example mod:

print("Reloaded!")

function countdown(durationInSeconds)
  local startTime = os.clock()
  local currentTime = os.clock()

  while currentTime - startTime < durationInSeconds do
      local remainingTime = durationInSeconds - (currentTime - startTime)
      print("Throwing error in: " .. math.ceil(remainingTime) .. " seconds")

      while os.clock() - currentTime < 1 do end

      currentTime = os.clock()
  end

  error("Threw an error!")
end

countdown(5)

nyutie avatar Nov 20 '23 02:11 nyutie