Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

LaunchIntoActivity with a bad DefaultSceneName crashes without error report #472

@traunts

Description

@traunts

Describe the bug
When a user has set the settings.ini property LaunchIntoActivity and specified an invalid DefaultSceneName, the game will hard crash on load without providing any feedback to the user. No RTEA Error message or otherwise.

To Reproduce
Steps to reproduce the behaviour:
Edit the settings.ini file to contain the following lines:

...
////////////////////////////////////////////////////////////////////////
// Default Activity Settings

	LaunchIntoActivity = 1
	DefaultActivityType = GAScripted
	DefaultActivityName = Test Activity
	DefaultSceneName = INVALID < ---- 

...

and launch the game. You'll hear the MenuEnter sound, as though the edit menu has opened, and the game will crash without an error display.

This can occur when launching into a modded scene that is no longer present, or if a user mistypes the name of an existing scene.

Expected behaviour
The game should inform the user that the DefaultSceneName is invalid, or at the very least indicate that the activity failed to restart and give a user-readable abort message.

Better yet, should default to the main menu and open the console to fail gracefully.

Screenshots
The offending line from debug:
image

Where the BuyMenu create is never called (missing this check):
image

This is a result of GameActivity::Start() returning early due to a non-zero exit status from the chain:
GameActivity::Start() -> Activity::Start() -> SceneMan::LoadScene() -> SceneMan:SetSceneToLoad(m_DefaultSceneName) where the sceneRef fails to load and is null.

All of these propagate an error return status of -1 up the stack, and several prints to console, but none call RTEAssert().
Likely because these are used to load/reload an activity in-game (as well as on load), where the action can be aborted and errors displayed in the console, whereas there's no functionality for that here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions