In UE5.6, symbols lost in the crash stack of the Android build.

Hi,

After upgrading to 5.6, I built an android development app.

I found that the symbols of crash stack have lost, as below:

F/DEBUG  : backtrace:
F/DEBUG  :    #00 pc 00000000073dccfc /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #01 pc 0000000006f11ff0 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #02 pc 0000000006f08290 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #03 pc 0000000006f094c4 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #04 pc 000000000318a918 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #05 pc 00000000031cfba8 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #06 pc 00000000031ce390 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #07 pc 0000000004e0fb70 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #08 pc 0000000004e418e8 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #09 pc 0000000003328bd0 /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #10 pc 000000000318c91c /data/app/~~5w0WhT8pTb9WiOdN5eyKTA==/com.YourCompany.UE56-QkA5jKAqQo9zWezBvkFUMA==/lib/arm64/libUnreal.so (BuildId: 0032d47a1bf4357e4f4d0971323982888fa06ee4)
F/DEBUG  :    #11 pc 00000000000fd254 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 8aaf102cfbdac2f120bf95c648547386)
F/DEBUG  :    #12 pc 0000000000096a04 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 8aaf102cfbdac2f120bf95c648547386)

Would you have any idea?

Thank you Epics.

Another maybe helpful information:

UE_LOG(LogTemp, Fatal, TEXT(“asdfas”)) will get this [Unknown] stack:

D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: === Critical error: ===
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: 
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: Fatal error: [File:Runtime/Renderer/Private/MobileShadingRenderer.cpp] [Line: 1214] 
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: asdfas
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x0000007036D09D0C libUnreal.so(0x00000000073DCD0C)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x000000703683EFF4 libUnreal.so(0x0000000006F11FF4)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x0000007036835294 libUnreal.so(0x0000000006F08294)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x00000070368364C8 libUnreal.so(0x0000000006F094C8)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x0000007032AB791C libUnreal.so(0x000000000318A91C)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x0000007032AFCBAC libUnreal.so(0x00000000031CFBAC)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x0000007032AFB394 libUnreal.so(0x00000000031CE394)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x000000703473CB74 libUnreal.so(0x0000000004E0FB74)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x000000703476E8EC libUnreal.so(0x0000000004E418EC)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x0000007032C55BD4 libUnreal.so(0x0000000003328BD4)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x0000007032AB9920 libUnreal.so(0x000000000318C920)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x000000721CD61258 libc.so(0x00000000000FD258)![Unknown]()  []
D/UE      : [2024.11.08-03.53.03:195][950]LogAndroid: Error: [Callstack] 0x000000721CCFAA08 libc.so(0x0000000000096A08)![Unknown]()  []

重现步骤
1、in cpp code,we access a nullptr to trigger crash

2、use UE5.6 to build an Android development app

3、install and run, then wait for nullptr crash,and search log for crash stack

Hi Ning San,

Can you confirm is this is occurring on a C++ or content only project? Additionally, which NDK version and device are you running on?

Best regards.

Hi Sanning,

The binaries deployed to the device are likely stripped of symbols.

For system tombstones (first case above), you can copy the backtrace to a text file (say dump.txt) then from the projects package directory, run the generated

SymbolizeCrashDump_<PROJECT_NAME>-arm64.bat dump.txt.

For stack walk output from assertions, from the package output directory, run

%ANDROID_NDK_ROOT%/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-symbolizer -C -f -i -p --obj=<PROJECT_NAME>_Symbols_v1/<PROJECT_NAME>arm64/libUnreal.so 0x00000000073DCD0C 0x0000000006F11FF4 0x0000000006F08294 0x0000000006F094C8 0x000000000318A91C 0x00000000031CFBAC 0x00000000031CE394 0x0000000004E0FB74 0x0000000004E418EC 0x0000000003328BD4 0x000000000318C920For the latter case, this is something we’ll look at automating.

Best regards.

Hi Xanning,

Can you clarify what you mean by ‘to recovery sumbols back to device’? Do you mean have the stacks show up symbolicated directly in the logcat?

Best regards.

Hi Sanning,

Adding the follow UPL to your application:

<?xml version="1.0" encoding="utf-8"?>
<!--LibOVRPlatform plugin additions-->
<root xmlns:android="http://schemas.android.com/apk/res/android">
	<!-- init section is always evaluated once per architecture -->
	<init>
	</init>
 
	<buildGradleAdditions>
		<insert>
android {
	buildTypes {
		debug {
			packagingOptions {
				doNotStrip "**/*.so"
			}
			ndk {
				debugSymbolLevel = 'FULL'
			}
		}
	}
}
		</insert>
	</buildGradleAdditions>
</root>

You’ll need to register the UPL in your app’s build.cs as follows:

if (Target.Platform == UnrealTargetPlatform.Android)
		{
			string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
			AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "module/relative/path/to/UPL.xml"));
		}

You may additionally need to disable Debug Symbol Compression in the project settings.

Should the problem persist, can you confirm Android version on the device being tested on as well as NDK/SDK versions?

Best regards.

My project is c++.

I haven’t tested content only project, so I am not sure.

Both ​NDK25 and NDK27 I tested occure this problem.

Devices are Samsung S23 and S24, both with Adreno GPU. Pixel 9 Pro also occurs this problem.

Hi Jacoby Stephane,

I will try that.

And if I want to recovery symbols back to device. Could you give me some advices?

Thanks.

Thanks for your reply.

Yes, I’d like ​to show up the stacks directly in the log like UE5.5.