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

LaunchIntoActivity with a bad DefaultSceneName crashes without error report #472

Open
traunts opened this issue Dec 16, 2022 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@traunts
Copy link
Collaborator

traunts commented Dec 16, 2022

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.

@traunts traunts added the bug Something isn't working label Dec 16, 2022
@MaximDude MaximDude self-assigned this Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants