Closed zhaozigu closed 3 months ago
Hi, thanks for the contribution! Do you know why this is being called by the fetch worker in the first place? Shouldn't it close without updating when the editor is exiting? I think that would be a better fix.
Hi, thanks for the contribution! Do you know why this is being called by the fetch worker in the first place? Shouldn't it close without updating when the editor is exiting? I think that would be a better fix.
It's likely due to an unstable network connection combined with the time lag caused by multi-threading. This results in the update operation occurring after the user has already closed the editor.
Maybe it's better to keep a reference in the worker thread to the module, and release it on each update loop. I think this will hold the module until deref. That way we won't have to worry about any function we are calling needing to handle module.
Perhaps we could consider using Unreal's subsystems, which would make the module's lifecycle simpler and more controllable. Of course, this is just my immature suggestion, as my understanding of this plugin's implementation is still quite limited.
That may be good! I will accept this PR for now though, if you add a TODO comment about more robust module handling.
OK. I've added a comment.
Pre-check to prevent assertion failure crash #171