"Object reference not set to an instance of an object."

Summary of Bug:
What you were doing at the time: I was in Pebble Cave and my team fainted because my game stopped communicating with the server or something and I couldn’t fight against the pokemon that was attacking me. I got frustrated, quit, and came back a couple hours later.
Where you were in the game/menus: Pebble cave dungeon; my team fainted and I was at the “give up?” menu
What happened: When I load the game, this error appears: “Object reference not set to an instance of an object.”
And then this text under “details”:
System.NullReferenceException: Object reference not set to an instance of an object.
at ‮‌‫‍‭‫‌‮‭​‌‏‬‏‬‬​‭‍‭‮‏‮‪‮.‮‫‬‌‎‏‏‬‪‎‌‌‍‪‎​‫‍‎‮‏‫‍‌‎​‎‍‮‮(KeyboardEventArgs )
at ‭​‮‫‬‫‪‮‮‌‌‪‫‍‎‪‍‮‬‫‬‍​‎‭‪‮‮.​‌​‍‬‌‭‌​‭​‎​‬‪‬​​‎‍‫‍‮(Object , KeyboardEventArgs )
at SdlDotNet.Widgets.Widget.OnKeyboardUp(KeyboardEventArgs e)
at SdlDotNet.Widgets.Screen.HandleKeyboardUp(KeyboardEventArgs e)
at SdlDotNet.Widgets.WindowManager.HandleKeyboardUp(KeyboardEventArgs e)
at ‬‌‍‫‭‍‏‭‍‭​‬‍‌‬‏‬‭‍‫‭‮.‌‍‬‎‎​‪‎‎‎‪‭‭‫‌‍‌‭‏‎‬‫‮‮(Object , KeyboardEventArgs )
at SdlDotNet.Core.Events.OnKeyboardUp(KeyboardEventArgs e)
at SdlDotNet.Core.Events.ProcessEvent(SDL_Event ev)
at SdlDotNet.Core.Events.Poll()
at SdlDotNet.Core.Events.ThreadTicker()
at SdlDotNet.Core.Events.Run()
at ‍‫‎‏‬‌‏‏‮​‭‎‍‍‫‌‬‮‮​‎‪‍‌​‍‮.‬‎‫​‫‬‏‭‌‬‪‮‍‪‍‭​​‮‍‮‍‌‍‮‪‮‏‮‫‮()
at ‮‬​‍‬‍‍‍‌‮‏‏‌‬‮‫‪‏‍​‏​‮.‫‬‫‪‎‍‫‮‏‬‍​​‌‏‮‬‬‪‫‏‌‫‪‮()
at ‮‬​‍‬‍‍‍‌‮‏‏‌‬‮‫‪‏‍​‏​‮.‮​‮‏‫‍‎‎‏‬‍‌​​‏‍‮‎‎‮‭‬‎‌‍‌‮()
at ‮‬​‍‬‍‍‍‌‮‏‏‌‬‮‫‪‏‍​‏​‮.‎‮‏‪‌​‎‭‪‌‏​‌‏‪‭​‏‪​‭‬‭‭‏‮‌‭‮(String )
at ‬‮‬‪‪‫‏‌​‭‍‫‏‫‭‭‭‪‪‍‍‬‮‮.‪‌‬‎‫‮​‎‪‬‮‮‭‭‌‍​‮‪‪‮​‎‮‏‬‫‬‮(String )

When you close the error message, the game closes.

OS/Version: Windows 10

Expected Result: The game would let me give up the dungeon normally

Actual Result: Game gives an error and then closes

Steps to reproduce:

  1. Faint in Pebble Cave dungeon (or probably just any dungeon?)
  2. Exit the game at the screen where it asks you if you want to give up
  3. Load the game again

Visual Proof (screenshots, videos, logs) - attached below:

update: it somehow fixed itself i think? i opened the game again just now and i spawned in the middle of the crossroads with no errors

This is an uncommon bug. Did you go in with any escape or reviving items by any chance?

No, unless I picked up an Escape Orb while in the dungeon, but I don’t remember if I found any Escape Orbs while in the dungeon before the bug happened.