Hi, not entirely sure if this is the right channel...
# android
n
Hi, not entirely sure if this is the right channel—please feel free to redirect me if needed. Unfortunately, I can’t share the full codebase due to confidentiality, but I’m hoping someone can help point me in the right direction or offer any insight. I’m working with Jetpack Compose and have a composable that contains a
HorizontalPager
with
beyondViewportPageCount = 0
, hosting 5 tabs. Each tab is backed by its own
ViewModel
, as they require separate API calls to fetch different sets of data. Some tabs trigger multiple calls, and a few have refresh timers that periodically update their data. Functionally, everything mostly works. However, after navigating into a tab, selecting an item, returning, and repeating this process a few times, I encounter a crash. The issue is that there’s no meaningful stack trace—just an abrupt crash, which makes it hard to trace the root cause. I suspect this may be related to a memory issue—perhaps due to multiple ViewModels, background tasks, or improper cleanup when navigating in and out. I’ve attempted various optimizations, but I’m concerned I might be missing something fundamental, especially in the context of using
HorizontalPager
with multiple dynamic ViewModels and background activity. Any advice, debugging tips, or even things to watch out for in this setup would be greatly appreciated. (Will add Logcat below in thread.)
Copy code
2025-07-16 23:01:51.233 10235-10549 MediaCodec              com.ionses.app.development           E  Media Quality Service not found.
2025-07-16 23:01:51.237 10235-10552 app.development         com.ionses.app.development           E  Failed to query component interface for required system resources: 6
2025-07-16 23:01:51.289 10235-10549 MediaCodec              com.ionses.app.development           E  Media Quality Service not found.
2025-07-16 23:01:51.291 10235-10557 app.development         com.ionses.app.development           E  Failed to query component interface for required system resources: 6
2025-07-16 23:01:51.372   701-1804  AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:51.373   701-1804  AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:51.672 10235-10235 app.development         com.ionses.app.development           E  No package ID ff found for resource ID 0xffffffff.
2025-07-16 23:01:51.672 10235-10235 app.development         com.ionses.app.development           E  No package ID ff found for resource ID 0xffffffff.
2025-07-16 23:01:51.672 10235-10235 app.development         com.ionses.app.development           E  No package ID ff found for resource ID 0xffffffff.
2025-07-16 23:01:51.672 10235-10235 app.development         com.ionses.app.development           E  No package ID ff found for resource ID 0xffffffff.
2025-07-16 23:01:51.672 10235-10235 app.development         com.ionses.app.development           E  No package ID ff found for resource ID 0xffffffff.
2025-07-16 23:01:51.674   701-2100  AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:51.674   701-1804  AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:51.685   701-719   AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:51.685   701-775   AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:52.111 10235-10358 libc                    com.ionses.app.development           A  Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x28 in tid 10358 (RenderThread), pid 10235 (app.development)
2025-07-16 23:01:52.803 10577-10577 DEBUG                   crash_dump64                         A  Cmdline: com.ionses.app.development
2025-07-16 23:01:52.803 10577-10577 DEBUG                   crash_dump64                         A  pid: 10235, tid: 10358, name: RenderThread  >>> com.ionses.app.development <<<
---------------------------- PROCESS ENDED (10235) for package com.ionses.app.development ----------------------------
2025-07-16 23:01:52.968   701-1224  AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:52.968   701-1224  AppOps                  system_server                        E  Operation not started: uid=10217 pkg=com.ionses.app.development(null) op=CONTROL_AUDIO_PARTIAL
2025-07-16 23:01:52.968   701-775   AppOps                  system_server                        E  attributionTag  not declared in manifest of com.ionses.app.development
2025-07-16 23:01:52.968   701-775   AppOps                  system_server                        E  Operation not started: uid=10217 pkg=com.ionses.app.development(null) op=CONTROL_AUDIO
n
Unfortunately not. I can’t reproduce the crash on my actual phone (pixel 6 I think) but on an emulator I can. Hence I suspect some memory issue.
g
Have you tried create another project that have similar code and that also crashes? If so, can you share with us?