Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Android: DLL Not found: cannot locate symbol "_Unwind_Resume"
#1
Hi there,

I've just tried using the Android build for the first time, and get this when initialising a component:

Unable to load library '/data/app/{bundleID}-{hash}/lib/arm64/libOni.so', native render plugin support disabled: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/{bundleID}-{hash}/lib/arm64/libOni.so"...
Unable to find Oni
Event: Error DllNotFoundException: Unable to load DLL 'Oni': The specified module could not be found.



This is on Unity 2019.2.11. There seems to be changes around the NDK to do with this and so was wondering which NDK version the DLL is built against?

What versions of Unity are expected to work?

Thanks in advance,


Jason

(I should probably have mentioned this is with version Obi 5.1)
Reply
#2
Hi there,

The lib was built using NDK r16b. This is our Application.mk:

Code:
NDK_TOOLCHAIN_VERSION := clang
APP_OPTIM := release
APP_PLATFORM := android-17
APP_STL := c++_shared
APP_CPPFLAGS += -std=c++11
APP_ABI := armeabi-v7a arm64-v8a x86

excerpt from Android.mk:

Code:
LOCAL_LDLIBS += -latomic
LOCAL_CPP_FEATURES += exceptions
LOCAL_CPP_FEATURES += rtti
LOCAL_ARM_NEON := true

We've tested building with 2019.2.9f1, 2019.3.0f6, and 2020.1.0b3, runs fine in Galaxy S4 and Note 10 Lite. "_Unwind_Resume" is a symbol related to exception handling, and the lib requires exception support, so my take is that for some reason exception-handling related code is being stripped.

What are your build settings?
Reply
#3
Thanks for the comprehensive reply.

The error message is from a Galaxy S8 running Pie.

We're building with IL2CPP, Release configuration, ARM64, NDK r16b.

Code:
--convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release"

We don't have engine stripping enabled. Managed code stripping was set to Low - I just tried setting it to None, but it didn't help.
Reply
#4
I'm struggling to reproduce it in a test project, but will continue to try.
Reply
#5
(21-04-2020, 08:55 AM)josemendez Wrote: Hi there,

The lib was built using NDK r16b. This is our Application.mk:

Code:
NDK_TOOLCHAIN_VERSION := clang
APP_OPTIM := release
APP_PLATFORM := android-17
APP_STL := c++_shared
APP_CPPFLAGS += -std=c++11
APP_ABI := armeabi-v7a arm64-v8a x86

excerpt from Android.mk:

Code:
LOCAL_LDLIBS += -latomic
LOCAL_CPP_FEATURES += exceptions
LOCAL_CPP_FEATURES += rtti
LOCAL_ARM_NEON := true

We've tested building with 2019.2.9f1, 2019.3.0f6, and 2020.1.0b3, runs fine in Galaxy S4 and Note 10 Lite.  "_Unwind_Resume" is a symbol related to exception handling, and the lib requires exception support, so my take is that for some reason exception-handling related code is being stripped.

What are your build settings?

Hi, josemendez.

We have just encountered the same problem, I have searched a lot and seems lot of talks about ndk mismatches, so i looked into the libOni.so as the Post(https://github.com/google/oboe/issues/966) indicates, the _Unwind_Resume was not found just as I assumed. I tested with Unity2019.4.8f1, and it works on most 'runtime' and only fails for few(sorry can't tell more details about our 'runtime').

As far as I know, the Unity 2019 has upgrade its ndk to r19(https://docs.unity3d.com/Manual/android-sdksetup.html), so can you please compile the .so with r19 and send me a test libOni.so to see if we can fix this issue, it will helps a lot, thank you!
Reply