Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17478] Android 5.0: KS->Facebook crashes

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-08-29T16:28:28.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 3.4.1, Release 3.4.2, Release 3.5.0, Release 4.0.0
ComponentsAndroid
Labelsandroid-l, module_kitchensink, qe-manualtest
ReporterPing Wang
AssigneePing Wang
Created2014-08-08T21:47:54.000+0000
Updated2014-11-21T18:46:40.000+0000

Description

Build KS with android-L. Go to Mahups->Facebook->Login/Logout. App crashes with log
E/art     (16298): JNI ERROR (app bug): attempt to pass an instance of java.lang.Object[] as argument 1 to void facebook.FacebookModule.setPermissions(java.lang.String[])
F/art     (16298): art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: bad arguments passed to void facebook.FacebookModule.setPermissions(java.lang.String[]) (see above for details)
F/art     (16298): art/runtime/check_jni.cc:65]     from boolean org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(long, java.lang.Object, long, java.lang.String, java.lang.Object, boolean, boolean, int, java.lang.String)
F/art     (16298): art/runtime/check_jni.cc:65] "KrollRuntimeThread" prio=5 tid=11 Runnable
F/art     (16298): art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x790380a0 self=0xb8dc2100
F/art     (16298): art/runtime/check_jni.cc:65]   | sysTid=16338 nice=0 cgrp=default sched=0/0 handle=0xb8dbda10
F/art     (16298): art/runtime/check_jni.cc:65]   | state=R schedstat=( 0 0 0 ) utm=393 stm=22 core=0 HZ=100
F/art     (16298): art/runtime/check_jni.cc:65]   | stack=0xa6c79000-0xa6c7f000 stackSize=1064KB
F/art     (16298): art/runtime/check_jni.cc:65]   native: #00 pc 00005baf  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+95)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #01 pc 00002751  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+33)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #02 pc 003ba727  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, art::DumpNativeStack::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+135)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #03 pc 0038bc10  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, art::Thread::Dump::char_traits<char> >&) const+272)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #04 pc 00129a18  /system/lib/libart.so (art::JniAbort(char const*, char const)+952)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #05 pc 0012aa1c  /system/lib/libart.so (art::JniAbortF(char const*, char const, ellipsis)+108)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #06 pc 0008412b  /system/lib/libart.so (art::CheckMethodArguments(art::mirror::ArtMethod*, unsigned int*)+844)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #07 pc 0036c1fb  /system/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, art::mirror::Object*, _jmethodID*, jvalue*)+1147)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #08 pc 002d11fe  /system/lib/libart.so (art::JNI::CallVoidMethodA(_JNIEnv*, _jobject*, _jmethodID*, jvalue*)+334)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #09 pc 0013aeff  /system/lib/libart.so (art::CheckJNI::CallVoidMethodA(_JNIEnv*, _jobject*, _jmethodID*, jvalue*)+175)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #10 pc 00007dcd  /data/app-lib/com.appcelerator.kitchensink-1/libfacebook.so (v8<facebook::FacebookModule::setter_permissions::Value> facebook::FacebookModule::setter_permissions(v8::Local<facebook::FacebookModule::setter_permissions::String>(facebook::FacebookModule::setter_permissions::AccessorInfo const&)+237)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #11 pc 00473c47  /data/app-lib/com.appcelerator.kitchensink-1/libkroll-v8.so (???)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #12 pc 00042140   (???)
F/art     (16298): art/runtime/check_jni.cc:65]   native: #13 pc 0004a07f  /system/lib/libskia.so (???)
F/art     (16298): art/runtime/check_jni.cc:65]   at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native method)
F/art     (16298): art/runtime/check_jni.cc:65]   at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
F/art     (16298): art/runtime/check_jni.cc:65]   at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:884)
F/art     (16298): art/runtime/check_jni.cc:65]   at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1107)
F/art     (16298): art/runtime/check_jni.cc:65]   at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347)
F/art     (16298): art/runtime/check_jni.cc:65]   at ti.modules.titanium.ui.TableViewProxy.handleMessage(TableViewProxy.java:942)
F/art     (16298): art/runtime/check_jni.cc:65]   at android.os.Handler.dispatchMessage(Handler.java:98)
F/art     (16298): art/runtime/check_jni.cc:65]   at android.os.Looper.loop(Looper.java:135)
F/art     (16298): art/runtime/check_jni.cc:65]   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
F/art     (16298): art/runtime/check_jni.cc:65] 
F/libc    (16298): invalid address or address of corrupt block 0xb8ea8d58 passed to dlfree
I/WindowState( 1280): WIN DEATH: Window{38cde3ee u0 com.appcelerator.kitchensink/com.appcelerator.kitchensink.KitchensinkActivity}
I/ActivityManager( 1280): Process com.appcelerator.kitchensink (pid 16298) has died.

Comments

  1. Ping Wang 2014-08-18

    PR: https://github.com/appcelerator/titanium_mobile/pull/5973 For FR, please build the facebook module using the SDK with the above fix and run KS.
  2. Lokesh Choudhary 2014-08-27

    The issue is still reproducible on android L emulator. Reopening Environment: Appc Studio : 3.4.0.201408270900 Ti SDK : 3.4.0.v20140826143313 Mac OSX : 10.9.4 Alloy : 1.5.0-dev CLI - 3.4.0-dev Code Processor: 1.1.1 Android L emulator
  3. Ping Wang 2014-08-28

    Updated the Facebook module. PR: https://github.com/appcelerator-modules/ti.facebook/pull/12 To test the fix, please download facebook 3.0.3 from the master branch in ti.facebook repo and run it with SDK 3.4.0.
  4. Ingo Muschenetz 2014-08-28

    Since SDK fixes are already tested as part of TIMOB-17476, we can defer this (which is just a module fix) to 3.4.1.
  5. Jon Alter 2014-10-22

    Adding module to SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/6258 3_4_X PR: https://github.com/appcelerator/titanium_mobile/pull/6259 3_4_1 PR: https://github.com/appcelerator/titanium_mobile/pull/6260
  6. Lokesh Choudhary 2014-10-28

    Verified the fix. We do not see any facebook crashes & login & logout works successfully. Closing. Environment: Appc Studio : 3.4.1.201410191611 Ti SDK : 3.4.1.v20141028145715, 3.4.2.v20141028145714, 3.5.0.v20141028150133 Mac OSX : 10.9.4 Alloy : 1.5.1 CLI - 3.4.1-dev Code Processor: 1.1.1 Nexus 5 - android 5.0 preview Facebook module : 3.0.3

JSON Source