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

Samsung 5.X annotations crash #208

Closed
AAverin opened this issue Jan 11, 2019 · 1 comment
Closed

Samsung 5.X annotations crash #208

AAverin opened this issue Jan 11, 2019 · 1 comment

Comments

@AAverin
Copy link

AAverin commented Jan 11, 2019

We have a few stacktraces from Samsung 5.X devices that crash on attempt to read class annotations.
It's a known issue of Samsung firmwares (https://issuetracker.google.com/issues/37045084) and I know it's not Jackson issue.
Still, for some reason it wasn't present with GSON (or at least we didn't see it), and jackson-kotlin-module could, probably, have a graceful fallback for these crashes, fixing the problem for thousands of our users.

Here is another related thread from Stackoverflow: https://stackoverflow.com/questions/29619052/how-to-fix-incompatibleclasschangeerror-during-android-jackson-parsing-using-ann/30355502#30355502

Here are some traces:

Caused by java.lang.IncompatibleClassChangeError: Couldn't find kotlin.Metadata.bv
       at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
       at libcore.reflect.AnnotationAccess.annotationSetToAnnotations(AnnotationAccess.java:633)
       at libcore.reflect.AnnotationAccess.getDeclaredAnnotations(AnnotationAccess.java:161)
       at java.lang.Class.getDeclaredAnnotations(Class.java:891)
       at com.fasterxml.jackson.module.kotlin.KotlinModuleKt.isKotlinClass(SourceFile:29)

and

Caused by java.lang.IncompatibleClassChangeError: Couldn't find kotlin.Metadata.k
       at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
       at libcore.reflect.AnnotationAccess.annotationSetToAnnotations(AnnotationAccess.java:633)
       at libcore.reflect.AnnotationAccess.getDeclaredAnnotations(AnnotationAccess.java:161)
       at java.lang.Class.getDeclaredAnnotations(Class.java:891)
       at com.fasterxml.jackson.databind.util.ClassUtil.findClassAnnotations(SourceFile:1072)

Any chance this exception could be caught by jackson with some graceful fallback provided? For example, class could be handled as if it doesn't have any annotations on it.

Thanks

@k163377
Copy link
Contributor

k163377 commented Feb 17, 2023

Issues last updated before 2020 are closed.
If the problem is reproduced in the latest version, please reopen.

@k163377 k163377 closed this as completed Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants