I use this library on one of my Android apps, with this dependency:
implementation("com.j256.simplemagic:simplemagic:1.17")
I recently got a crash that I'm not sure what causes it.
The code that it crashes on is very simple, which works fine on my case, and it crashes right on the CTOR usage:
val util = ContentInfoUtil()
...
The relevant stacktrace:
Fatal Exception: java.lang.ExceptionInInitializerError:
at com.j256.simplemagic.logger.LoggerFactory.findLogBackendFactory(LoggerFactory.java:108)
at com.j256.simplemagic.logger.LoggerFactory.getLogger(LoggerFactory.java:43)
at com.j256.simplemagic.logger.LoggerFactory.getLogger(LoggerFactory.java:35)
at com.j256.simplemagic.entries.MagicEntries.<clinit>(MagicEntries.java:22)
at com.j256.simplemagic.ContentInfoUtil.readEntries(ContentInfoUtil.java:380)
at com.j256.simplemagic.ContentInfoUtil.readEntriesFromResource(ContentInfoUtil.java:372)
at com.j256.simplemagic.ContentInfoUtil.<init>(ContentInfoUtil.java:80)
at com.j256.simplemagic.ContentInfoUtil.<init>(ContentInfoUtil.java:65)
...
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Package.getName()' on a null object reference
at com.j256.simplemagic.logger.LogBackendType.<init>(LogBackendType.java:69)
at com.j256.simplemagic.logger.LogBackendType.<clinit>(LogBackendType.java:19)
at com.j256.simplemagic.logger.LoggerFactory.findLogBackendFactory(LoggerFactory.java:108)
at com.j256.simplemagic.logger.LoggerFactory.getLogger(LoggerFactory.java:43)
at com.j256.simplemagic.logger.LoggerFactory.getLogger(LoggerFactory.java:35)
at com.j256.simplemagic.entries.MagicEntries.<clinit>(MagicEntries.java:22)
at com.j256.simplemagic.ContentInfoUtil.readEntries(ContentInfoUtil.java:380)
at com.j256.simplemagic.ContentInfoUtil.readEntriesFromResource(ContentInfoUtil.java:372)
at com.j256.simplemagic.ContentInfoUtil.<init>(ContentInfoUtil.java:80)
at com.j256.simplemagic.ContentInfoUtil.<init>(ContentInfoUtil.java:65)
...
It doesn't seem like the app was modified, but it's just one crash for a single user. Then again, I wouldn't call the app popular, and reaching this part of the app might be rare.
I use this library on one of my Android apps, with this dependency:
I recently got a crash that I'm not sure what causes it.
The code that it crashes on is very simple, which works fine on my case, and it crashes right on the CTOR usage:
The relevant stacktrace:
It doesn't seem like the app was modified, but it's just one crash for a single user. Then again, I wouldn't call the app popular, and reaching this part of the app might be rare.