dextercd / Noita-Dear-ImGui

MIT License
12 stars 1 forks source link

Weird breakage when calling `load_imgui` from CE console #9

Open dextercd opened 1 month ago

dextercd commented 1 month ago
Lua error - [string "mods/component-explorer/lua_console.lua"]:327: attempt to index local 'style' (a userdata value)
  Stack traceback:
          [string "mods/component-explorer/lua_console.lua"]:327: in function 'draw_contents'
          [string "mods/component-explorer/lua_console.lua"]:87: in function 'draw'
          [string "mods/component-explorer/main.lua"]:334: in function '_update_ui'
          [string "mods/component-explorer/unsafe/appends/main.lua"]:74: in function 'update_ui'
          [string "mods/component-explorer/main.lua"]:95: in function <[string "mods/component-explorer/main.lua"]:88>
Lua error - [string "mods/component-explorer/main.lua"]:196: attempt to index a userdata value
  Stack traceback:
          [string "mods/component-explorer/main.lua"]:196: in function 'main_window_position'
          [string "mods/component-explorer/main.lua"]:233: in function 'main_window'
          [string "mods/component-explorer/main.lua"]:310: in function '_update_ui'
          [string "mods/component-explorer/unsafe/appends/main.lua"]:74: in function 'update_ui'
          [string "mods/component-explorer/main.lua"]:95: in function <[string "mods/component-explorer/main.lua"]:88>
Lua error - (skipping logging of recurring lua errors)
LUA: CWD        Z:\home\dexter\.local\share\Steam\steamapps\common\Noita        
LUA: MOD        Z:\home\dexter\.local\share\Steam\steamapps\common\Noita\noita.exe      
Lua error - [string "mods/component-explorer/main.lua"]:196: attempt to index a userdata value
  Stack traceback:
          [string "mods/component-explorer/main.lua"]:196: in function 'main_window_position'
          [string "mods/component-explorer/main.lua"]:233: in function 'main_window'
          [string "mods/component-explorer/main.lua"]:310: in function '_update_ui'
          [string "mods/component-explorer/unsafe/appends/main.lua"]:74: in function 'update_ui'
          [string "mods/component-explorer/main.lua"]:107: in function <[string "mods/component-explorer/main.lua"]:98>
Lua error - (skipping logging of recurring lua errors)

There's a large delay (multiple seconds) between calling the function and this happening. Very weird

dextercd commented 1 month ago

Probably related to loading twice from the same Lua context which you shouldn't do anyway, but should rule out whether it can be caused by another mod calling load_imgui very delayed.