pyjnius intent sample code causes app crash

22 views
Skip to first unread message

Tom Grundy

unread,
Dec 30, 2018, 11:14:12 AM12/30/18
to Kivy users support
The 'Accessing the Activity' example from the pyjnius docs (which is apparently intended to open kivy.org in a browser and nothing else), minimally wrapped in a kivy GUI, causes a crash on Samsung S9 (kivy 1.10.1, buildozer, python3, api 26, ndk r15c, ndk-api 21  

Here's the gist including code and log files - the app's log file gives no clues; logcat looks like it has some clues, maybe a missing .so file?

Robert Flatt

unread,
Dec 30, 2018, 7:52:57 PM12/30/18
to Kivy users support
Try looking at the logcat out without using grep, there is very probably a crash traceback in there somewhere.

Tom Grundy

unread,
Dec 30, 2018, 11:53:05 PM12/30/18
to kivy-...@googlegroups.com
I updated the gist with another file  logcat_crash_unfiltered_snippets.txt  - it has snippets that seemed relevant including the backtrace and thread dumps:

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/aadeaf58-def7-449e-aa8d-dbd81ddc3d83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Flatt

unread,
Dec 31, 2018, 12:17:49 PM12/31/18
to Kivy users support
The edited logcat ends at the interesting part, is there any more traceback to the app after jnius.so ?

If not, your best bet to find the location is to one by one comment out lines in your app.

Tom Grundy

unread,
Dec 31, 2018, 3:42:15 PM12/31/18
to kivy-...@googlegroups.com
Added enough logger lines to find that it was failing during the .cast function.  Googling some more found that changing from org.renpy.android.PythonActivity to org.kivy.android.PythonActivity solved it, and now it opens the web page as expected.  So, this particular issue is closed now - though I was using it as a stepping stone to another unanswered question on this forum - if you have any ideas there, it would be greatly appreciated: " how to spawn android's 'download' action?"

ZenCODE

unread,
Jan 1, 2019, 1:52:05 AM1/1/19
to Kivy users support
I would suggest creating a new post for that one. Otherwise it's not easy to find for other and people are less likely to respond (because it's mixed in with other issues)...

Tom Grundy

unread,
Jan 1, 2019, 1:57:09 AM1/1/19
to kivy-...@googlegroups.com
sorry for the confusion, " how to spawn android's 'download' action?" is already a separate post on this same forum (and that text should include the link) - is that what you meant?  Thanks

Reply all
Reply to author
Forward
0 new messages