Java.lang.UnsatisfiedLinkError android crash

Java.lang.UnsatisfiedLinkError android crash
0.0 0

#1

Hi!

So yesterday one of my users reported a crash.
The crash:

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "srand" referenced by "libcocos2dcpp.so"...
	at java.lang.Runtime.loadLibrary(Runtime.java:364)
	at java.lang.System.loadLibrary(System.java:526)
	at sonar.systems.framework.SonarFrameworkActivity.<clinit>(SonarFrameworkActivity.java:92)
	at java.lang.Class.newInstanceImpl(Native Method)
	at java.lang.Class.newInstance(Class.java:1208)
	at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2493)
	at android.app.ActivityThread.access$800(ActivityThread.java:166)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:136)
	at android.app.ActivityThread.main(ActivityThread.java:5584)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
	at dalvik.system.NativeStart.main(Native Method)

Some facts, the app has been made using eclipse and cocos2d-x v.3.7 and its minSdk is 11 and targetSdk is 23.
Who can help? Would be appreciated a lot.
@slackmoehrle or @SonarSystems, one of you maybe?
Thanks everybody!


#2

Is this a fresh project?


#3

#4

Sorry for the late reply.
Yes, it is a released version that is out on the google play store.


#5

Thanks. I’ll have a look


#6

@slackmoehrle @nichlaspro132
Hello, I have similar issue on my release build (beta).
FATAL EXCEPTION: main
Process: mobi.proj.free, PID: 16999
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “__register_atfork” referenced by “libProjectFree.so”…

But on debug everything seems to be OK. Please, help

I’m using NDK 17, min sdk version is 16. All crashes appear on Android 5+


#7

What is in your Android.mk?


#8

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

$(call import-add-path, $(LOCAL_PATH))

LOCAL_MODULE := ProjectFree_shared

LOCAL_MODULE_FILENAME := libProjectFree

LOCAL_CPPFLAGS := -DSDKBOX_ENABLED
ifeq ($(NDK_DEBUG),1)
LOCAL_CPPFLAGS += -DDEBUG
endif

LOCAL_LDLIBS := -landroid -llog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/…/…/…/Classes

LOCAL_STATIC_LIBRARIES := cocos2dx_shared
LOCAL_STATIC_LIBRARIES += cocos2dx_utils_static
LOCAL_WHOLE_STATIC_LIBRARIES += PluginIAP
LOCAL_WHOLE_STATIC_LIBRARIES += sdkbox

include $(BUILD_SHARED_LIBRARY)

$(call import-module, …/…/jni/sdkbox)
$(call import-module, …/…/jni/pluginiap)

P.S. Sorry, I can’t upload attachments :frowning:


#9

My guess is that it has something to do with these.


#10

Hm, thanks. But my debug builds are OK :\


#11

Proguard issue?

Are you testing on hardware or in an emulator?