Skip to content

Fix preview notes/walls crash #8#9

Merged
Metalit merged 1 commit into
Metalit:mainfrom
CatsaCode:preview-fix
Apr 13, 2026
Merged

Fix preview notes/walls crash #8#9
Metalit merged 1 commit into
Metalit:mainfrom
CatsaCode:preview-fix

Conversation

@CatsaCode
Copy link
Copy Markdown
Contributor

Fixes a crash that would occur when a default note or wall preview was created, and NE or Chroma was installed.

An instantiation of the default note or wall prefab will include the NoteController / ObstacleController scripts. These scripts are not designed to run in the main menu scene, and NoteController::Update would lead to a null reference exception in NoteWaiting::ShouldWait. Unity C# would catch this error and pipe it to logcat, preventing the game from crashing but still creating an unstable system.

When NE or Chroma hooks NoteController, the call stack is placed within a C++ exception handler, which is programmed to crash when it detects an error. It is also unable to read the C# error message, hence the mysterious crash.

Removing NoteController and ObstacleController from the preview models will prevent the GameCore-only code from running, stop the C# exception, stop the C++ exception handler from crashing, and even stopping NE/Chroma from attempting to hook the preview objects.

Note: This only fixes one of the two NE/Chroma + Custom Model preview crashes. The other issue is caused by NE/Chroma only updating the "is modchart" variable while reading custom map data (leaving it true even after GameCore ends) and will be addressed in NE and Chroma.

@CatsaCode
Copy link
Copy Markdown
Contributor Author

The secondary crash has now been addressed in NE and Chroma.

@Metalit Metalit merged commit 8cea37b into Metalit:main Apr 13, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants