Crash: NPE in LocalStore.getRawAttachmentInputStream()
See original GitHub issueVia Play Developer Console Version: 5.200 or 5.201
java.lang.NullPointerException: Attempt to get length of null array
at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:60)
at com.fsck.k9.mailstore.LocalStore.getRawAttachmentInputStream(LocalStore.java:873)
at com.fsck.k9.mailstore.LocalStore.writeSimplePartToOutputStream(LocalStore.java:857)
at com.fsck.k9.mailstore.LocalStore.writeCursorPartsToOutputStream(LocalStore.java:746)
at com.fsck.k9.mailstore.LocalStore.access$300(LocalStore.java:78)
at com.fsck.k9.mailstore.LocalStore$16.doDbWork(LocalStore.java:722)
at com.fsck.k9.mailstore.LocalStore$16.doDbWork(LocalStore.java:714)
at com.fsck.k9.mailstore.LockableDatabase.execute(LockableDatabase.java:275)
at com.fsck.k9.mailstore.LocalStore.writeAttachmentDataToOutputStream(LocalStore.java:714)
at com.fsck.k9.mailstore.LocalStore.access$100(LocalStore.java:78)
at com.fsck.k9.mailstore.LocalStore$15.writeTo(LocalStore.java:706)
at org.openintents.openpgp.util.ParcelFileDescriptorUtil$DataSourceTransferThread.run(ParcelFileDescriptorUtil.java:118)
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Crash: NPE in LocalStore.getRawAttachmentInputStream ...
Via Play Developer Console Version: 5.200 or 5.201 java.lang.NullPointerException: Attempt to get length of null array at java.io.
Read more >Android app crashes opening InputStream from an XML
I made a SAX parser that accepts an InputStream as file to parse. If I use a local file it works, but if...
Read more >Bug List - Bugs - Eclipse
Valenta, RESO, INVA, 'add' refreshes too much from local, 2002-03-20 ... dj.houghton, RESO, INVA, [UI] Workspace in odd state after crash while loading....
Read more >New Feature - Release Notes - Java Bug System
entrySet().spliterator() reports SORTED + null comparator but the elements are not Comparable; [JDK-8020016] - Numerous splitereator impls do not throw NPE ...
Read more >Browse Android-security Answers - Code Matcher
Migrating local storage from Cordova app to Android App ... InputStream returning NullPointerException (Java) · Android 2.2 SSL Bug with client certificate?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like we use
DataLocation.IN_DATABASE
for multiparts rather thanDataLocation.CHILD_PART_CONTAINS_DATA
. See https://github.com/k9mail/k-9/blob/de60e0e8c4105af957db647898511a584ac5e6aa/k9mail/src/main/java/com/fsck/k9/mailstore/LocalFolder.java#L1441I agree. I don’t think there is currently any code that relies on this, and we can also do a migration that does
if (mimeType == multipart/* && dataLocation == IN_DATABASE) dataLocation = CHILD_PART_CONTAINS_DATA