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

crash during initialising display #1416

Open
ggajoch opened this issue Apr 29, 2024 · 9 comments · May be fixed by #1422
Open

crash during initialising display #1416

ggajoch opened this issue Apr 29, 2024 · 9 comments · May be fixed by #1422
Milestone

Comments

@ggajoch
Copy link

ggajoch commented Apr 29, 2024

XCSoar versions having the problem

7.42

XCSoar versions not having the problem

7.41

System information

Device: Aquila GPS from PureGliding
Website
Manual

Android info:
Model number: m515
Android version: 6.0
Kernel version: 3.18.22
Build number: MRA58K test-keysV1.920210108

I've cleaned XCSoarData folder.

Steps to reproduce the behavior

  • remove XCSoarData folder
  • start XCSoar
  • click fly or sim

Expected behavior

App launches normally.

Actual behavior

  • app start to load
  • loading bar gets to "Initialising display"
  • crashes with "Unfortunately, XCSoar has stopped"

Installing 7.41 makes it work fine. Re-installing 7.42 makes it crash again - i.e. this is repeteable.

I'm attaching logcat from the crash, first run after cleaning data folder and re-installation of the XCSoar.
xcsoar.log

@lordfolken
Copy link
Contributor

So what is needed next, is finding the commit that breaks your setup.
v7.41...v7.42

can you git bisect and compile and find the commit that is breaking your setup?

@ggajoch
Copy link
Author

ggajoch commented Apr 30, 2024

Sure, I've went through bisect and this is the result:

3a58000d8ff2c831ea75080b2e1403736546d884 is the first bad commit
commit 3a58000d8ff2c831ea75080b2e1403736546d884
Author: Max Kellermann <max.kellermann@gmail.com>
Date:   Fri Mar 1 21:22:44 2024 +0100

    build/resource.mk: rename 96dpi icons to *_96.png

    Each rendered variant should have such a suffix.

 build/android.mk                  |  2 +-
 build/resource.mk                 | 10 +++++-----
 tools/GenerateWindowsResources.pl |  2 +-
 tools/LinkResources.pl            |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

@lordfolken
Copy link
Contributor

Sure, I've went through bisect and this is the result:

3a58000d8ff2c831ea75080b2e1403736546d884 is the first bad commit
commit 3a58000d8ff2c831ea75080b2e1403736546d884
Author: Max Kellermann <max.kellermann@gmail.com>
Date:   Fri Mar 1 21:22:44 2024 +0100

    build/resource.mk: rename 96dpi icons to *_96.png

    Each rendered variant should have such a suffix.

 build/android.mk                  |  2 +-
 build/resource.mk                 | 10 +++++-----
 tools/GenerateWindowsResources.pl |  2 +-
 tools/LinkResources.pl            |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

Are you sure about that commit? It only renames icons.

@lordfolken
Copy link
Contributor

lordfolken commented May 5, 2024

I am not enjoying 7.42 as it looks like it loads but then immediately fails to blank screen.

This is a bugtracker not a forum.

@XCSoar XCSoar deleted a comment from roscosoarer May 5, 2024
@ubx
Copy link
Contributor

ubx commented May 6, 2024

I'm able to reproduce the problem with XCSoar (latest from Head) on a virtual device, Android 6.0 x86_64.

Screenshot
Screenshot_20240506_140043

xcsoar.log

[2024-05-06T11:39:18Z] Starting XCSoar XCSoar v7.43-Android~git#04eab3f9ec
[2024-05-06T11:39:18Z] Failed to initialise Bluetooth: java.lang.Exception: No Bluetooth adapter found
[2024-05-06T11:39:18Z] EGL vendor: Android
[2024-05-06T11:39:18Z] EGL version: 1.4 Android META-EGL
[2024-05-06T11:39:18Z] EGL extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_fence_sync EGL_KHR_create_context EGL_ANDROID_image_native_buffer EGL_ANDROID_recordable 
./src/java/Ref.hxx:139: void Java::TrivialRef<_jclass *>::Set(JNIEnv *, T) [T = _jclass *]: assertion "value == nullptr" failed

logcat

