The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

Isaac.Spawn() Crash Fix
16 Comments
kanye south 24 Apr @ 9:44am 
this sounds overpowerd for weak pcs
10/10
Guantol  [author] 23 Nov, 2024 @ 3:35pm 
@Roak Yes, it's still present.
Roak 23 Nov, 2024 @ 3:08pm 
does this issue still occur in rep+?
Guantol  [author] 15 Sep, 2024 @ 6:03pm 
@Hamburger:
Fun fact: this can also happen in non modded isaac. Specifically everytime an ember effect is spawned whilst in burning basement there is a chance it crashes the game.
Hamburger 15 Sep, 2024 @ 3:37pm 
im not gonna install this, because I wanna have fun knowing that there's a 0.00000000023283064365386962890625% chance that the game randomly decides to kill itself after an item is spawned through a mod.
DILEREK115 30 Jun, 2024 @ 4:44pm 
kto pubi boberki :steamsalty:
Guantol  [author] 29 Jun, 2024 @ 3:20am 
@Fred RNGesus wasn't on your side.
Former President, George W. Bush 28 Jun, 2024 @ 7:48pm 
dude I uninstalled this and my next run this exact crash happens
Guantol  [author] 26 Jun, 2024 @ 2:06pm 
@ZilusLules
No, that's not what I meant.

In the modding API there is a function named Isaac.Spawn() which is what allows any mod to spawn an entity
In this game most things are entities: Players, Familiars, Pickups (Coins, Collectibles, Chests, Keys, Bombs, etc.), Enemies, Bosses, Visual Effects, etc.

Whenever a mod tries to spawn one of these in the game they most likely will use the Isaac.Spawn() function (As it was the recommended function in the Documentation, until I discovered the crash).

However this function has a very rare chance of setting the entity's RNG seed to 0, which crashes the game.

So actually this helps if you are using any mod that spawns anything in the game (which will most likely be most mods).
ZilusLules 26 Jun, 2024 @ 1:49pm 
So you're saying that this helps in this type of situation:

Plays with mods and paused, leaves to continue the run on the later, goes back and the game crashes when i press "continue"
Mr. Headcrab 25 Jun, 2024 @ 2:48am 
finally
NihilRetnar 24 Jun, 2024 @ 8:32am 
Thank you, cannot be noticed in terms of milliseconds in a timescale I'm not worried about lmao.
Guantol  [author] 24 Jun, 2024 @ 8:16am 
I reworded the Regarding Performance section, to make the impact of the patch on the game clearer.
Guantol  [author] 24 Jun, 2024 @ 7:53am 
Yeah, it unfortunately is an inevitability of adding the necessary security checks, though to be frank this won't be what causes a mod to actually skip frames, as the slowest part of the function is the spawning of the entity itself.

For comparison the checks only starts showing their effect when you spawn about 10000 entities on the same frame, but by that point the game goes at 6 FPS.

Frames start to be skipped at about 1000 spawns a frame and you can't notice a millisecond of delay, so the whole "the function has become slower" is irrelevant, in practice.
NihilRetnar 24 Jun, 2024 @ 7:42am 
So... a little more lag to fix a 1 in 4294967296 seed crash for a function used everywhere? Definitely going to help someone in some edge case though so good job.
Paige 22 Jun, 2024 @ 11:46am 
I cannot believe it... could it be real, the greatest Isaac mod ever created?! :steamhappy: