TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.2k stars 385 forks source link

Crash when choosing to discard unsaved TAStudio changes after triggering rom load #3973

Closed YoshiRulz closed 4 months ago

YoshiRulz commented 4 months ago

How has no-one reported this. Is it Linux-only?

To repro:

  1. Load any rom with any core
  2. Launch TAStudio, creating a new project
  3. Frame advance
  4. Choose the current rom from the recents menu (or load any rom in any way, it seems)
  5. Select "No" (i.e. discard) when prompted
  6. Crash :(

Under Mono, an exception dialog appears, but it's a red herring and the actual exception is printed to stdout:

System.NullReferenceException: Object reference not set to an instance of an object
  at BizHawk.Client.EmuHawk.TAStudio.Restart () [0x00044] in <b958a9d8a22648729481d386cfbd2796>:0 
  at BizHawk.Client.EmuHawk.ToolManager.Restart (BizHawk.Client.Common.Config config, BizHawk.Emulation.Common.IEmulator emulator, BizHawk.Emulation.Common.IGameInfo game) [0x000b4] in <b958a9d8a22648729481d386cfbd2796>:0 
  at BizHawk.Client.EmuHawk.MainForm.LoadRomInternal (System.String path, BizHawk.Client.Common.LoadRomArgs args, System.Boolean& failureIsFromAskSave) [0x00770] in <b958a9d8a22648729481d386cfbd2796>:0 
  at BizHawk.Client.EmuHawk.MainForm.LoadRom (System.String path, BizHawk.Client.Common.LoadRomArgs args, System.Boolean& failureIsFromAskSave) [0x00001] in <b958a9d8a22648729481d386cfbd2796>:0 
  at BizHawk.Client.EmuHawk.MainForm.LoadRomFromRecent (System.String rom) [0x0001d] in <b958a9d8a22648729481d386cfbd2796>:0 
  at BizHawk.Client.EmuHawk.ToolExtensions.ToolExtensions+<>c__DisplayClass0_1.<RecentMenu>b__3 (System.Object o, System.EventArgs ev) [0x00001] in <b958a9d8a22648729481d386cfbd2796>:0 
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x00019] in <95539f56fe134809a63c4a6bb54c71a3>:0
[...]

Affects:

Morilli commented 4 months ago

Are you sure you can reproduce this on a clean 2.9.1? Because it very much looks like this wascaused by https://github.com/TASEmulators/BizHawk/commit/4c39a81228886f28200916bb6db1d248b2a52da8 (commit message 🙃)

YoshiRulz commented 4 months ago

Shell history says yes but I don't recall. Trying again, I'm hitting a few unrelated bugs but not this one.