05-06 14:11:33.145  1686  1845 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.xcsoar/.XCSoar (has extras)} from uid 10008 on display 0
05-06 14:11:33.180  3574  3611 F libc    : ./src/java/Ref.hxx:139: void Java::TrivialRef<_jclass *>::Set(JNIEnv *, T) [T = _jclass *]: assertion "value == nullptr" failed
05-06 14:11:33.180  3574  3611 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 3611 (NativeMain)
05-06 14:11:33.188  1279  1726 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3686400
05-06 14:11:33.205  2622  2649 D EGL_emulation: eglMakeCurrent: 0x7ffe45347960: ver 3 1 (tinfo 0x7ffe4523f2c0)
05-06 14:11:33.206  2622  2649 E Surface : getSlotFromBufferLocked: unknown buffer: 0x7ffe3b5b6bc0
05-06 14:11:33.222  1928  2328 D EGL_emulation: eglMakeCurrent: 0x7ffe45354180: ver 3 1 (tinfo 0x7ffe3c751ba0)
05-06 14:11:33.281  1303  1303 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-06 14:11:33.281  1303  1303 F DEBUG   : Build fingerprint: 'Android/sdk_phone_x86_64/generic_x86_64:6.0/MASTER/4174734:userdebug/test-keys'
05-06 14:11:33.281  1303  1303 F DEBUG   : Revision: '0'
05-06 14:11:33.281  1303  1303 F DEBUG   : ABI: 'x86_64'
05-06 14:11:33.281  1303  1303 F DEBUG   : pid: 3574, tid: 3611, name: NativeMain  >>> org.xcsoar <<<
05-06 14:11:33.281  1303  1303 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
05-06 14:11:33.284  1303  1303 F DEBUG   : Abort message: './src/java/Ref.hxx:139: void Java::TrivialRef<_jclass *>::Set(JNIEnv *, T) [T = _jclass *]: assertion "value == nullptr" failed'
05-06 14:11:33.284  1303  1303 F DEBUG   :     rax 0000000000000000  rbx 00007ffe3c33f500  rcx ffffffffffffffff  rdx 0000000000000006
05-06 14:11:33.284  1303  1303 F DEBUG   :     rsi 0000000000000e1b  rdi 0000000000000df6
05-06 14:11:33.284  1303  1303 F DEBUG   :     r8  00000000ffffffff  r9  0000000000000000  r10 0000000000000008  r11 0000000000000206
05-06 14:11:33.284  1303  1303 F DEBUG   :     r12 0000000000000e1b  r13 0000000000000006  r14 00007ffe3dc60748  r15 0000000000100005
05-06 14:11:33.284  1303  1303 F DEBUG   :     cs  0000000000000033  ss  000000000000002b
05-06 14:11:33.284  1303  1303 F DEBUG   :     rip 00007ffe5169acc7  rbp 0000000000000000  rsp 00007ffe3c33ec88  eflags 0000000000000206
05-06 14:11:33.285  1303  1303 F DEBUG   : 
05-06 14:11:33.285  1303  1303 F DEBUG   : backtrace:
05-06 14:11:33.285  1303  1303 F DEBUG   :     #00 pc 0000000000088cc7  /system/lib64/libc.so (tgkill+7)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #01 pc 0000000000085b11  /system/lib64/libc.so (pthread_kill+65)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #02 pc 000000000002e841  /system/lib64/libc.so (raise+17)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #03 pc 00000000000288fd  /system/lib64/libc.so (abort+61)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #04 pc 000000000002c210  /system/lib64/libc.so (__libc_fatal+144)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #05 pc 00000000000289cc  /system/lib64/libc.so (__assert2+28)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #06 pc 00000000005ca3e3  /data/app/org.xcsoar-1/lib/x86_64/libxcsoar.so (offset 0x4d5000)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #07 pc 00000000005c98b4  /data/app/org.xcsoar-1/lib/x86_64/libxcsoar.so (offset 0x4d5000)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #08 pc 00000000005ce02d  /data/app/org.xcsoar-1/lib/x86_64/libxcsoar.so (offset 0x4d5000) (Java_org_xcsoar_NativeView_runNative+61)
05-06 14:11:33.285  1303  1303 F DEBUG   :     #09 pc 0000000000098f05  /data/app/org.xcsoar-1/oat/x86_64/base.odex (offset 0x74000)
05-06 14:11:33.305  1303  1303 F DEBUG   : 
05-06 14:11:33.305  1303  1303 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_05
05-06 14:11:33.305  1303  1303 E DEBUG   : AM write failed: Broken pipe
05-06 14:11:33.305  1686  1703 I BootReceiver: Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
05-06 14:11:33.308  1686  1723 W InputDispatcher: channel 'b838f86 org.xcsoar/org.xcsoar.XCSoar (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
05-06 14:11:33.308  1686  1723 E InputDispatcher: channel 'b838f86 org.xcsoar/org.xcsoar.XCSoar (server)' ~ Channel is unrecoverably broken and will be disposed!
05-06 14:11:33.309  1686  2421 I WindowState: WIN DEATH: Window{2412fc2 u0 SurfaceView}
05-06 14:11:33.309  1686  1844 I WindowState: WIN DEATH: Window{b838f86 u0 org.xcsoar/org.xcsoar.XCSoar}
05-06 14:11:33.309  1686  1844 W InputDispatcher: Attempted to unregister already unregistered input channel 'b838f86 org.xcsoar/org.xcsoar.XCSoar (server)'
05-06 14:11:33.363  1313  1313 I Zygote  : Process 3574 exited due to signal (6)
05-06 14:11:33.365  1686  1698 I ActivityManager: Process org.xcsoar (pid 3574) has died
05-06 14:11:33.365  1686  1698 W ActivityManager: Scheduling restart of crashed service org.xcsoar/.MyService in 1000ms
05-06 14:11:33.366  1686  1698 W ActivityManager: Force removing ActivityRecord{d137814 u0 org.xcsoar/.XCSoar t13}: app died, no saved state
05-06 14:11:33.384  2622  2649 D EGL_emulation: eglMakeCurrent: 0x7ffe45347960: ver 3 1 (tinfo 0x7ffe4523f2c0)
05-06 14:11:33.391  1686  2884 I OpenGLRenderer: Initialized EGL, version 1.4
05-06 14:11:33.393  1686  2884 D EGL_emulation: eglCreateContext: 0x7ffe357e4320: maj 3 min 1 rcv 4
05-06 14:11:33.403  1686  2884 D EGL_emulation: eglMakeCurrent: 0x7ffe357e4320: ver 3 1 (tinfo 0x7ffe35202be0)
05-06 14:11:33.403  1686  2884 E eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
05-06 14:11:33.403  1686  2884 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
05-06 14:11:33.403  1686  2884 E eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
05-06 14:11:33.407  1686  2884 D EGL_emulation: eglMakeCurrent: 0x7ffe357e4320: ver 3 1 (tinfo 0x7ffe35202be0)
05-06 14:11:33.541  1686  1705 W WindowAnimator: Failed to dispatch window animation state change.
05-06 14:11:33.541  1686  1705 W WindowAnimator: android.os.DeadObjectException
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.BinderProxy.transactNative(Native Method)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.BinderProxy.transact(Binder.java:503)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer.doCallbacks(Choreographer.java:670)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer.doFrame(Choreographer.java:603)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.Handler.handleCallback(Handler.java:739)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.Handler.dispatchMessage(Handler.java:95)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.Looper.loop(Looper.java:148)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.HandlerThread.run(HandlerThread.java:61)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.ServiceThread.run(ServiceThread.java:46)
05-06 14:11:33.541  1686  1705 W WindowAnimator: Failed to dispatch window animation state change.
05-06 14:11:33.541  1686  1705 W WindowAnimator: android.os.DeadObjectException
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.BinderProxy.transactNative(Native Method)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.BinderProxy.transact(Binder.java:503)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer.doCallbacks(Choreographer.java:670)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer.doFrame(Choreographer.java:603)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.Handler.handleCallback(Handler.java:739)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.Handler.dispatchMessage(Handler.java:95)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.Looper.loop(Looper.java:148)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at android.os.HandlerThread.run(HandlerThread.java:61)
05-06 14:11:33.541  1686  1705 W WindowAnimator: 	at com.android.server.ServiceThread.run(ServiceThread.java:46)
05-06 14:11:34.375  1686  1700 I ActivityManager: Start proc 3619:org.xcsoar/u0a55 for service org.xcsoar/.MyService

