KB-20071202-022
From Triled Wiki
- Status: opened
- author: baldmountin
- link: http://groups.google.com/group/android-developers/msg/aea2283b6c950158
- Description: java.util.zip generates some CRC errors on valid zip files and returns invalid characters.
- Steps to reproduce:
For some files CRC is calculated incorrectly.
e.g. for files with such symbols (which marks it as UTF-8 encoded file):
ï>>¿<html xmlns="http://www.w3.org/1999/xhtml">
Additionaly, GC occurs and null pointer exception throwed on the finalizer for SQLiteDatabase.
I/dalvikvm-heap( 539): GC!
I/dalvikvm-gc( 539): freed 4967 objects / 968420 bytes
I/dalvikvm-heap( 539): Current GC heap utilization 594/1000(1.487MB / 2.502MB)
I/dalvikvm-heap( 539): Grow GC heap from 2.502MB to 2.975MB
D/dalvikvm( 539): Exception java/lang/NullPointerException from SQLiteDirectCursorDriver.java:87 not caught locally
I/dalvikvm( 539): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 539): java/lang/NullPointerException:
I/dalvikvm( 539): at android.database.sqlite.SQLiteDirectCursorDriver.close(SQLiteDirectCursorDriver.java:87)
I/dalvikvm( 539): at android.database.sqlite.SQLiteDatabase.close(SQLiteDatabase.java:241)
I/dalvikvm( 539): at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java:901)
I/dalvikvm( 539): at android.dalvik.NativeStart.run(Native Method)
I/MyApp ( 539): ï>>¿<html xmlns="http://www.w3.org/1999/xhtml">
[edit] Temporarily solution
Use the TrueZip instead of java.util.zip.
[edit] See also
- similar report with IOException while reading from zip stream.
