Skip to content
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

Android 10 - JNI error after set_rewarded_ad_listener() called #103

Open
nikosgrikos opened this issue Mar 23, 2021 · 5 comments
Open

Android 10 - JNI error after set_rewarded_ad_listener() called #103

nikosgrikos opened this issue Mar 23, 2021 · 5 comments

Comments

@nikosgrikos
Copy link

Hi,

My live app is working on Android 9 and lower but has problems working on Android 10.
I'm using kivy==master and branch==develop (and also tried android ndk=20b) in the buildozer spec. I borrowed an Android 10 phone and managed to obtain a log. I think it has something to do with set_rewarded_ad_listener() call as when I took it out, it functions perfectly.
I originally posted this on the Kivy users group (see link) and Robert explained that it was something to do with garbage collection with Python and Java working on the same heap.

Original post:
https://groups.google.com/d/msgid/kivy-users/0b11f407-faba-4727-af6a-894f928a91efn%40googlegroups.com.

Snippet of log below:
03-21 19:05:30.982 18943 18977 I python : [INFO ] [KivMob ] init called.
03-21 19:05:30.982 18943 18977 I python : [INFO ] [KivMob ] Android platform detected.
03-21 19:05:30.983 18943 18977 I python : [INFO ] [KivMob ] set_rewarded_ad_listener() called.
03-21 19:05:30.985 18943 18977 F onkeybuster204: indirect_reference_table.cc:60] JNI ERROR (app bug): accessed deleted Global 0x8a22
03-21 19:05:30.990 18943 18943 I onkeybuster204: The ClassLoaderContext is a special shared library.
03-21 19:05:30.992 18943 18943 I chatty : uid=10594(org.nikosgrikos.monkeybuster2048) identical 1 line
03-21 19:05:30.995 18943 18943 I onkeybuster204: The ClassLoaderContext is a special shared library.
03-21 19:05:31.055 18943 18977 F onkeybuster204: runtime.cc:630] Runtime aborting...

I really could do with some help on this one as almost 50% of android users are now using android 10.

Nick

@akgupta0777
Copy link
Contributor

show us your python code and buildozer.spec file we can't just figure out what the issue is without any code or just logs.
Thanks

@nikosgrikos
Copy link
Author

Buildozer spec and code snippet attached.
Please let me know if there is anything else you need or if there is something I should try.
Thanks
Nick

buildozer_as_txt_file.txt
main_snippet.txt

@nikosgrikos
Copy link
Author

Hi again,
I'm just following up on this. I wondered if you managed to recreate the problem.
Thanks
Nick

@MichaelStott
Copy link
Owner

@nikosgrikos Not as of yet, I'll be working on this project soon to address some issues that have been slowly accumulating.

@nikosgrikos
Copy link
Author

I made a further observation (tested on a OnePlus 7Pro android 10 phone model GM1913)
The first time I enter my application, I have no problem, the application works.
The second time I enter the application and subsequent times, I experience the JNI error. The JNI error occurs also for banners and interstitials not just video ads.
When I take the ad calls out, the application works fine all the time.
I think on some android 10 models it works okay, on others it fails.
Hope this helps in some way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants