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 when making a call #282

Open
ghost opened this issue Apr 4, 2023 · 6 comments
Open

Crash when making a call #282

ghost opened this issue Apr 4, 2023 · 6 comments
Assignees
Labels
bug/limitation elsewhere Bug/limitation in the ROM or another project

Comments

@ghost
Copy link

ghost commented Apr 4, 2023

When I call someone, I get a notification that recording has started, and a moment later that the BCR app has crashed.
My phone model is Samsung Galaxy M52 5G (SM-M526BR/DS)
Magisk version: 25.2 (25200)
Here is crash.log.txt file (pastebin because the logs exceed the maximum number of characters per comment on github): https://pastebin.com/e8jB0nUM

@chenxiaolong
Copy link
Owner

Couldn't create icon StatusBarIcon(icon=Icon(typ=RESOURCE pkg=com.chiller3.bcr id=0x7f07008d) visible user=0 )

That's weird. BCR is crashing because Android is failing to show its icon in the status bar for the notification. I've never seen that before and am not sure why that would happen. Do you happen to be using any custom themes, Magisk modules, etc. that might impact the status bar?

It might be possible to work around this by going to Settings -> Apps -> BCR -> Notifications and changing all 3 categories to Silent. That should prevent Android from trying to show an icon in the status bar.

@NLLAPPS
Copy link

NLLAPPS commented Apr 4, 2023

Just to chip in, I have started to get these crashes after updating Android Studio to Giraffe 2022.3.1 Canary 11. Something somewhere must changed.

It only happens on Android 11 and only if the vector drawable used as notification icon has color attribute rather then color. My guess is that theme resources are not yet available at the moment Android system binds to the service.

Fix for me was to remove any theme references from vector drawable

I cannot thank enough to this person -> https://hwalia.com/android/2019/08/16/could-not-create-icon-statusbaricon.html

chenxiaolong added a commit that referenced this issue Apr 4, 2023
BCR is crashing on some Android 11 devices when creating the foreground
service notification with the following error:

    BadForegroundServiceNotificationException: Bad notification <...>: Couldn't create icon StatusBarIcon

We can work around this issue by avoiding theme attributes in the
notification icon.

(Thanks to @NLLAPPS for the pointer.)

Fixes: #282

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong
Copy link
Owner

Thanks for the info, @NLLAPPS! That sounds promising. The vector drawable I've been using for quick settings and notification icons has android:tint="?attr/colorControlNormal" and android:fillColor="@android:color/white". I'll try dropping the (useless) tint and setting the color to a raw ARGB value.


@SandResidence Can you give this debug build a try? BCR-1.38.r5.g4acb8c5-debugOpt.zip

@ghost
Copy link
Author

ghost commented Apr 6, 2023

Okay, I've finally solved the problem!
Unfortunately, I forgot to install the .apk file that came with the Magisk module.
I removed the Magisk module, rebooted the phone, and then I installed the Magisk module and installed the .apk file.
After another reboot, it works like a charm.

@chenxiaolong chenxiaolong self-assigned this Apr 18, 2023
@chenxiaolong chenxiaolong added the bug/limitation elsewhere Bug/limitation in the ROM or another project label Apr 18, 2023
@Bazoogle
Copy link

Bazoogle commented Oct 29, 2024

The old pastebin is now expired, but based on the quote I believe I am getting the same error with a different resource ID:

[Device Brand]: motorola
[Device Model]: motorola edge (2021)
[Display]: lineage_berlna-userdebug 14 AP2A.240905.003 f05164546c
[Android Version]: 14
[Android API Level]: 34
[System Locale]: en_US
[Process ID]: 23082
[User ID]: 0
[CPU ABI]: none
[Package Name]: com.chiller3.bcr
[Version Name]: 1.72
[Version Code]: 83968
[Target SDK]: 35
[Min SDK]: 28
[Error Type]: JVM
[Crash Time]: 2024-10-29T17:03:00.504
[Stack Trace]:
android.app.RemoteServiceException$BadForegroundServiceNotificationException: Bad notification(tag=null, id=265) posted from package com.chiller3.bcr, crashing app(uid=10211, pid=23082): Couldn't create icon StatusBarIcon(icon=Icon(typ=RESOURCE pkg=com.chiller3.bcr id=0x7f070093) visible user=0 )
	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2220)
	at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2520)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8592)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

When I try to make a call, it crashes repeatedly, and actually makes it difficult to even end the call because the error popups are so quick.

I just tried disabling my notifications, and it worked. I was able to narrow it down to the "Background services" notification category that's causing the issue.

Click for image

BCR Notifcation Settings

If I enable that category, the errors start, and if I disable the category, the errors stop.

@chenxiaolong
Copy link
Owner

@Bazoogle Do you have any root hiding modules installed? (Shamiko, etc.) Those usually cause this (Android can't access BCR's .apk to read the icon). If you want to keep those installed, a lot of folks have been able to work around the problem by extracting BCR's apk from the module zip and installing it normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/limitation elsewhere Bug/limitation in the ROM or another project
Projects
None yet
Development

No branches or pull requests

3 participants