aleksander-ciesielski / isaac-stats-plus

🎮🌸 Extended stat UI for The Binding of Isaac: Rebirth
https://steamcommunity.com/sharedfiles/filedetails/?id=2729900570
GNU General Public License v3.0
6 stars 0 forks source link

Crash Pressing R #2

Closed geuks closed 11 months ago

geuks commented 11 months ago

Hi i removed the folder of the old mod (Damage Multiplier Stat) and the folder of this mod,i re-installed this mod and my game still crashing sometimes when i use R for a new run. log.txt

[INFO] - Lua stack trace: [INFO] - C: HasCollectible [INFO] - ...ageMultiplierProvider/createDamageMultiplierProvider.lua(85): callbackFn [INFO] - ...aac Rebirth/mods/stats-plus_2729900570/lualib_bundle.lua(304): ? [INFO] - ...ces/extension/provider/resolvers/ComputablesResolver.lua(63): ? [INFO] - C: pcall [INFO] - ...ces/extension/provider/resolvers/ComputablesResolver.lua(60): getTotalCollectibleMultiplier [INFO] - ...ageMultiplierProvider/createDamageMultiplierProvider.lua(135): ? [INFO] - C: pcall [INFO] - ...ageMultiplierProvider/createDamageMultiplierProvider.lua(133): recomputeMultiplier [INFO] - ...ageMultiplierProvider/createDamageMultiplierProvider.lua(154): Function [INFO] - Caught exception, writing minidump...

geuks commented 11 months ago

I'm using this mod for restarting, https://steamcommunity.com/sharedfiles/filedetails/?id=2917382429

aleksander-ciesielski commented 11 months ago

hey, thank you for reporting the issue!

I managed to reproduce it, but it required hundreds or even thousands of restarts - did you experience something similar or can it also happen within the first couple of restarts? Also it's weird that this error is happening as this function invocation is wrapped inside try/catch statement which is transpiled down to Lua pcall, so theoretically it shouldn't throw 🤔

I analysed the memory usage as well and doesn't look like there's a memory leak.

geuks commented 11 months ago

Not really, but it happens more often when I leave my current game and start a new one, instead of using the R key. Which, by the way, is another error: [INFO] - RNG Start Seed: SBR9 NXD9 (2410711473) [New, 1] [INFO] - Initialized player with Variant 0 and Subtype 10 [INFO] - Level::Init m_Stage 1, m_StageType 2 Seed 1014909930 [INFO] - Curse of the Lost! [INFO] - delete 0 generated rooms. [INFO] - generate... [INFO] - place_room: shape 8 [INFO] - 11 rooms in 6 loops [INFO] - placing rooms... [INFO] - Map Generated in 1 Loops [INFO] - CURRENT ROOM INDEX 84 2938d0d4 [INFO] - Room 1.2(Start Room) [INFO] - SpawnRNG seed: 3906800175 [INFO] - Lua mem usage: 10583 KB and 453 bytes [INFO] - Adding collectible 609 (Eternal D6) to player 0 (The Lost) [INFO] - Lua stack trace: [INFO] - C: GetCollectibleNum [INFO] - ...damageMultiplierProvider/data/collectibleMultipliers.lua(89): ____opt_3 [INFO] - ...ageMultiplierProvider/createDamageMultiplierProvider.lua(76): ? [INFO] - ...ces/extension/provider/resolvers/ComputablesResolver.lua(63): ? [INFO] - C: pcall [INFO] - ...ces/extension/provider/resolvers/ComputablesResolver.lua(60): ? [INFO] - C: pcall [INFO] - ...ageMultiplierProvider/createDamageMultiplierProvider.lua(86): callbackFn [INFO] - ...aac Rebirth/mods/stats-plus_2729900570/lualib_bundle.lua(304): ? [INFO] - ...ces/extension/provider/resolvers/ComputablesResolver.lua(63): ? [INFO] - Caught exception, writing minidump...

aleksander-ciesielski commented 11 months ago

I have good news: I think I found the root cause of this (and related) errors, and apparently, it was due to not unloading the damage multiplier provider after the game restart, which caused it to recompute the multiplier for a player that no longer exists. Still, it shouldn't crash the game as the recomputation was wrapped inside a try/catch statement, but whatever.

The fixed version has already been released and shouldn't crash anymore. If it does, though, feel free to re-open the issue; thanks 🤗