Closed nwilson100 closed 6 months ago
ACoroExitTest::BeginDestroy() is calling the coroutine when
Case A: !IsValid(this)
Case B: !IsValid(GetWorld())
Guarding against both resolves the crash in the repro case.
The issue of FLatentPromise being too generous with starting latent actions is exactly the same as in #22 so I'll close this one as a duplicate.
I encountered this crash while attempting to create a clean repro for a different crash I was encountering. I'm unsure if anyone would realistically encounter this specific situation, but in case it might help improve the systems, figured I would also report this.
This was tested including the recent changes in your commit 0cf2485.
Source for required class CoroExitTest attached to this issue: CoroEditorLevelCrash.zip
Repro Case A:
Repro Case B:
Images here for the call stack of the crash and information about the FLatentPromise. The coro frame ptr is not available at the point of crashing, so no image of its state is provided.
![LatentPromise1](https://github.com/landelare/ue5coro/assets/20266400/460f3e83-63ef-4ff3-bdde-d8848fa117cc)