Perhaps this could assist in pinpointing the issue.

@lordfolken
Copy link
Contributor

I tried this as well when looking at this problem.
But the submitter says that it doesn't work since 3a58000
The last version that works for me in the emulator is 7.22. Not 7.41

@lordfolken lordfolken linked a pull request May 7, 2024 that will close this issue
@lordfolken
Copy link
Contributor

I fixed the first issue, the ALPHA channel for EGL was missing in the initialization for android.

@lordfolken
Copy link
Contributor

lordfolken commented May 7, 2024

The second problem is if the VDPI value is lower than 120, then this logic is not triggered:

if (Layout::vdpi >= 120) {
/* switch to larger 160dpi icons at 120dpi */
unsigned source_dpi = 96;
if (Layout::vdpi >= 220 && ultra_id.IsDefined()) {
id = ultra_id;
source_dpi = 300;
} else if (big_id.IsDefined()) {
id = big_id;
source_dpi = 192;
}

Therefore the Resource name of the bitmap is never appended with the _96 or similar and fails to load the bitmap. Which leads to the above backtrace.

@ggajoch
Copy link
Author

ggajoch commented May 10, 2024

As I got the device back, I've tested that:

Attached is logcat from commit ce2cf3d456:
xcsoar.log

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

Successfully merging a pull request may close this issue.

3 participants