IL2CPP split binary

I have managed to get the project built and run with IL2CPP turned on. But only if “split binary” is not enabled. Is this a known issue?

1 Like

Just wanted to bump this as I am still unable to get IL2CPP working if “Split Binary” is checked on. Otherwise it works perfectly. The logcat of the crash is here:

D/XT9IME ( 1101): onStartInput isInputViewShown() = false isShowInputRequested() = false
D/Sensorapi( 1209): AsusSensorService->taskId: 160 pkg: com.vnlentertainment.mmoproject intent: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.vnlentertainment.mmoproject/.AmazonActivity bnds=[100,235][265,340] }
F/libc ( 8136): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xbc in tid 8154 (UnityMain)
I/libc ( 8136): Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0
I/Zygote ( 221): Process 8136 exited due to signal (11)
W/InputDispatcher( 867): channel ‘2c6a42b7 com.vnlentertainment.mmoproject/com.vnlentertainment.mmoproject.AmazonActivity (server)’ ~ Consumer closed input channel or an error occurred. events=0x9
E/InputDispatcher( 867): channel ‘2c6a42b7 com.vnlentertainment.mmoproject/com.vnlentertainment.mmoproject.AmazonActivity (server)’ ~ Channel is unrecoverably broken and will be disposed!
I/WindowState( 867): WIN DEATH: Window{2c6a42b7 u0 com.vnlentertainment.mmoproject/com.vnlentertainment.mmoproject.AmazonActivity}
W/InputDispatcher( 867): Attempted to unregister already unregistered input channel ‘2c6a42b7 com.vnlentertainment.mmoproject/com.vnlentertainment.mmoproject.AmazonActivity (server)’
W/WindowManager( 867): Force-removing child win Window{a5ec9bc u0 SurfaceView} from container Window{2c6a42b7 u0 com.vnlentertainment.mmoproject/com.vnlentertainment.mmoproject.AmazonActivity}
I/ActivityManager( 867): Process com.vnlentertainment.mmoproject (pid 8136) has died
W/ActivityManager( 867): App Op not allow to restart app com.vnlentertainment.mmoproject/10129
W/ActivityManager( 867): Force removing ActivityRecord{f5dc865 u0 com.vnlentertainment.mmoproject/.AmazonActivity t160}: app died, no saved state
W/WindowManager( 867): Failed looking up window
W/WindowManager( 867): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@32d65353 does not exist
W/WindowManager( 867): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8426)
W/WindowManager( 867): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8417)
W/WindowManager( 867): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1113)
W/WindowManager( 867): at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
I/WindowState( 867): WIN DEATH: null
D/WindowManager( 867): adjustConfigurationLw, config:{0 1.0 ?mcc?mnc ?locale ?layoutDir sw600dp w1024dp h527dp 160dpi lrg land ?uimode ?night finger -keyb/v/h -nav/v} mLidState:-1 mHasDockFeature:false mHasKeyboardFeature:false mHasHallSensorFeature:true config.hardKeyboardHidden:2
V/Launcher( 1327): [onResume] called
E/GooglePlayServicesUtil( 1327): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
I/Launcher( 1327): Time spent in onResume: 2ms
V/Launcher( 1327): [onWindowFocusChanged]: true
W/InputMethodManagerService( 867): Got RemoteException sending setActive(false) notification to pid 8136 uid 10129
I/XT9IME ( 1101): isHighendDevice() sIsHighendDevice = false
D/XT9IME ( 1101): onStartInput isInputViewShown() = false isShowInputRequested() = false
V/GAV4 ( 1327): Thread[GAThread,5,main]: screenview hit sampled out
V/GAV4 ( 1327): Thread[GAThread,5,main]: screenview hit sampled out
V/ImageWallpaper( 995): onVisibilityChanged: mVisible, visible=false, true
V/ImageWallpaper( 995): Visibility changed to visible=true
V/ImageWallpaper( 995): onVisibilityChanged: dds = false

