Crash: Difference between revisions

3,145 bytes added ,  17 March 2020
fixed misinformation, huge revamp
No edit summary
(fixed misinformation, huge revamp)
Line 1: Line 1:
A '''Crash''', '''Freeze''', or '''Hardlock''' is what happens when [[Super Mario 64]]'s code encounters an error, such as a division-by-zero, that causes the game to stop running and rendering frames. The audio may still play. This is in contrast to a [[Softlock|softlock]], where the game does still run but is stuck in an indefinite state or a loop where no controller input can change it.
A '''Crash''', '''Freeze''', or '''Hardlock''' is when the [[Threads#Game Thread|game thread]] of SM64 stops executing instructions (as opposed to a [[Softlock|softlock]], where the game is still running as normal but is stuck in a loop without any way to get out). Crashes can occur in several different ways, such as a game thread exception or an [[RCP]] (graphics) crash.


== Ways to crash the game ==
==CPU Crashes==


{| class="wikitable sortable"
{| class="wikitable sortable"
! Cause !! Exception Type !! Notes
! Cause !! Exception Type !! Notes
|-
|-
| Exceed the [[Objects#Object Limit|object limit]] || style="background-color: #ffb65e"| Infinite Loop || Can be done via a variety of methods including cloning, hat duplication, build-up of monty-mole pellets, or money-bag duplication. Enters an intentional while(1) loop.
| Exceed the [[Objects#Object Limit|object limit]] || style="background-color: #ffb65e"| N/A || This is technically not a crash as the game developers accounted for this scenario and made the game enter an infinite loop. However, this infinite loop has the same symptoms as a crash and is one for all practical purposes, so it is included here. This "crash" can be done via a variety of methods including cloning, hat duplication, monty-mole pellet build-up, or money-bag duplication.
|-
|-
| Have too many [[Objects|objects]] at once on the screen|| style="background-color: #baffa8"| ||
| Send the camera into a [[Parallel Universe|PU]] || style="background-color: #ff9696"| Floating-Point Overflow ||
|-
|-
| Send the camera into a [[Parallel Universe|PU]] || style="background-color: #ff9696"| Floating-Point Exception ||
| Walking at PU speed for only a portion of the 4 quarter steps on a [[frame]] || style="background-color: #ff9696"| Floating-Point Overflow ||
|-
|-
| Walking at PU speed for only a portion of the 4 quarter steps on a [[frame]] ||  style="background-color: #baffa8"| ||
| Moving at PU speed with no joystick input for all 4 quarter steps on a frame ||  style="background-color: #ff9696"| Floating-Point Overflow ||
|-
|-
| Moving at PU speed with no joystick input for all 4 quarter steps on a frame ||  style="background-color: #baffa8"| ||
| Moving 16384 distance into a wall (Often a PU Crash) ||  style="background-color: #ff9696"| Floating-Point Overflow ||
|-
|-
| Moving 16384 distance into a wall (Often a PU Crash) || style="background-color: #ff9696"| Floating-Point Exception ||
| Walking with a speed greater than or equal to 2^31 / 170 (~12.632M) || style="background-color: #ff9696"| Floating-Point Overflow || Mario's speed is multiplied by 170 in some intermediate calculations and casted to an int. When this cast exceeds 2^31 an FPE occurs.
|-
|-
| Walking with a speed greater than or equal to 2^31 / 170 (~12.632M) || style="background-color: #ff9696"| Floating-Point Exception ||
| Turning during a walking action such that speed times change in yaw is greater than or equal to 2^31 * 12 (~12.583M with dyaw = 2048) || style="background-color: #ff9696"| Floating-Point Overflow || Similar to the above.
|-
|-
| Turning during a walking action such that speed times change in yaw is greater than or equal to 2^31 * 12 (~12.583M with dyaw = 2048) || style="background-color: #ff9696"| Floating-Point Exception ||
| Bully Knockback Division-by-Zero || style="background-color: #ff9696"| Floating-Point Division-by-Zero || By positioning Mario at the exact same X and Z coordinates as the bully, a division-by-zero exception occurs when the game divides by the lateral distance between Mario and the bully to calculate Mario and the bully's new speed after the collision.<ref>[https://www.youtube.com/watch?v=8jd3A2euOjg "Game Crash from Bully Knockback DIV/0" by UncommentatedPannen]</ref>
|-
|-
| Bully Knockback dividing-by-zero || style="background-color: #ff9696"| Floating-Point Exception ||
| Bully/Bob-omb Angle Overflow || style="background-color: #ff9696"| Floating-Point Overflow || When a Bully or Bob-omb is out-of-bounds, the code to keep their angle between -32768 and 32767 doesn't run, and eventually it becomes big enough that a floating-point overflow exception occurs when casted back to an int.<ref>[https://www.youtube.com/watch?v=ZrMxO1eZPGU "Game Crash from Bully Angle Double-to-Int Conversion" by UncommentatedPannen]</ref><ref>[https://www.youtube.com/watch?v=kwQu5qQg-M0 "Game Crash from Bob-omb Angle Double-to-Int Conversion" by UncommentatedPannen]</ref>
|-
|-
| Failed Bully/Bob-omb angle double-to-int conversion || style="background-color: #ff9696"| Floating-Point Exception ||
| Deleting a non-existent file on the File Select Screen<ref>[https://youtu.be/-N5OQPgA6YI "How to crash Super Mario 64 in 20 seconds" by rattleman123456]</ref> || style="background-color: #fffca8"| Address Error || The game tries to find the button object corresponding to the file and set its state to erased. However, the button object doesn't exist (a New File button is there instead), so it ends up trying to write to NULL.
|-
|-
| Deleting a non-existent file on the File Select Screen<ref>[https://youtu.be/-N5OQPgA6YI "How to crash Super Mario 64 in 20 seconds" by rattleman123456]</ref>|| style="background-color: #baffa8"| ||Go to "Copy" right when you get to the file select, then press "Score", press on any file without save data, go to Erase, and click on yes.
| Moving a shadow above [[surface]] 12 while it's over OOB || style="background-color: #fffca8"| Address Error ||
|-
|-
| Moving a shadow above [[surface]] 12 while it's over OOB || style="background-color: #baffa8"| ||
| Killing a Monty Mole remotely || style="background-color: #fffca8"| Address Error || The game tries to find which hole the Monty Mole should spawn in, but all the available holes are too far away from Mario, so no hole is chosen and the Monty Mole tries to go to a null hole.<ref>[https://www.youtube.com/watch?v=P4AQ9AmWa9s "Long Range Monty Mole Kill Game Crash" by UncommentatedPannen]</ref>
|-
|-
| Killing a Monty Mole remotely || style="background-color: #fffca8"| [[Address Error Exception]] ||  
| Killing an uninitialized Monty Mole<ref>[https://www.youtube.com/watch?v=aafLNwyR5kk "Uninitialized Monty Moles" by UncommentatedPannen]</ref> || style="background-color: #fffca8"| Address Error || Similar to above.
|-
|-
| Killing an uninitialized Monty Mole || style="background-color: #fffca8"| Address Error Exception ||  
| Going out of bounds in a room with a painting || style="background-color: #fffca8"| Address Error || Paintings use the floor type of Mario's floor to decide how they should ripple. Going out-of-bounds causes them to try to read the floor type of null.
|-
|-
| Going out of bounds in a room with a painting || style="background-color: #fffca8"| Address Error Exception ||  
| Being pushed off of a hangable [[ceiling]] while hanging and stationary without another ceiling above || style="background-color: #fffca8"| Address Error || The game has a check to make Mario enter freefall if the ceiling above him is not hangable. The programmers failed to account for the ceiling being NULL, so if Mario is pushed off the ceiling and has no ceiling above him the game will try to read the type of a null ceiling and crash.
|-
|-
| Being pushed off of a hangable [[ceiling]] while in the idle hanging or start hanging action || style="background-color: #fffca8"| Address Error Exception ||
| Sound glitch || Unknown || "Sound glitch" refers to when the audio thread encounters an exception (usually an address error exception), therefore causing the sound to cut out. When the game thread next tries to interface with the audio thread on a level load, the game thread crashes as well. Sound glitch is often treated as one singular glitch even though it is really a class of glitches in the audio library. Sound glitches are usually J-exclusive, however some instances such as the [[BitS]] sound glitch are not.
|-
|-
| Sound glitch (J only) || style="background-color: #fffca8"| Address Error Exception ||
| Teleporting while passing over a loading zone || style="background-color: #fffca8"| Address Error || Since the area changed, there is now no teleporter with the same ID as the one Mario used to warp. Thus the game returns NULL when trying to find the teleporter to warp to, and crashes when trying to access information about its destination.
|-
|-
| Moving the camera immediately when entering [[VCutM]] || style="background-color: #baffa8"| ||
| Warping out of a level while passing over a loading zone || style="background-color: #fffca8"| Address Error || Similar to above, but only hypothetical. Maybe possible in DDD using the Sub Gate warp and whirlpool cloning to reach the instant loading zone. Not yet achieved in Vanilla.
|-
|-
| Getting infinite [[speed]] || style="background-color: #ff9696"| Floating-Point Exception ||
| Entering Wiggler's Cave on the Disk Drive version || style="background-color: #ff9696"| Floating-Point Unimplemented Operation || When Wiggler is initialized, his health value is 1024 for a single frame before being reset to 3. Wiggler uses his health to index into a table to get his speed (to move faster when at lower health); 1024 causes it to index out of range and read a denormalized floating-point number as his health, which causes an unimplemented operation exception since the N64 does not implement any operations on denormalized floats except comparisons.
|-
|}
| Going near a painting after getting game corruption ||  style="background-color: #baffa8"| ||Not possible on console, due to the way [[Emulators]] and [[Virtual Console]] handle addresses.
 
|-
==RCP (Graphics) Crashes==
| [[BitS]] entry sound glitch ||  style="background-color: #baffa8"|  ||8 known instances, not been reproduced. Not J only.
 
|-
{| class="wikitable sortable"
| Teleporting while passing over a loading zone || style="background-color: #fffca8"| Address Error Exception ||
! Cause !! Exception Type !! Notes
|-
| Warping out of a level while passing over a loading zone ||  style="background-color: #baffa8"| || Maybe possible in DDD using the Sub Gate warp and whirlpool cloning to reach the instant loading zone. Not yet achieved in Vanilla.
|-
|-
| Passing a boo over surface 12 over NULL ||   style="background-color: #baffa8"| || Possibly a non-existant crash if the shadow crashes the game first. Not yet achieved in Vanilla.
| Have too many [[Objects|objects]] at once on the screen|| ||  
|-
|-
| Loading Wiggler's Cave (DD Only) || style="background-color: #ff9696"| Floating-Point Exception (Invalid Float)|| Wiggler indexes out of range and reads a denorm as his health, which doesn't exist on console.
| Moving the camera immediately when entering [[VCutM]] || style="background-color: #fffca8"| Invalid F3D command || The object that spawns the rotating checkerboard platforms in VCutM references a model that doesn't exist. Normally this isn't a problem, since it's not on screen so it's culled before any damage occurs, and it despawns 1 frame after loading the level. However rotating the camera on the first frame, right before it despawns, it just barely comes into view. The non-existent model ends up sending invalid F3D commands to the RCP.
|}
|}