-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luajava.new(...) produce error on Android ART #10
Comments
Yes, I got this bug too. |
I've faced the same problem. Thanks for the solution, but this project looks like it's no longer being maintained |
Thanks, that worked for me as well. |
Since this project is no longer being maintained, I have forked this project and fixed some bugs. |
@nirhal , your fork has too much in one commit :( |
BTW looks like @stevedonovan and @mkottman took care of this in AndroLua project. I adapted their works to luajava layout. |
Calling luajava.new(...) produce the following error on Android ART:
A/art: art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: can't call static int org.keplerproject.luajava.LuaJavaAPI.javaNew(int, java.lang.Class) with class java.lang.Class<java.lang.Class> A/art: art/runtime/java_vm_ext.cc:410] in call to CallStaticIntMethod
After some code review, I figured out the problem.
In luajava.c, line 1377:
ret = ( *javaEnv )->CallStaticIntMethod( javaEnv , clazz , method , (jint)stateIndex , classInstance );
"clazz" is not the object we want here. It should be:
ret = ( *javaEnv )->CallStaticIntMethod( javaEnv , luajava_api_class , method , (jint)stateIndex , classInstance );
Moreover, I think, line 1371:
if ( clazz == NULL || method == NULL )
should be:
if ( luajava_api_class == NULL || method == NULL )
Nir.
The text was updated successfully, but these errors were encountered: