Android crash after few seconds, strange UI #141

Closed
opened 2019-03-08 20:24:29 +00:00 by Wheest · 8 comments

Hey there. While trying to avoid making commitments, I'm looking at running a small ThinkAloud study on the Android app to compile some feedback on usability, for my own amusement mostly.

I've not worked with Android development before, but have got the package built, and pushed to an old test device using adb.

However, when I open the app, it shows the following screen (which seems a bit too MVP), and then it closes a couple of seconds later.

Are there any debug or logging workflows that would help identify what might be causing this?

Possibly related #128, #131

Hey there. While trying to avoid making commitments, I'm looking at running a small ThinkAloud study on the Android app to compile some feedback on usability, for my own amusement mostly. I've not worked with Android development before, but have got the package built, and pushed to an old test device using `adb`. However, when I open the app, it shows the following screen (which seems a bit *too* MVP), and then it closes a couple of seconds later. Are there any debug or logging workflows that would help identify what might be causing this? Possibly related [#128](https://git.openprivacy.ca/cwtch.im/ui/issues/128), [#131](https://git.openprivacy.ca/cwtch.im/ui/issues/131)
Owner

Since you have adb working, you can access your device's debug output directly using logcat: https://developer.android.com/studio/command-line/logcat (depending on your setup, simply running "adb logcat" often works). If cwtch is crashing, you should get a crash log there, which would tell us what the problem is.

The reason the screenshot looks like that is that the app is waiting for your profile info to be loaded, and is probably crashing once the data arrives.

(We'll replace this with a proper loading screen at some point, but it's not a priority as it needs multiple profile support to be finished first.)

Since you have adb working, you can access your device's debug output directly using logcat: https://developer.android.com/studio/command-line/logcat (depending on your setup, simply running "adb logcat" often works). If cwtch is crashing, you should get a crash log there, which would tell us what the problem is. The reason the screenshot looks like that is that the app is waiting for your profile info to be loaded, and is probably crashing once the data arrives. (We'll replace this with a proper loading screen at some point, but it's not a priority as it needs multiple profile support to be finished first.)
Author

Thanks @erinn.

See the following pastebin with some of the debug output.

I think the most pertinent messages are a few hundred repeats of:

W/libgo.so(14544): qrc:/qml/widgets/SimpleButton.qml:36:3: QML Image: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.

for almost every UI element.

In lines 307/308, the process dies

I/ActivityManager( 2410): Process org.qtproject.example.go (pid 14544) (adj 0) has died.
I/WindowState( 2410): WIN DEATH: Window{435fbf10 u0 org.qtproject.example.go/org.qtproject.qt5.android.bindings.QtActivity}

Though I can't quite pinpoint a message that causes the crash.

Thanks @erinn. See the following [pastebin](https://pastebin.com/rxNdvzTq) with some of the debug output. I think the most pertinent messages are a few hundred repeats of: ``` W/libgo.so(14544): qrc:/qml/widgets/SimpleButton.qml:36:3: QML Image: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead. ``` for almost every UI element. In lines 307/308, the process dies ``` I/ActivityManager( 2410): Process org.qtproject.example.go (pid 14544) (adj 0) has died. I/WindowState( 2410): WIN DEATH: Window{435fbf10 u0 org.qtproject.example.go/org.qtproject.qt5.android.bindings.QtActivity} ``` Though I can't quite pinpoint a message that causes the crash.
Owner

Oof okay, we've seen a similar problem before and it's probably related to the tor binary we bundle. What's the make/model and OS version of the device you're testing this on?

Oof okay, we've seen a similar problem before and it's probably related to the tor binary we bundle. What's the make/model and OS version of the device you're testing this on?
Author

Probably a bit of a legacy one tbh, GT-i9305, Android 4.4.4

Probably a bit of a legacy one tbh, GT-i9305, Android 4.4.4
Owner

Thanks! We're going to add some better tor handling and debug messaging for Android soon, which should fix or help fix the problem.

If you're feeling impatient, I have a suspicion that replacing android/libs/armeabi-v7a/libtor.so with this file: https://git.openprivacy.ca/openprivacy/buildfiles/src/master/tor/tor-0.3.5.7-armeabi-v7a.so (you'll need to rename it to libtor.so) and rebuilding the APK might work.

Thanks! We're going to add some better tor handling and debug messaging for Android soon, which should fix or help fix the problem. If you're feeling impatient, I have a suspicion that replacing android/libs/armeabi-v7a/libtor.so with this file: https://git.openprivacy.ca/openprivacy/buildfiles/src/master/tor/tor-0.3.5.7-armeabi-v7a.so (you'll need to rename it to libtor.so) and rebuilding the APK *might* work.
Author

No such luck unfortunately, similar debug logs, but thanks for the insight.

This is dilettante work only for me, so there's no rush in being able to play with the Android build.

Thanks again

No such luck unfortunately, similar debug logs, but thanks for the insight. This is dilettante work only for me, so there's no rush in being able to play with the Android build. Thanks again
Owner

So the "MVP" initial state is because the app hasn't finished loading and it's an order of mag slower on android. we've just pushed a splash screen that should at least cover that up until a successful load.

The crash remains more interesting and unsolved.

If you have it, I've found android studio good for debugging because it automatically connects to the debug process and reads and shows in UI the full logs

So the "MVP" initial state is because the app hasn't finished loading and it's an order of mag slower on android. we've just pushed a splash screen that should at least cover that up until a successful load. The crash remains more interesting and unsolved. If you have it, I've found android studio good for debugging because it automatically connects to the debug process and reads and shows in UI the full logs
Owner

closing because we've done so much on android improvements this year. This is likely better, but if not feel free to reopen it, but the android service should likely have helped this problem

closing because we've done so much on android improvements this year. This is likely better, but if not feel free to reopen it, but the android service should likely have helped this problem
sarah closed this issue 2020-11-25 01:32:51 +00:00
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/ui#141
No description provided.