Skip to content
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

Creating UObjects while Collecting Garbage is not allowed #54

Open
Gisleburt opened this issue May 17, 2022 · 3 comments
Open

Creating UObjects while Collecting Garbage is not allowed #54

Gisleburt opened this issue May 17, 2022 · 3 comments

Comments

@Gisleburt
Copy link

Writing this up now just in case anyone has a quick answer, but I'm getting this error while trying to receive JSON objects via UDP.

We are sending around a dozen requests per second. Not sure if that would have an impact.

I'll have a little investigate anyway

[2022.05.17-15.06.29:226][920]LogThreadingWindows: Error: Runnable thread ObjectDeliverer UDPSocket PollingThread crashed.
[2022.05.17-15.06.29:226][920]LogWindows: Error: === Critical error: ===
[2022.05.17-15.06.29:226][920]LogWindows: Error: 
[2022.05.17-15.06.29:226][920]LogWindows: Error: Assertion failed: !IsGarbageCollecting() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2441] 
[2022.05.17-15.06.29:226][920]LogWindows: Error: Unable to create new object: ProtocolUdpSocket /Engine/Transient.ProtocolUdpSocketReceiver_0.None. Creating UObjects while Collecting Garbage is not allowed!
[2022.05.17-15.06.29:226][920]LogWindows: Error: 
[2022.05.17-15.06.29:226][920]LogWindows: Error: 
[2022.05.17-15.06.29:226][920]LogWindows: Error: [Callstack] 0x00007ff94fd83fe4 UnrealEditor-CoreUObject.dll!UnknownFunction []
[2022.05.17-15.06.29:226][920]LogWindows: Error: [Callstack] 0x00007ff94fd85eee UnrealEditor-CoreUObject.dll!UnknownFunction []
[2022.05.17-15.06.29:226][920]LogWindows: Error: [Callstack] 0x00007ff8e0c194db UnrealEditor-ObjectDeliverer.dll!UProtocolUdpSocketReceiver::ReceivedData() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\ObjectDeliverer\Source\ObjectDeliverer\Private\Protocol\ProtocolUdpSocketReceiver.cpp:115]
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff8e0c0be69 UnrealEditor-ObjectDeliverer.dll!UE::Core::Private::Function::TFunctionRefCaller<<lambda_8993b94d5aa4af31062aea6c2169b2be>,bool __cdecl(void)>::Call() [D:\RocketSync\5.0.0-19505902+++UE5+Release-5.0\Working\Engine\Source\Runtime\Core\Public\Templates\Function.h:539]
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff8e0c1bf28 UnrealEditor-ObjectDeliverer.dll!FODWorkerThread::Run() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\ObjectDeliverer\Source\ObjectDeliverer\Private\Utils\ODWorkerThread.cpp:32]
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff942ba83ab UnrealEditor-Core.dll!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff942ba13b0 UnrealEditor-Core.dll!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff99c777034 KERNEL32.DLL!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff99e742651 ntdll.dll!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: 
[2022.05.17-15.06.29:227][920]LogWindows: Error: Crash in runnable thread ObjectDeliverer UDPSocket PollingThread
@Gisleburt
Copy link
Author

Rate limiting to 5/s didn't help 🤔

@Gisleburt
Copy link
Author

So we think this was caused by objects that didn't specify every property on the class we were using in Create Object Delivery Box Using Json

Removing these objects from the stream seems to have fixed the more frequent crashes. We still had some crashes though and we never worked out what they were.

We were using the package in a hackathon (it worked brilliantly during the demo, and saved us a ton of time, so thank you for making it) which has now ended so I'm in no rush for a resolution but would be happy to help if I can.

@Gisleburt
Copy link
Author

Oh, I did check and I was able to send nearly 2000 objects per second to the plugin and it was fine with it, so rate limiting had nothing to do with it.

Once we resolved the object shape issue it only seemed to crash when closing the application or if there were problems connecting to the VR headset (which was streaming over Wifi... but over TCP while we were using UDP for these packets so 🤷🏻‍♂️ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant