question

Ayrton Olvera avatar image
Ayrton Olvera asked

Unreal Playfab Party android crash

Hello!

My current 4.27 Unreal project is targeted to Oculus devices and I've integrated the playfab party libraries for android, but when I initialize the party it crashes and gives me this error:

Build fingerprint: 'oculus/hollywood/hollywood:10/QQ3A.200805.001/21985310426300000:user/release-keys'
F/DEBUG   : Revision: '0'
F/DEBUG   : ABI: 'arm64'
F/DEBUG   : Timestamp: 2022-01-12 13:07:40-0600
F/DEBUG   : pid: 31689, tid: 31734, name: GameThread  >>> com.Project.Name<<<
F/DEBUG   : uid: 10313
F/DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
F/DEBUG   : Cause: null pointer dereference
F/DEBUG   :     x0  0000000000000000  x1  0000007129c4b050  x2  0000000000010006  x3  000000710f55554d
F/DEBUG   :     x4  000000710f5389bf  x5  00000070fd1c6400  x6  00000070fd1c6400  x7  0000000001408b3c
F/DEBUG   :     x8  9dfa1b622e357769  x9  0000000000000002  x10 0000000000000001  x11 0000000000000000
F/DEBUG   :     x12 0000000000000018  x13 0000000061df26fa  x14 000982104d3dc4a0  x15 00009a6db0ff02fc
F/DEBUG   :     x16 000000710f71d470  x17 000000710f0c2534  x18 0000000000000000  x19 000000710f729088
F/DEBUG   :     x20 0000007129c4b0e0  x21 0000007129c50020  x22 0000007129c50020  x23 0000007129c50020
F/DEBUG   :     x24 0000007121e171c0  x25 0000007129c50020  x26 00000071172b158a  x27 0000007121e685a2
F/DEBUG   :     x28 0000007121d20830  x29 0000007129c4b090
F/DEBUG   :     sp  0000007129c4b050  lr  000000710f0b8df8  pc  000000710f0c2574
F/DEBUG   : 
F/DEBUG   : backtrace:
F/DEBUG   :       #00 pc 000000000026b574  <Project path>==/lib/arm64/libparty.so (_ZN19BumblelionJniHelper16CreateUUIDStringERA37_c+64) (BuildId: e61de1c7e18214f867af00b8df6ffab2091b55c0)
F/DEBUG   :       #01 pc 0000000000261df4  <Project path>==/lib/arm64/libparty.so (BumblelionCreateUuid(BumblelionUuid&)+100) (BuildId: e61de1c7e18214f867af00b8df6ffab2091b55c0)
F/DEBUG   :       #02 pc 00000000001fc158  <Project path>==/lib/arm64/libparty.so (BumblelionImpl::Initialize(char const*)+116) (BuildId: e61de1c7e18214f867af00b8df6ffab2091b55c0)
F/DEBUG   :       #03 pc 00000000001fbf38  <Project path>==/lib/arm64/libparty.so (BumblelionImpl::Create(char const*, BumblelionImpl**)+232) (BuildId: e61de1c7e18214f867af00b8df6ffab2091b55c0)
F/DEBUG   :       #04 pc 00000000001facd8  <Project path>==/lib/arm64/libparty.so (PartyInitialize+128) (BuildId: e61de1c7e18214f867af00b8df6ffab2091b55c0)
F/DEBUG   :       #05 pc 000000000bc2e4fc  <Project path>==/lib/arm64/libUE4.so (PartyManager::Init()+268) (BuildId: db46c7c8e4d4cc35794b049f7f23cb6662c89f93)
F/DEBUG   :       #06 pc 000000000babe630  <Project path>==/lib/arm64/libUE4.so (GameInstance::Init()+288) (BuildId: db46c7c8e4d4cc35794b049f7f23cb6662c89f93)
F/DEBUG   :       #07 pc 000000000faae23c  <Project path>==/lib/arm64/libUE4.so (UGameEngine::Init(IEngineLoop*)+1168) (BuildId: db46c7c8e4d4cc35794b049f7f23cb6662c89f93)
F/DEBUG   :       #08 pc 00000000099e5160  <Project path>==/lib/arm64/libUE4.so (FEngineLoop::Init()+2144) (BuildId: db46c7c8e4d4cc35794b049f7f23cb6662c89f93)
F/DEBUG   :       #09 pc 00000000099e4460  /<Project path>==/lib/arm64/libUE4.so (AndroidMain(android_app*)+3748) (BuildId: db46c7c8e4d4cc35794b049f7f23cb6662c89f93)
F/DEBUG   :       #10 pc 00000000099f4104  <Project path>==/lib/arm64/libUE4.so (android_main+164) (BuildId: db46c7c8e4d4cc35794b049f7f23cb6662c89f93)
F/DEBUG   :       #11 pc 0000000009a235f4  <Project path>==/lib/arm64/libUE4.so (BuildId: db46c7c8e4d4cc35794b049f7f23cb6662c89f93)
F/DEBUG   :       #12 pc 00000000000d5884  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: a6e0ca3a9989715134d1d1e2126e0f7a)

I see that there's some errors on the libparty.so

I made sure that the 'libparty-full-release.aar' is integrated in the APK build and the 'BumblelionJniHelper' class too.

I would really appreciate some help with this one, thanks!

unrealandroid
3 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.

Made Wang avatar image Made Wang commented ·

Are you using the Party c/c++ SDK or the Party Unreal SDK?

0 Likes 0 ·
Ayrton Olvera avatar image Ayrton Olvera Made Wang commented ·

Party c/c++ SDK for android Releases PlayFab/PlayFabParty GitHub

0 Likes 0 ·
alexh avatar image alexh commented ·

@Ayrton Olvera Where did you find the information that also `libparty-full-release.aar` is requested as well, please? Have you used `AdditionalPropertiesForReceipt.Add` XML to copy the file as in case `libparty.so`? Or how do you add it into apk?
Out of curiosity, it is working for you now? E.g. with 1.7.6?

0 Likes 0 ·
Made Wang avatar image
Made Wang answered

The Party C/C++ SDK you are using is the one that supports native Android. And there is no official Party Android SDK on Unreal Engine , if the Party Android C/C++ SDK doesn't work in your Unreal project, you can vote for this feature request to let the development team know you need it.

1 comment
10 |1200

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

max-1 avatar image max-1 commented ·

The same error has appeared in the Unity SDK:

https://community.playfab.com/questions/50392/playfabparty-ue4-crash-on-android.html?childToView=52961#answer-52961

UE4 ultimately outputs a standard Android project that can be opened and debugged in Android studio and link with other Android libraries. Whether UE4 is involved isn't a valid basis for dismissing the issue as a matter of being an unsupported platform/feature.

Please see if one of PlayFab's engineers who are familiar with your Bublelion sub-library can weigh in on possible solutions or additional diagnosis steps.

3 Likes 3 ·
mhaider avatar image
mhaider answered

I saw this crash. libparty.so and libUE4.so have many weak symbols for the C++ library, and the libparty callstack sometimes goes back into the UE version of library functions. It looks like memory is sometimes allocated on the UE library side and then deallocated on the libparty side, where it then crashes because the unreal allocation doesn't have the proper header on it. @Ayrton Olvera

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

mhaider avatar image mhaider commented ·

Actually, I think this one happens because the library isn't being loaded with System.loadLibrary in Java, which is what passes the JNIEnv pointer to libparty.so. I've seen a few UE crashes trying to get this to work. @Ayrton Olvera The symbol issue comes later.

0 Likes 0 ·
alexh avatar image alexh mhaider commented ·

@mhaider @Ayrton Olvera I was thinking that all function invocations will lead to a crash, but I started investigating, and for example calling `PartyManager::GetSingleton()` is not crashing the app. Well, I was surprised it's not the case. I just started to dig in, and curious if you guys made some progress in the implementation?

0 Likes 0 ·
alexh avatar image alexh commented ·

have you guys properly configured APL.xml? I'm still investigating it and maybe .aar is somehow related to it (still not able to properly introduce .aar into the APL. Trying something like this, but still getting crash on `_ZN19BumblelionJniHelper16CreateUUIDStringERA37_c`

The reason why I didn't give up yet is the reason that native android app built from android studio is working fine...

0 Likes 0 ·
5ykux.png (26.5 KiB)

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.