Skip to content

[Bug]: SIGSEGV: Segmentation violation (invalid memory reference) in ShortcutBadger #1766

@mannoeu

Description

@mannoeu

What happened?

App crashes on open
image

Steps to reproduce?

Bugsnag report for xiaomi users with android version 11, ..., 13.

What did you expect to happen?

Add a handle to detect devices that don't support badges and avoid trying to set the counter badge.

React Native OneSignal SDK version

5.1.2

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

* Xiaomi Redmi 10C - Android 13
* Xiaomi Redmi 9A - Android 11


SIGSEGV: Segmentation violation (invalid memory reference)

0  base.odex +0x520e02 com.onesignal.notifications.internal.badges.impl.shortcutbadger.ShortcutBadger.applyCountOrThrow
1  base.odex +0x5dcd67 com.onesignal.notifications.internal.badges.impl.BadgeCountUpdater.updateCount
2  base.odex +0x5dcb73 com.onesignal.notifications.internal.badges.impl.BadgeCountUpdater.updateStandard
3  base.odex +0x5dccb3 com.onesignal.notifications.internal.badges.impl.BadgeCountUpdater.update
4  base.odex +0x1f6803 com.onesignal.notifications.internal.data.impl.NotificationRepository$createNotification$2.invokeSuspend
5  base.odex +0x609cdf kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith
6  base.odex +0x60d5eb kotlinx.coroutines.DispatchedTask.run
7  base.odex +0x547297 kotlinx.coroutines.internal.LimitedDispatcher$Worker.run
8  base.odex +0x60f7a1 kotlinx.coroutines.scheduling.TaskImpl.run
9  base.odex +0x552761 kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely
10 base.odex +0x54f399 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker
11 base.odex +0x5501a5 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run
12 libart.so +0xd3bd3  art_quick_invoke_stub_internal
13 libart.so +0x4eb409 art_quick_invoke_stub
14 libart.so +0x12bf2b art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)
15 libart.so +0x3f8c85 art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)
16 libart.so +0x3f8d95 art::JValue art::InvokeVirtualOrInterfaceWithJValues<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)
17 libart.so +0x439e93 art::Thread::CreateCallback(void*)
18 libc.so +0xaafd1    __pthread_start(void*)
19 libc.so +0x641c1    __start_thread

SIGSEGV: Segmentation violation (invalid memory reference)

0 base.odex +0x711a44 com.onesignal.notifications.internal.badges.impl.shortcutbadger.ShortcutBadger.applyCountOrThrow

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions