- Home /
Android plugin segfaults before constructor is called
I am trying to get my own Android plugin to build and execute:
= Used the "Java Plugin Sample" on the bottom of page http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html
= Without recompiling the plugin, it uses the provided "JavaClass.jar" and "libjavabridge.so" from 11/5/2010 and everything works fine.
= When I recompile the plugin by calling "build_plugin.sh" in "src", the jar and so files are updated, but cause a segfault (visible via adb logcat):
04-20 11:04:23.947 8625 8661 D Unity : PlayerInitEngineGraphics OK 04-20 11:04:24.278 8625 8661 I Unity : windowFocusChanged: true 04-20 11:04:24.678 8625 8661 F libc : Fatal signal 11 (SIGSEGV) at 0x0000002c (code=1), thread 8661 (UnityMain) 04-20 11:04:24.788 326 326 I DEBUG : pid: 8625, tid: 8661, name: UnityMain >>> com.Company.ProductName <<< 04-20 11:04:25.719 326 326 I DEBUG : #08 pc 00466024 /data/data/com.Company.ProductName/lib/libunity.so (_JNIEnv::CallBooleanMethod(_jobject*, _jmeth odID*, ...)+32) 04-20 11:04:25.719 326 326 I DEBUG : #09 pc 00467fe8 /data/data/com.Company.ProductName/lib/libunity.so (loadLibrary(char const*)+176) 04-20 11:04:25.719 326 326 I DEBUG : #10 pc 0047e53c /data/data/com.Company.ProductName/lib/libunity.so (FindPluginExecutable(char const*)+120) 04-20 11:04:25.719 326 326 I DEBUG : #19 pc 0036a5f4 /data/data/com.Company.ProductName/lib/libunity.so (ScriptingInvocationNoArgs::Invoke(MonoExcept ion*)+64) 04-20 11:04:25.719 326 326 I DEBUG : #20 pc 0035c314 /data/data/com.Company.ProductName/lib/libunity.so (MonoBehaviour::DoGUI(MonoBehaviour::GUILayou tType, int)+292) 04-20 11:04:25.719 326 326 I DEBUG : #21 pc 002a5d04 /data/data/com.Company.ProductName/lib/libunity.so (MonoBehaviourDoGUI(void, MonoBehaviour::GUI LayoutType, int)+12) 04-20 11:04:25.719 326 326 I DEBUG : #22 pc 002a6bcc /data/data/com.Company.ProductName/lib/libunity.so (GUIManager::DoGUIEvent(InputEvent&, bool)+15 12) 04-20 11:04:25.719 326 326 I DEBUG : #23 pc 002a7828 /data/data/com.Company.ProductName/lib/libunity.so (GUIManager::Repaint()+88) 04-20 11:04:25.719 326 326 I DEBUG : #24 pc 00328bb8 /data/data/com.Company.ProductName/lib/libunity.so (PlayerRender(bool)+80) 04-20 11:04:25.719 326 326 I DEBUG : #25 pc 00329644 /data/data/com.Company.ProductName/lib/libunity.so (PlayerLoop(bool, bool, IHookEvent*)+2536) 04-20 11:04:25.719 326 326 I DEBUG : #26 pc 004662bc /data/data/com.Company.ProductName/lib/libunity.so (UnityPlayerLoop()+96) 04-20 11:04:25.719 326 326 I DEBUG : #27 pc 00478e8c /data/data/com.Company.ProductName/lib/libunity.so (nativeRender(_JNIEnv*, _jobject*)+128) 04-20 11:04:26.100 718 799 W InputDispatcher: channel '4234b1a8 com.Company.ProductName/com.unity3d.player.UnityPlayerNativeActivity (server)' ~ Consumer clo sed input channel or an error occurred. events=0x9 04-20 11:04:26.120 718 799 E InputDispatcher: channel '4234b1a8 com.Company.ProductName/com.unity3d.player.UnityPlayerNativeActivity (server)' ~ Channel is u nrecoverably broken and will be disposed! 04-20 11:04:26.120 718 1176 W ActivityManager: Force removing ActivityRecord{4367bc08 com.Company.ProductName/com.unity3d.player.UnityPlayerNativeActivity}: a pp died, no saved state 04-20 11:04:26.140 718 729 W InputDispatcher: Attempted to unregister already unregistered input channel '4234b1a8 com.Company.ProductName/com.unity3d.player .UnityPlayerNativeActivity (server)'
System: = Unity 4.1.2f1 (Unity Pro, Android) = Windows 7 = JDK 1.7.0_21 = Android NDK: r8e
Thanks a lot! Christian.
Your answer
Follow this Question
Related Questions
QR-Code Decoding for iOS and Android 0 Answers
Create Java Plugin for Unity 0 Answers
How to place Adv Vertically 1 Answer
How Set Java Plugin on Unity? 0 Answers