question

singularitylab avatar image
singularitylab asked

[UE4] Crash in Unreal Engine 4

"UObject* mCustomData" field in PlayFab classes is not guarded by UPROPERTY macro. This could lead to crash in case if Custom Data is passed back to blueprints after being garbage collected.

You can find this field in UPlayFabGroupsAPI, UPlayFabClientAPI, etc...

sdksunreal
10 |1200

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

Marcus Nixon avatar image
Marcus Nixon answered

Thank you for providing this repro project. I was able to see the crash in your project and I was able to reproduce the crash in my own project. I will submit this as a bug to the development team.

10 |1200

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

Marcus Nixon avatar image
Marcus Nixon answered

Hello singularitylab,

Thanks for bringing this potential issue to our attention. Are you able to provide a specific scenario, code snippet and/or blueprint screenshot in which you experienced this crash? Just looking for anything that would help in reproducing the issue in order to expedite the process.

2 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.

singularitylab avatar image singularitylab commented ·

0. Create 2 empty levels

1. Create blueprint that inherits UGameInstanceBase and set it in project settings

2. In your GameInstance create a Custom Event that makes any asyncronous PlayFab call and accepts UObject as a parameter

3. Create blueprint that inherits UActor. Put this actor into the level. Call your custom event from there, passing this actor as parameter.

4. Call OpenLevel

5. If asyncronous call is completed after new level is loaded then engine will spit errors and memory dumps in development and crash in shipping

0 Likes 0 ·
singularitylab avatar image singularitylab singularitylab commented ·

Just to clarify, this is reliable way to replicate thisissue. In real world scenarios this problem could occur at any point in time, if PlayFab is only entity that holds reference to object, passed as custom data (Since it should be marked with UPROPERTY to make Garbage Collector aware of it).

0 Likes 0 ·
Marcus Nixon avatar image
Marcus Nixon answered

I haven't been able to reproduce this issue yet. The login API call appears to finish after my second level has loaded. I have pasted screenshots of my blueprints. Can you confirm that they depict the scenario that you have laid out? If my blueprints are off, can you provide screenshots of blueprints that actually produce the error? Also, are you able to provide Unreal and PlayFab versions that you are using?

screenshot1.png

screenshot2.png


screenshot1.png (211.9 KiB)
screenshot2.png (147.8 KiB)
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.

singularitylab avatar image singularitylab commented ·

To catch this problem you have to pass objectparam as custom data, and then call any method of objectparam.

0 Likes 0 ·
singularitylab avatar image singularitylab commented ·

I'm using 4.21 and latest PlayFab plugin.

0 Likes 0 ·
singularitylab avatar image singularitylab commented ·

Btw you had problems reproducing this because the issue actually involves blueprint interfaces. :)

0 Likes 0 ·

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.