Dealing with Crashes

Overview
Crashes, defined here as anything that causes the game to wrongfully stop execution, are an inevitable part of the modding process. However, a crash does not mean that you have to give up on your project - there are ways to identify the cause of a crash and to fix the issue.

Getting an Address
Crashes occur when game code cannot handle the current state of affairs in the game. All lines of the game code have their own address. Getting this address can help identify the issue. The method of getting the address depends on what platform you are using.

On Nintendont On Dolphin Emulator
 * On a crash, enter the button combination in this tweet from UnclePunch: A->B->X->Y->L->R->Z
 * The hexadecimal number next to "SRRO" (800ADA7CH in the image in the tweet) is the address that caused the crash.
 * If you have "Use Panic Handler" on (in Config -> Interface), a popup will automatically occur in the event of a crash.
 * The second number (after “PC =”) is the address
 * If you are not using Dolphin's panic handler, the instructions for Nintendont can be used.

Using the Address
A lone address is not really much information on its own - you need a symbol map that gives you the name of the function that contains the line of offending code. With a demangled symbol .map file, the name of the function that is causing the crash is the function with the largest address (first column) that is smaller than the address you found.

Catching Crashes
It is important to test a mod on all relevant game modes to try to catch as many crashes as possible. This usually means grand prix mode, time trial mode, and multi player mode.

As a general rule, if a mod doesn’t crash on the latest dev version of Dolphin, it will also not crash on Nintendont. However, there are some exceptions.
 * Alignment errors occur when a file does not have enough padding. This is usually the fault of the program and not the user.

Common Crashes (and their solutions)
This section needs work.