D/WifiWatchdogStateMachine( 867): Fetch RSSI succeed, rssi=-45 mrssi=-45 txbad=0 txgood=7395
D/Unity ( 9416): [SHA1] f5271086c2eb0ea37cb7d1a5b89400551e47ad77 69694936 bytes ~ lib/x86/libil2cpp.so
D/WifiWatchdogStateMachine( 867): RSSI current: 4 new: -45, 4
D/WifiWatchdogStateMachine( 867): CurrentRSSI:-45
D/WifiWatchdogStateMachine( 867): Exit DebounceWeakRssiState
D/WifiWatchdogStateMachine( 867): enter DebounceWeakRssiState
D/WifiWatchdogStateMachine( 867): RSSI current: 4 new: -45, 4
D/WifiWatchdogStateMachine( 867): Fetch RSSI succeed, rssi=-45 mrssi=-45 txbad=0 txgood=7395
F/libc ( 9416): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xbc in tid 9435 (UnityMain)
I/DEBUG ( 207): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 207): Build fingerprint: ‘asus/WW_P01Y/P01Y:5.0.2/LRX22G/WW_ZenPad-12.26.4.22-20150904:user/release-keys’
I/DEBUG ( 207): Revision: ‘0’
I/DEBUG ( 207): ABI: ‘x86’
I/DEBUG ( 207): pid: 9416, tid: 9435, name: UnityMain >>> com.vnlentertainment.mmoproject <<<
I/DEBUG ( 207): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbc
I/DEBUG ( 207): eax 00000000 ebx a1e22818 ecx 00000001 edx 00000000
I/DEBUG ( 207): esi 00000000 edi a3056100
I/DEBUG ( 207): xcs 00000073 xds 0000007b xes 0000007b xfs 0000006f xss 0000007b
I/DEBUG ( 207): eip a1a6b7f7 ebp a3055ff8 esp a3055fd0 flags 00210246
I/DEBUG ( 207):
I/DEBUG ( 207): backtrace:
I/DEBUG ( 207): #00 pc 01c6d7f7 /data/app/com.vnlentertainment.mmoproject-1/lib/x86/libil2cpp.so (il2cpp::vm::MetadataCache::Initialize()+55)
I/DEBUG ( 207): #01 pc 01c77ee1 /data/app/com.vnlentertainment.mmoproject-1/lib/x86/libil2cpp.so (il2cpp::vm::Runtime::Init(char const*, char const*)+65)
I/DEBUG ( 207): #02 pc 01c2e033 /data/app/com.vnlentertainment.mmoproject-1/lib/x86/libil2cpp.so (il2cpp_init+67)
I/DEBUG ( 207): #03 pc 002fb470 /data/app/com.vnlentertainment.mmoproject-1/lib/x86/libunity.so (InitializeIl2CppFromMain(std::string const&, std::string const&, int, char const**)+112)
I/DEBUG ( 207): #04 pc 0054a3ba /data/app/com.vnlentertainment.mmoproject-1/lib/x86/libunity.so (UnityInitApplication()+1322)
I/DEBUG ( 207): #05 pc 0054b488 /data/app/com.vnlentertainment.mmoproject-1/lib/x86/libunity.so (UnityPlayerLoop()+552)
I/DEBUG ( 207): #06 pc 0054f693 /data/app/com.vnlentertainment.mmoproject-1/lib/x86/libunity.so (nativeRender(_JNIEnv*, _jobject*)+179)
I/DEBUG ( 207): #07 pc 0085051b /data/dalvik-cache/x86/data@app@com.vnlentertainment.mmoproject-1@base.apk@classes.dex
I/DEBUG ( 207):
I/DEBUG ( 207): Tombstone written to: /data/tombstones/tombstone_00
W/ActivityManager( 867): Force finishing activity com.vnlentertainment.mmoproject/.AmazonActivity
E/JavaBinder( 867): !!! FAILED BINDER TRANSACTION !!!
E/JavaBinder( 867): !!! FAILED BINDER TRANSACTION !!!
W/ActivityManager( 867): Exception thrown during pause
W/ActivityManager( 867): android.os.TransactionTooLargeException
W/ActivityManager( 867): at android.os.BinderProxy.transactNative(Native Method)
W/ActivityManager( 867): at android.os.BinderProxy.transact(Binder.java:496)
W/ActivityManager( 867): at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:701)
W/ActivityManager( 867): at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:860)
W/ActivityManager( 867): at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2762)
W/ActivityManager( 867): at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2619)
W/ActivityManager( 867): at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2523)
W/ActivityManager( 867): at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:12505)
W/ActivityManager( 867): at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:12402)
W/ActivityManager( 867): at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:13133)
W/ActivityManager( 867): at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:12597)
W/ActivityManager( 867): at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
E/lowmemorykiller( 183): Error writing /proc/9416/oom_score_adj; errno=22
D/WindowManager( 867): adjustConfigurationLw, config:{0 1.0 ?mcc?mnc ?locale ?layoutDir sw600dp w1024dp h527dp 160dpi lrg land ?uimode ?night finger -keyb/v/h -nav/v} mLidState:-1 mHasDockFeature:false mHasKeyboardFeature:false mHasHallSensorFeature:true config.hardKeyboardHidden:2

