weex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wcxwave" <wcxw...@aliyun.com.INVALID>
Subject [ANDROID] Release 0.19-rc2 weex-core crashing using clang toolchain
Date Sat, 14 Jul 2018 09:39:32 GMT
Dear all,
    in release 0.19-rc2 android project, I find the libweexcore has some problems. 
   1) First, in the latest ndk 0.16 - 0.17, the android just support clang platform tools.
    but in the weex-sdk project, it still uses gcc.
    I get some bugs such as 'there no memcpy function'.
  2) Second, After I change it to use clang, there are some warning during the compile.
      I just ignore it.(but the developer should resolve it. some warning just a bug.)
     I get the weexcore.so. But it crashes after launch the app.
     Then I think it maybe my enviroment problems, so I just replace the weexcore.so from
the apache github.
     Unfortunately, there weexcore.so in the github is not matched the source. 
     It reports there is no native method nativeSetViewPort in WXBridge. I'm  depressed for
     Then I just try to solve the crash.
A/art: art/runtime/check_jni.cc:70] JNI DETECTED ERROR IN APPLICATION: native code passing
in reference to invalid local reference: 0x200001
A/art: art/runtime/check_jni.cc:70]     in call to DeleteLocalRef
    After some debuging, I find the reason for it.
    In the jni_load.cc funtion JNI_OnLoad, 
               the function  WeexCore::RegisterJNIMeasureMode(env); will crash, it will call
DeleteLocalRef twice. 
       After debuging more times and chaning code, I find a problem for the function RegisterJNIMeasureMode.

the  origin source: 
   bool RegisterJNIMeasureMode(JNIEnv *env) {  
there is no return value.
after I change it to the following code,
bool RegisterJNIMeasureMode(JNIEnv *env) {
    ///wcheer.com modified by simon add return 2018.7.14
    return RegisterNativesImpl(env);
It can works for the function. but the latter function is crashed again. 
it has the same reason for crashing.

In the last, I suggest the weex project ndk should use clang toolschain. 
You can resolve some easy problems and it can save other developer's time and efforts.\

Regards Best.
Simon Wu.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message