Opened 3 years ago

Last modified 22 months ago

#1730 new defect

I2P-Bote Android: FC when adding attachment

Reported by: dllud Owned by: str4d
Priority: major Milestone: undecided
Component: apps/android Version: 0.9.23
Keywords: I2P-Bote, Android, FC, attachment, bug Cc:
Parent Tickets:

Description

I get a Force Close when selecting a file to attach with either Cyanogenmod File Manager or Androidterm's Find command.
Strangely, everything works when using the Gallery.
I'm running Replicant 4.2 (CyanogenMod? 10.1.3).

Here follows logcat's output.

With Cyanogenmod File Manager

I/ActivityManager( 2824): Displayed android/com.android.internal.app.ChooserActivity: +184ms
I/ActivityManager( 2824): START u0 {act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=*/* flg=0x3000000 cmp=com.cyanogenmod.filemanager/.activities.PickerActivity} from pid 7772
D/PickerActivity( 7803): PickerActivity: got file pick intent: Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=*/* flg=0x3000000 cmp=com.cyanogenmod.filemanager/.activities.PickerActivity }
D/PickerActivity( 7803): PickerActivity. extras: null
I/ActivityManager( 2824): Displayed com.cyanogenmod.filemanager/.activities.PickerActivity: +472ms
D/AndroidRuntime( 7772): Shutting down VM
W/dalvikvm( 7772): threadid=1: thread exiting with uncaught exception (group=0x40ba3930)
E/AndroidRuntime( 7772): FATAL EXCEPTION: I2PBoteMain
E/AndroidRuntime( 7772): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65537, result=-1, data=Intent { dat=file:///storage/sdcard0/ranmac/ask.sh }} to activity {i2p.bote.android/i2p.bote.android.NewEmailActivity}: java.lang.NullPointerException
E/AndroidRuntime( 7772): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:3447)
E/AndroidRuntime( 7772): 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3490)
E/AndroidRuntime( 7772): 	at android.app.ActivityThread.access$1100(ActivityThread.java:153)
E/AndroidRuntime( 7772): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1295)
E/AndroidRuntime( 7772): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 7772): 	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 7772): 	at android.app.ActivityThread.main(ActivityThread.java:5227)
E/AndroidRuntime( 7772): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 7772): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 7772): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 7772): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
E/AndroidRuntime( 7772): 	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 7772): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 7772): 	at i2p.bote.android.util.ContentAttachment.<init>(ContentAttachment.java:37)
E/AndroidRuntime( 7772): 	at i2p.bote.android.NewEmailFragment.addAttachment(NewEmailFragment.java:461)
E/AndroidRuntime( 7772): 	at i2p.bote.android.NewEmailFragment.onActivityResult(NewEmailFragment.java:446)
E/AndroidRuntime( 7772): 	at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:165)
E/AndroidRuntime( 7772): 	at android.app.Activity.dispatchActivityResult(Activity.java:5293)
E/AndroidRuntime( 7772): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:3443)
E/AndroidRuntime( 7772): 	... 11 more
W/ActivityManager( 2824):   Force finishing activity i2p.bote.android/.NewEmailActivity
W/ActivityManager( 2824): Activity pause timeout for ActivityRecord{40f96698 u0 i2p.bote.android/.NewEmailActivity}
W/ActivityManager( 2824): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 2824): Activity idle timeout for ActivityRecord{40f96698 u0 i2p.bote.android/.NewEmailActivity}
W/ActivityManager( 2824): Activity idle timeout for ActivityRecord{4158c680 u0 i2p.bote.android/.EmailListActivity}
E/InputManager-JNI( 2824): An exception was thrown by callback 'interceptKeyBeforeQueueing'.
E/InputManager-JNI( 2824): java.lang.NullPointerException
E/InputManager-JNI( 2824): 	at com.android.internal.policy.impl.PhoneWindowManager.interceptKeyBeforeQueueing(PhoneWindowManager.java:4082)
E/InputManager-JNI( 2824): 	at com.android.server.wm.InputMonitor.interceptKeyBeforeQueueing(InputMonitor.java:337)
E/InputManager-JNI( 2824): 	at com.android.server.input.InputManagerService.interceptKeyBeforeQueueing(InputManagerService.java:1418)
E/InputManager-JNI( 2824): 	at dalvik.system.NativeStart.run(Native Method)
E/InputManager-JNI( 2824): An exception was thrown by callback 'interceptKeyBeforeQueueing'.
E/InputManager-JNI( 2824): java.lang.NullPointerException
E/InputManager-JNI( 2824): 	at com.android.internal.policy.impl.PhoneWindowManager.interceptKeyBeforeQueueing(PhoneWindowManager.java:4082)
E/InputManager-JNI( 2824): 	at com.android.server.wm.InputMonitor.interceptKeyBeforeQueueing(InputMonitor.java:337)
E/InputManager-JNI( 2824): 	at com.android.server.input.InputManagerService.interceptKeyBeforeQueueing(InputManagerService.java:1418)
E/InputManager-JNI( 2824): 	at dalvik.system.NativeStart.run(Native Method)
I/Process ( 7772): Sending signal. PID: 7772 SIG: 9
I/ActivityManager( 2824): Process i2p.bote.android (pid 7772) has died.

With Androidterm's Find command

I/ActivityManager( 2824): Displayed jackpal.androidterm/.shortcuts.FSNavigator: +586ms
D/AndroidRuntime( 8261): Shutting down VM
W/dalvikvm( 8261): threadid=1: thread exiting with uncaught exception (group=0x40ba3930)
E/AndroidRuntime( 8261): FATAL EXCEPTION: I2PBoteMain
E/AndroidRuntime( 8261): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65537, result=-1, data=Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] dat=file:///storage/sdcard0/ranmac/ask.sh flg=0x3000000 cmp=jackpal.androidterm/.shortcuts.FSNavigator }} to activity {i2p.bote.android/i2p.bote.android.NewEmailActivity}: java.lang.NullPointerException
E/AndroidRuntime( 8261): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:3447)
E/AndroidRuntime( 8261): 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3490)
E/AndroidRuntime( 8261): 	at android.app.ActivityThread.access$1100(ActivityThread.java:153)
E/AndroidRuntime( 8261): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1295)
E/AndroidRuntime( 8261): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8261): 	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 8261): 	at android.app.ActivityThread.main(ActivityThread.java:5227)
E/AndroidRuntime( 8261): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8261): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 8261): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 8261): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
E/AndroidRuntime( 8261): 	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 8261): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 8261): 	at i2p.bote.android.util.ContentAttachment.<init>(ContentAttachment.java:37)
E/AndroidRuntime( 8261): 	at i2p.bote.android.NewEmailFragment.addAttachment(NewEmailFragment.java:461)
E/AndroidRuntime( 8261): 	at i2p.bote.android.NewEmailFragment.onActivityResult(NewEmailFragment.java:446)
E/AndroidRuntime( 8261): 	at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:165)
E/AndroidRuntime( 8261): 	at android.app.Activity.dispatchActivityResult(Activity.java:5293)
E/AndroidRuntime( 8261): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:3443)
E/AndroidRuntime( 8261): 	... 11 more
W/ActivityManager( 2824):   Force finishing activity i2p.bote.android/.NewEmailActivity
W/ActivityManager( 2824): Activity pause timeout for ActivityRecord{4107f9b0 u0 i2p.bote.android/.NewEmailActivity}
I/Process ( 8261): Sending signal. PID: 8261 SIG: 9
I/WindowState( 2824): WIN DEATH: Window{40e463f8 u0 i2p.bote.android/i2p.bote.android.NewEmailActivity}
I/ActivityManager( 2824): Process i2p.bote.android (pid 8261) has died.
I/WindowState( 2824): WIN DEATH: Window{40ea6070 u0 i2p.bote.android/i2p.bote.android.EmailListActivity}
I/ActivityManager( 2824): Start proc i2p.bote.android for activity i2p.bote.android/.EmailListActivity: pid=8354 uid=10089 gids={50089, 3003, 1015, 1028}
W/Trace   ( 8354): error opening trace file: No such file or directory (2)
I/dalvikvm( 8354): Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
W/dalvikvm( 8354): VFY: unable to resolve virtual method 641: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
D/dalvikvm( 8354): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm( 8354): Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType

Subtickets (add)

Change History (2)

comment:1 Changed 2 years ago by str4d

NPE fixed in f5a0967f0cb598d90ee080a0a2b0bb7cfb66e3dd. But that is masking some other problem where the attachment is not being successfully fetched from the ContentResolver. Needs more testing.

comment:2 Changed 22 months ago by str4d

Migrated to https://github.com/i2p/i2p.i2p-bote/issues - I will close these tickets as things are resolved rather than right now, but please make future comments on GitHub?.

Note: See TracTickets for help on using tickets.