F/libc (25769): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xbc in tid 25793 (UnityMain)
I/DEBUG ( 471): [2015-10-12 01:51:11.373]
I/DEBUG ( 471): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 471): Build fingerprint: ‘lge/p1_vtr_ca/p1:5.1/LMY47D/1524514359896:user/release-keys’
I/DEBUG ( 471): Revision: ‘11’
I/DEBUG ( 471): ABI: ‘arm’
I/DEBUG ( 471): pid: 25769, tid: 25793, name: UnityMain >>> com.vnlentertainment.mmoproject <<<
I/DEBUG ( 471): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbc
W/NativeCrashListener( 1166): Couldn’t find ProcessRecord for pid 1530015793
D/PhoneInterfaceManager( 4361): [PhoneIntfMgr] mSigLevel = 5
D/LGSubScriptionUtilsWrapper_MR1( 4361): getSubIdUsingSlotId() slotId:0 → subId:3
I/[SystemUI]NetworkController( 3649): onReceive: intent=Intent { act=android.intent.action.SIG_STR flg=0x20000010 (has extras) }
I/DEBUG ( 471): r0 00000000 r1 d9ba97e0 r2 00000001 r3 ffffffff
E/DEBUG ( 471): AM write failure (32 / Broken pipe)
I/DEBUG ( 471): r4 d9b93ee8 r5 d9a604c4 r6 d9ba9ae4 r7 00000000
I/DEBUG ( 471): r8 000158f8 r9 ef2f7a88 sl ef2f7a80 fp ef2f7a78
I/DEBUG ( 471): ip d9b93f64 sp ef2f7120 lr f6fa9b6b pc d9959054 cpsr 800d0010
I/DEBUG ( 471):
I/DEBUG ( 471): backtrace:
I/DEBUG ( 471): #00 pc 01656054 /data/app/com.vnlentertainment.mmoproject-1/lib/arm/libil2cpp.so (il2cpp::vm::MetadataCache::Initialize()+40)
I/DEBUG ( 471): #01 pc 0166077c /data/app/com.vnlentertainment.mmoproject-1/lib/arm/libil2cpp.so (il2cpp::vm::Runtime::Init(char const*, char const*)+56)
I/DEBUG ( 471): #02 pc 01619e9c /data/app/com.vnlentertainment.mmoproject-1/lib/arm/libil2cpp.so (il2cpp_init+44)
I/DEBUG ( 471): #03 pc 002b82b4 /data/app/com.vnlentertainment.mmoproject-1/lib/arm/libunity.so (InitializeIl2CppFromMain(std::string const&, std::string const&, int, char const**)+120)
I/DEBUG ( 471): #04 pc 004c8f40 /data/app/com.vnlentertainment.mmoproject-1/lib/arm/libunity.so (UnityInitApplication()+1584)
I/DEBUG ( 471): #05 pc 004ca458 /data/app/com.vnlentertainment.mmoproject-1/lib/arm/libunity.so (UnityPlayerLoop()+840)
I/DEBUG ( 471): #06 pc 004cf1a4 /data/app/com.vnlentertainment.mmoproject-1/lib/arm/libunity.so (nativeRender(_JNIEnv*, _jobject*)+172)
I/DEBUG ( 471): #07 pc 0078130f /data/dalvik-cache/arm/data@app@com.vnlentertainment.mmoproject-1@base.apk@classes.dex

