Bug #1850
Crash when sharing file
Status: | Closed | Start date: | 09/11/2013 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | v13 - October Oooya | |||
Component: |
Description
Started with this intent:
09-10 20:00:43.742: I/ActivityManager(136): START {act=android.intent.action.SEND dat=content://info.guardianproject.bigbuffalo.secureshareprovider/item/136 typ=application/x-bigbuffalo-bundle flg=0x13400000 cmp=info.guardianproject.otr.app.im/.app.ImUrlActivity} from pid 11055
Here is the error:
09-10 20:00:43.800: E/AndroidRuntime(11055): FATAL EXCEPTION: main
09-10 20:00:43.800: E/AndroidRuntime(11055): java.lang.NullPointerException
09-10 20:00:43.800: E/AndroidRuntime(11055): at info.guardianproject.util.SystemServices.getFileInfoFromURI(SystemServices.java:116)
09-10 20:00:43.800: E/AndroidRuntime(11055): at info.guardianproject.otr.app.im.app.ImUrlActivity.openOtrInBand(ImUrlActivity.java:484)
09-10 20:00:43.800: E/AndroidRuntime(11055): at info.guardianproject.otr.app.im.app.ImUrlActivity.doOnCreate(ImUrlActivity.java:605)
09-10 20:00:43.800: E/AndroidRuntime(11055): at info.guardianproject.otr.app.im.app.ImUrlActivity.access$200(ImUrlActivity.java:56)
09-10 20:00:43.800: E/AndroidRuntime(11055): at info.guardianproject.otr.app.im.app.ImUrlActivity$5.handleMessage(ImUrlActivity.java:455)
09-10 20:00:43.800: E/AndroidRuntime(11055): at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 20:00:43.800: E/AndroidRuntime(11055): at android.os.Looper.loop(Looper.java:137)
09-10 20:00:43.800: E/AndroidRuntime(11055): at android.app.ActivityThread.main(ActivityThread.java:4424)
09-10 20:00:43.800: E/AndroidRuntime(11055): at java.lang.reflect.Method.invokeNative(Native Method)
09-10 20:00:43.800: E/AndroidRuntime(11055): at java.lang.reflect.Method.invoke(Method.java:511)
09-10 20:00:43.800: E/AndroidRuntime(11055): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
09-10 20:00:43.800: E/AndroidRuntime(11055): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
09-10 20:00:43.800: E/AndroidRuntime(11055): at dalvik.system.NativeStart.main(Native Method)
I was expecting that Gibberbot would open an input stream rather than query the content provider and treat it as a file.
InputStream instream = getContentResolver().openInputStream(uri);
History
#1 Updated by vanevery over 4 years ago
Actually, it seems that this probably isn't a crucial call and you can test for moveToFirst() and return null if not.
#2 Updated by devrandom over 4 years ago
We do need to know the file size later on, so have to be able to stat the file. Do you know why the content resolver is failing?
#3 Updated by vanevery over 4 years ago
The file is stored in a secure storage and not available on the file system as a regular file that you can access.
#4 Updated by vanevery over 4 years ago
The content provider only implements opening the input stream. None of the query methods are implemented and will return null.
#5 Updated by devrandom over 4 years ago
I can change the CS code to deal with the stream, but will need seeking. Can your side provide that? Also, we definitely need the size and mime type to be able to chunk the file and dispatch the result on the receiving side.
How do you want to handle these (seeking, chunking, mime type)? Is that something that the content provider can be upgraded to handle?
#6 Updated by vanevery over 4 years ago
I'll supply a file:// content provider for now.
#7 Updated by n8fr8 over 4 years ago
- Target version set to v12 - March Mantra
#8 Updated by n8fr8 over 4 years ago
- Status changed from New to Resolved
I think this is resolved, but will verify with Paik latest and next build of CS before closing.
#9 Updated by n8fr8 about 4 years ago
- Target version changed from v12 - March Mantra to v13 - October Oooya
#10 Updated by n8fr8 over 2 years ago
- Status changed from Resolved to Closed