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

Something is off with WEBP_LOSSLESS support #8

Closed
hamen opened this issue May 20, 2021 · 2 comments
Closed

Something is off with WEBP_LOSSLESS support #8

hamen opened this issue May 20, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@hamen
Copy link
Collaborator

hamen commented May 20, 2021

Describe the bug
App crashing after giving access to notifications

To Reproduce
Steps to reproduce the behavior:

  1. Give permissions
  2. Go back to the app

Expected behavior
I would expect to reach the main screen.

Screenshots
N.A.

Smartphone (please complete the following information):

  • Device: S9
  • OS: Android 10

Additional context

java.lang.NoSuchFieldError: No static field WEBP_LOSSLESS of type Landroid/graphics/Bitmap$CompressFormat; in class Landroid/graphics/Bitmap$CompressFormat; or its superclasses (declaration of 'android.graphics.Bitmap$CompressFormat' appears in /system/framework/framework.jar)
        at dev.sebastiano.bundel.storage.DiskImagesStorage$ImageFormat.<clinit>(DiskImagesStorage.kt:109)
        at dev.sebastiano.bundel.storage.DiskImagesStorage.getCachedImageFormat(DiskImagesStorage.kt:99)
        at dev.sebastiano.bundel.storage.DiskImagesStorage.getIconFile(DiskImagesStorage.kt:59)
        at dev.sebastiano.bundel.storage.DiskImagesStorage.saveIcon(DiskImagesStorage.kt:37)
        at dev.sebastiano.bundel.storage.DiskImagesStorage.saveIconsFrom(DiskImagesStorage.kt:24)
        at dev.sebastiano.bundel.storage.RobertoRepository.saveNotification(RobertoRepository.kt:15)
        at dev.sebastiano.bundel.storage.RobertoRepository$saveNotification$1.invokeSuspend(Unknown Source:15)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
        at dev.sebastiano.bundel.notifications.BundelNotificationListenerService.onListenerConnected(BundelNotificationListenerService.kt:30)
        at android.service.notification.NotificationListenerService$MyHandler.handleMessage(NotificationListenerService.java:2076)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:8167)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
@hamen hamen added the bug Something isn't working label May 20, 2021
@rock3r
Copy link
Member

rock3r commented May 20, 2021

The issue is likely that the classloader loads the field because it's defined eagerly as part of the enum declaration. We should either use reflection (it's a small, one-off cost) or move the value into a function that loads it lazily as needed.

@rock3r rock3r self-assigned this Dec 30, 2021
@rock3r
Copy link
Member

rock3r commented Dec 30, 2021

Fixed on 24/12

@rock3r rock3r closed this as completed Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants