ink icon indicating copy to clipboard operation
ink copied to clipboard

Crash bug in story-location approximation warnings

Open russellquinn opened this issue 2 years ago • 0 comments

When loading a saved state for an Ink story that has changed significantly (common during development), I'm getting frequent crashes in Callstack.cs's warning about the story location being approximated, because pointer.container — referenced in the warning message — is null.

The warning in Callstack.cs that is causing the problems:

storyContext.Warning ("When loading state, exact internal story location couldn't be found: '" + currentContainerPathStr + "', so it was approximated to '" + pointer.container.path.ToString() + "' to recover. Has the story changed since this save data was created?");

If I just take out the warning, everything works. The location is approximated correctly elsewhere in the Ink runtime and I can use my saved state.

I'll submit a pull request that lets this warning be more flexible and not crash.

russellquinn avatar Jul 27 '22 16:07 russellquinn