RSDKModding / RetroED

RetroED v2.0
GNU General Public License v3.0
27 stars 5 forks source link

[Scene Editor] Canceling selecting GameConfig (re)loads scene; can cause errors and crashes #141

Closed MegAmi24 closed 2 months ago

MegAmi24 commented 2 months ago

Before opening this issue, I ensure that...

Editor Tool

Scene Editor

RSDK Version

v1, v2, v3, v4, v5

Expected Behavior

When clicking the Cancel button when the editor asks for a GameConfig.bin file, nothing happens aside from the file dialog window closing

Actual Behavior

When clicking the button when there's a scene open in the editor, it attempts to reload the current scene, or in the case of v5, the scene selected in the Open dialog window

Steps to Reproduce

Some example cases of this bug causing issues:

Mismatching v5 GameConfig issue:

  1. Open a v5 scene
  2. Click File > Open
  3. Select a scene from another v5 game
  4. When prompted for a GameConfig.bin file, click Cancel
  5. Editor will load the newly selected scene with the GameConfig and game logic/assets from the scene that was loaded before

Mismatching engine version crash:

  1. Open a pre-v5 scene
  2. Click File > Open
  3. Select a scene from a game with a different engine version, ensuring you select the correct engine version in the format box
  4. When prompted for a GameConfig.bin file, click Cancel
  5. Editor will attempt to reload the current scene with the new engine version, inevitably crashing

Screenshots

No response

Was another editor used on the file(s)?

No response

Platform

Windows

Additional Comments

No response