Open Recognized opened 1 week ago
This seems to be addressed in v2.0, but I have to use 1.10.3 due to compatibility with clang.
Thank you for the bug report.
This coroutine changes world
Ouch. Yes, that's not handled well by UE5Coro 1 (see #22, #23), and fixing it required breaking changes that went far beyond the scope of a theoretical v1.11. Because of that, I'm inclined to treat this as a wontfix for v1 specifically, but I'd like your input before doing so. Maybe there's a low-hanging fruit somewhere, or this could be a separate, independent bug that I'm too hasty to consider a duplicate.
This seems to be addressed in v2.0
Thank you for testing this.
due to compatibility with clang.
There are a few things that you can try to work around your current situation. Your coroutine doesn't look particularly latent to me, so I'd first suggest not forcing it to latent mode. There's a good chance you'll be able to fix it right away. Since you'll be losing "latent this
protection", the coroutine should look more like the left example here and work with a TWeakObjectPtr<UMyGameInstance>
instead of this
. This removes pretty much all world access by UE5Coro itself, and your code can get it right. Make sure to avoid latent awaiters in this case, too!
Alternatively, you can remove the LlvmTrap()
from v2.0 at your own peril, if you're absolutely sure that none of your lambdas are affected by the bug that it refers to. Other than this, things are relatively stable with Clang; v2.0 was mainly developed on it before MSVC was fixed!
The trap is mostly there for user safety, because behavior will silently change between compilers. Ironically, the Clang bug provides a better user experience in this case than what C++20 mandates :)
Application crashes in a cooked build (sometimes). Crash rate is ~80%. I might have done something wrong, though...
UE5Coro version: tag v1.10.3 UE: Version: 5.4.4-35576357+++UE5+Release-5.4 Platform: Windows 10 (22H2) [10.0.19045.5011] (x86_64)
The reason is probably in code like this:
This coroutine changes world and
CallbackTarget
becomes deleted. Though, there is no reason to register this coroutine with world context since game instance outlives the world.