Closed RachithP closed 3 years ago
Apologies for the delay in responding to this issue, I've been drowning in work over the past few months and progress on addressing my GitHub backlog has been frustratingly slow.
Hmmm, that's strange that it works from inside a project but fails from inside a plugin. I'll refactor the demo in this repo to use a plugin and see if I can reproduce the crash.
@adamrehn , Thanks for getting back!
No worries on the delay!
I managed to get it working via FRunnable thread instead of FAsyncGraphTaskBase. I did not debug why I was getting a runtime error. Since it looked like it had to do something with threads, I tried FRunnable instead.
But, I look forward to see if you could get it running! Thanks much.
@adamrehn , Thanks for getting back!
No worries on the delay!
I managed to get it working via FRunnable thread instead of FAsyncGraphTaskBase. I did not debug why I was getting a runtime error. Since it looked like it had to do something with threads, I tried FRunnable instead.
But, I look forward to see if you could get it running! Thanks much.
Hi RachithP, I got the similar situation. The server crashed when I tried to send requests from python client. Could you share a simple demo about how to fix it using FRunnable?
Hi @adamrehn,
Thanks a lot for this demo!
I was trying something similar but with the service implementation in Plugin code, for portability. The problem I'm facing is not an issue of this repo, but I hope you will be able to help me and it might be useful for others as well.
I created a project without the docker part of your project, and was able to launch gRPC server on it. Now, I'm trying to port the GrpcServiceImp.h & it's .cpp part into a Plugin along with the threadingHelper code. The server is still created during
BeginPlay()
of an Actor/Pawn whom I'd like to control. However, engine is crashing when I try to send commands from a python client. The trace was something like thisInitially I had the gRPC dependencies in my project's .build.cs. Now, I've included the same dependencies in the Plugin's .build.cs and removed it from the project's .build.cs. This is static linkage of gRPC libraries.
The .uplugin part contains
and I've added the dependency of the Plugin module in the project's .build.cs.
I tried different LoadingPhase for the Plugin module - PreDefault, Default, PostDefault and none of them worked.
The functionality is not failing when I start the game, but when I send my first message from the client. For me, it looks like some thread issue - one thread is not able to communicate to another? I'm launching the service implementations on GameThreads as done in your code. Is this a problem when a plugin is involved? I'm unable to understand what is causing this issue. Any help that could direct me towards potential problems would be really helpful!
Thanks in advance!
Cheers!