question

Spencer avatar image
Spencer asked

Crashing in Unreal Marketplace Plugin due to mCustomData getting garbage collected.

Every use of mCustomData is not tagged with UPROPERTY() and thus makes the mCustomData Object able to be garbage collected if that is the only pointer to it. This crash is kind of hard to catch since garbage collection takes place every 60 seconds and sending a http request has a pretty fast turn around time. We have experienced this in our live builds.

This is the first post I was able to find that mentions it and it is from almost 4 years ago.

ue4-crash-in-unreal-engine-4.html

unreal
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Spencer avatar image Spencer commented ·

In our use cases we construct a UObject with some data that we wish to have after the request returns and pass that pointer into the CustomData all in blueprints.

0 Likes 0 ·
Simon Cui avatar image Simon Cui commented ·

Hello, may I know your Unreal and PlayFab versions that you are using? It would be helpful if you can provide a specific scenario, code snippet and/or blueprint screenshot in which you experienced this crash.

0 Likes 0 ·
Spencer avatar image Spencer Simon Cui commented ·

We first experienced this about 5 months ago because that is when we started using the CustomData. So we have seen it with every Unreal Marketplace plugin version in that time and have used unreal 5.0 and 5.1 in that time. Currently we are on Unreal 5.1.1 and plugin version 1.108.230206. But this should be able to be experienced on any version of Unreal or the Marketplace plugin. Here is an example that can cause a crash but literally anything passed on CustomData risks getting garbage collected before the call returns and can be null on the other side. There is a narrow window for this to happen but in our experience one request that is called about every 5 seconds will cause a crash within 24 hours. I would assume that higher ping would increase the chances of the object getting garbage collected in that window.

5642-image.png

0 Likes 0 ·
image.png (203.4 KiB)
Simon Cui avatar image Simon Cui Spencer commented ·

Thanks for the information. I will do more research on it and will keep you informed once there is any update.

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.