I got mine to build, but regardless, mine gets a SIGSEGV… :frowning: Likewise, I’m having a similar problem.

EDIT: Oops! forgot to state that mine wasn’t split OBB!!!

What Unity version? We did an OBB fix for IL2CPP in 5.2.1p3.

Yes it’s now fixed. Thank you.
Are we recommended to use IL2CPP for Android or is it safer to stick with mono. What’s the advantages?

From what I’ve gathered, IL2CPP uses native code of which is a lot faster than dalvik code.

The disadvantages are mostly because the support for android is so young… For me, it’s crashes on loading any scene… (well, the first one loads, but any more past that gets a SIGSEGV in the console!) For other people, it’s different problems. In either case, for a serious project, I recommend sticking to mono 2x for now until everything’s fixed up. (5.2.3 might fix some things to do with IL2CPP android, would have to check the release notes)

@FuzzyQuills

Is it possible for you to submit a bug report for this crash? The IL2CPP scripting backend should not cause a crash, asn we would like to track down the cause and correct it.

@JoshPeterson I believe we already have an open bug report on @FuzzyQuills problem.

@FuzzyQuills , @VNL-Entertainment-Games most people actually report that IL2CPP is working fine on Android now. There are still some issues but for the majority of projects it should work.

@bitter

Thanks for letting me know, I was not aware.

I presume it’s the one I sent a few weeks back from the bug reporter… :smile: Either way, thanks for this. :slight_smile:

I haven’t tried using latest unity yet, but I may as well check it out if it’s apparently fixed up unintentionally. :slight_smile:

Also, unless you can’t share that here, what have you found so far in my bug report?

EDIT: I also had an idea… going to test it and report back. :slight_smile:

Ok, my test results with IL2CPP…

Attempt to play a movie file with handheld API (In case that was causing SIGSEGV): Works.

Attempt to load a different scene (Application.LoadLevel()): this came up in logcat:
(Check IL2CPP crash.txt, it kept screwing up when pasting into a code window here… :()

Attempt to load using LoadLevelAsync: Same result

This was all done in the most minimalist scene possible, i.e. empty scene with skybox and camera.I did the loadlevel test by directly reloading the first scene.

This is the exact behavior that my working project does when switched to IL2CPP.

To Unity Tech Developers: you probably have a similar log in my bug report already, but in case you need it, attachment’s there to look at. :wink:

2390533–162847–IL2CPP crash.txt (6.82 KB)

Thanks which Unity Version are you referring to that IL2CPP is working well now?
Slightly off topic, any chance that the c++ code could not retain original class and method names? I recall still see lots of references of original class/reference names in assembly dump.

@VNL-Entertainment-Games

I would recommend trying the latest 5.2 patch release for Android, it should have all of the latest fixes.

any chance that the c++ code could not retain original class and method names?

Yes, this is possible. The WebGL platform does this for non-development builds. The Android platform does not does this, but it is possible to expose it as an option. I’m curious though, what is the reason for this request?

There are some players who like to reverse engineer the game. When it comes to IL2CPP they can do it with tools like IDA to easily find human readable functions names, strings etc, modify it and make it unfair for other players of the game. If there are no longer human readable functions/classes/strings etc, it will be much harder to simply find a function like “getHealth” etc and do trial and error value modding. Instead of going straight to “getHealth” they’d have to try a million other methods and hope to get lucky to get anything done. Right now it’s too easy. It’s not going to stop someone very determined, but it will deter the average enthusiasts.

Please report your bugs/crashes on il2cpp - this is the way to get it fully supported and not experimental!

@FuzzyQuills : did you already file a bug? Which case #? I think I’ve seen this crash in one bug report previously - which device did you use?

@VNL-Entertainment-Games : we don’t strip symbols from il2cpp for Android while it is experimental, to easily track down crashes. Once we make it fully supported, the symbols will be stripped, and you should not be able to find function by its name.

1 Like

Thank you. That makes sense.

Is there a way we can strip them now if we want to (external tool?)