Dealing with Crashes

From Custom Mario Kart: Double Dash Wiki!!
Jump to navigation Jump to search

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 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.

On Dolphin Emulator

  • 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.

Crashes on Non-Vanilla Courses

Address (NTSC-U) Function Name Where it occurs Description Solution
0x801cf4d0 ResMgr::getPtr(ResMgr::CourseDataId) Course loading The total .arc size is over 2400 kB Reduce .arc file size
0x80230af0 - Course loading A .btk file references a texture that does not exist in the .bmd Edit the .btk to remove the material animation, or add the animation to the .bmd
- - 1p Grand Prix Course loading There are too many objects on the course (especially item boxes) Simplify the course - take out item boxes / simplify models

Crashes on Non-Vanilla Characters

Address (NTSC-U) Function Name Where it occurs Description Solution
- - Course / Character loading Your MRAM.arc file is too large Reduce character file size
0x801cf600 ResMgr::getPtr(ResMgr::ArchiveId, char const *) Opening Lakitu scene Your MRAM.arc file is way too large See if there are any undesirable files left in MRAM.arc
- - Course / Character loading Your character model is too large
- - Course / Character loading The material names are not correct (especially the eye material) Make the eye material match vanilla