-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UE 5.3, Most Recent Update, Any GC causes a freeze, just this once I caught a crash as well confirming my sus its the plugin. #56
Comments
Thanks for reporting, I will look into it as soon as I can. |
Sadly, I'm not able to reproduce neither the freeze nor the crash. I was trying to just run WaitForSeconds coroutine and forcing GC and I was trying to run WaitForSeconds and destroy the calling Actor before the time is up, forcing GC on it, but still the ECF handles everything gracefully. I found a small issue, probably not related to this problem, but I've pushed some fixes to the version 3.3.9. They are already on github, UE Marketplace will take few hours to process it. I have no faith that this is it, but maybe... Otherwise I'd need an example of how you use WaitForSeconds and maybe then I will be able to reproduce the issue. It might be because of some more complicated flow I'm not able to imagine. |
More context, I literally only use the coroutine once in one way, this is the way.
|
Also note the last comment here. Seems related but can't see me not having a UObject without the UPROEPRTY macro on it. |
Ok, I was able to reproduce it. I just had to run multiple co_awaits in one coroutine and run GC. The problem has appeared in the update 3.3.6 where I was trying to resolve the potential problem of dangling coroutine handles, which might occur if the coroutine has never being resumed. I reverted changes from 3.3.6 and let coroutine handles clean itself after the coroutine function. The only moment the handle will not clean itself is if it will never be resumed (for example, because the calling Actor has been destroyed before the coroutine resume). But it's an edge case and the potential memory leak will not be so big. I don't know how to handle such situations properly too. The version on Marketplace will be live in few hours. |
Just writing down to not forget: The idea of how to handle it:
|
The version 3.3.11 with fixed coroutine handles clearups is on the Marketplace. @nonlin - can you confirm if everything is ok, so I could close this issue? |
I did not receive any feedback, I assume everything works fine. I'm closing the issue. |
Using the code from the Unreal Marketplace, saw an update and did it and now I got this strange behavior.
I think prior to the update it was ok, might look at fetching and using older code from here.
Basically it seems like once I start using a coroutine and do "WaitForSeconds" once Unreal decides to do Garbage Collection it would freeze the editor. Somehow I finally got Rider to report a crash (many tests not even Rider would catch a crash, editor would just be frozen and windows didn't even think it stopped responding, but wouldn't even close).
The text was updated successfully, but these errors were encountered: