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

[resources] Failed to decode 9-patch png image #1112

Closed
skylot opened this issue Jan 31, 2021 · 0 comments
Closed

[resources] Failed to decode 9-patch png image #1112

skylot opened this issue Jan 31, 2021 · 0 comments
Labels
bug Core Issues in jadx-core module resources

Comments

@skylot
Copy link
Owner

skylot commented Jan 31, 2021

Sometime files with 9-patch extension .9.png can be a normal .png images, but exception appear in log:

ERROR: Failed to decode 9-patch png image, path: res/drawable-xxxhdpi-v4/sign_in_background.9.png
jadx.core.utils.exceptions.JadxRuntimeException: 9patch image decode error
	at jadx.core.utils.android.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:59)
	at jadx.api.ResourcesLoader.decodeImage(ResourcesLoader.java:117)
	at jadx.api.ResourcesLoader.loadContent(ResourcesLoader.java:105)
	at jadx.api.ResourcesLoader.lambda$loadContent$0(ResourcesLoader.java:83)
	at jadx.api.ResourcesLoader.decodeStream(ResourcesLoader.java:72)
	at jadx.api.ResourcesLoader.loadContent(ResourcesLoader.java:83)
Caused by: jadx.core.utils.exceptions.JadxRuntimeException: Cant find nine patch chunk
	at jadx.core.utils.android.Res9patchStreamDecoder.find9patchChunk(Res9patchStreamDecoder.java:76)
	at jadx.core.utils.android.Res9patchStreamDecoder.getNinePatch(Res9patchStreamDecoder.java:65)
	at jadx.core.utils.android.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:43)
	... 18 common frames omitted
Caused by: java.io.EOFException: null
	at java.base/java.io.DataInputStream.readInt(DataInputStream.java:396)
	at jadx.core.utils.android.DataInputDelegate.readInt(DataInputDelegate.java:61)
	at jadx.core.utils.android.Res9patchStreamDecoder.find9patchChunk(Res9patchStreamDecoder.java:74)
	... 20 common frames omitted

Sample apk: com.microsoft.office.onenote.apk
This issue reported in #1111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module resources
Projects
None yet
Development

No branches or pull requests

1 participant