dvrp0 / reverie

A movie-themed Balatro expansion that focuses on providing special shops and various contents around it
GNU General Public License v3.0
9 stars 2 forks source link

Nested path check breaks on proton #6

Open Dwiib opened 4 months ago

Dwiib commented 4 months ago

I guess this is a bug in lovely, but I'm unfamiliar with the ecosystem. The value of mod.path is actually a malformed full path as of current Proton Experimental, verified by simply changing the assertion message to mod.path at https://github.com/dvrp0/reverie/blob/855b064a307ef7f43fdaae06030bd67463b9011c/Reverie.lua#L62C4-L62C72.

Note that mod.path is mixed Windows and Linux style.

Disregard that this crash dump is from beta5, the same behavior happens on beta6, I downgraded to see if that was the issue because I read the crash dump wrong.

Additionally, I believe that the folder would be named Reverie-main when the archive is downloaded via downloading the git repo as a zip instead of the release, which might trip some users up.

Oops! The game crashed:
[SMODS Reverie "Reverie.lua"]:62: C:\users\steamuser\AppData\Roaming\Balatro\Mods/Reverie/

Additional Context:
Balatro Version: 1.0.1f-FULL
Modded Version: 1.0.0-ALPHA-0729b-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.5.0-beta5
Steamodded Mods:
    1: Reverie by DVRP [ID: Reverie]

Stack Traceback
===============
(3) global C function 'assert'
(4) Lua local 'v' at file 'Reverie.lua:62' (from mod with id Reverie)
Local variables:
 mod = table: 0x0b217e90  {version:0.0.0, id:Reverie, main_file:Reverie.lua, can_load:true, badge_colour:table: 0x0b218340 (more...)}
 lovely_installed = boolean: true
 _ = table: 0x00cf7de8  {repo:https://github.com/ethangreen-dev/lovely-injector, version:0.5.0-beta5 (more...)}
(5) Lua local 'func' at Steamodded file 'loader/loader.lua:256' 
Local variables:
 (for generator) = C function: next
 (for state) = table: 0x04028c98  {Reverie:function: 0x07a42bd8}
 (for control) = number: nan
 k = string: "Reverie"
 v = Lua function '?' (defined at line 57 of chunk [SMODS Reverie "Reverie.lua"])
(6) Lua field 'with_compat' at Steamodded file 'core/compat_0_9_8.lua:522' 
Local variables:
 func = Lua function '?' (defined at line 252 of chunk [SMODS _ "loader/loader.lua"])
 localization_ref = table: 0x0407d150  {tutorial_parsed:table: 0x04350ca8, UI:table: 0x04192738, misc:table: 0x04192788 (more...)}
 captured_loc = table: 0x04061da8  {}
(7) Lua global 'loadMods' at Steamodded file 'loader/loader.lua:252' 
Local variables:
 modsDirectory = string: "C:\\users\\steamuser\\AppData\\Roaming\\Balatro\\Mods"
 header_components = table: 0x0a9b88d8  {conflicts:table: 0x0a9b9360, outdated:table: 0x0a9b95f0, version:table: 0x0a9b9470 (more...)}
 used_prefixes = table: 0x0a9b9728  {}
 processDirectory = Lua function '?' (defined at line 68 of chunk [SMODS _ "loader/loader.lua"])
 keyset = table: 0x0410a980  {1:0}
 check_dependencies = Lua function '?' (defined at line 178 of chunk [SMODS _ "loader/loader.lua"])
 (for generator) = C function: builtin#6
 (for state) = table: 0x0410a980  {1:0}
 (for control) = number: 1
 _ = number: 1
 priority = number: 0
 (for generator) = C function: builtin#6
 (for state) = table: 0x0b218d50  {1:table: 0x0b217e90}
 (for control) = number: 1
 _ = number: 1
 mod = table: 0x0b217e90  {version:0.0.0, id:Reverie, main_file:Reverie.lua, can_load:true, badge_colour:table: 0x0b218340 (more...)}
(8) Lua global 'initSteamodded' at Steamodded file 'loader/loader.lua:339' 
(9) Lua method 'start_up' at file 'game.lua:211'

--snip--
dvrp0 commented 4 months ago

I think I can do the check in a different way, but I'm focusing on a Steamodded 1.0.0 port of Reverie and won't update the 0.9.8 version. I'll remove the assertions in the 1.0.0 version as they are not necessary anymore

Thank you for the report though! 😀