Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

A NullPointerException bug #9

Open
tingsu opened this issue Apr 13, 2016 · 1 comment
Open

A NullPointerException bug #9

tingsu opened this issue Apr 13, 2016 · 1 comment

Comments

@tingsu
Copy link

tingsu commented Apr 13, 2016

Hi, thanks for developing this useful app. We recently tested this app by an automated Android GUI testing tool developed by our research team. We found the app could run into a "NullPointerException" error after executing the following actions:

start the app -> press "menu" key -> choose the "open" menu item -> delete the original file name "/sdcard/" in the EditText on the appearing dialog titled with "Open File" -> fill in "test" in the EditText -> click "open" -> click "continue" button on the appearing dialog titled with "test not found" -> the app crashed

Here is the log:

W/dalvikvm( 1076): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
E/AndroidRuntime( 1076): FATAL EXCEPTION: main
E/AndroidRuntime( 1076): java.lang.NullPointerException
E/AndroidRuntime( 1076): at org.paulmach.textedit.pmTextEdit.onPrepareDialog(pmTextEdit.java:951)
E/AndroidRuntime( 1076): at android.app.Activity.onPrepareDialog(Activity.java:2988)
E/AndroidRuntime( 1076): at android.app.Activity.showDialog(Activity.java:3051)
E/AndroidRuntime( 1076): at android.app.Activity.showDialog(Activity.java:3002)
E/AndroidRuntime( 1076): at org.paulmach.textedit.pmTextEdit$15.onClick(pmTextEdit.java:1329)
E/AndroidRuntime( 1076): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
E/AndroidRuntime( 1076): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1076): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1076): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime( 1076): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1076): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1076): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime( 1076): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 1076): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 150): Force finishing activity org.paulmach.textedit/.pmTextEdit

We carefully inspected the source code, and found the root cause lies in the following code (in "pmTextEdit.java" file)
screen shot 2016-04-13 at 7 56 45 pm

Could you please take a look and confirm this bug? Thanks!
Ting Su

@tingsu
Copy link
Author

tingsu commented Apr 27, 2016

Some updates: we have sent an email to the app author, and the bug has been confirmed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant