Fix preview notes/walls crash #8#9
Merged
Merged
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/ObstacleControllerscripts. These scripts are not designed to run in the main menu scene, andNoteController::Updatewould lead to a null reference exception inNoteWaiting::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
NoteControllerandObstacleControllerfrom 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.