Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A unique bug in PadLIstActivity #67

Closed
nibienaohehe opened this issue Apr 18, 2022 · 1 comment
Closed

A unique bug in PadLIstActivity #67

nibienaohehe opened this issue Apr 18, 2022 · 1 comment

Comments

@nibienaohehe
Copy link

Hello, I noticed a unique crash in the latest version when I launch the exported activity PadListActivity. The following commands are used to reproduce the crash:

Intent intent = new Intent();
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ComponentName cn=new ComponentName("com.mikifus.padland","com.mikifus.padland.PadListActivity");
intent.setComponent(cn);
Bundle ExtrasObj = new Bundle();
ArrayList pad_id_list = new ArrayList();
pad_id_list.add("adf");
ExtrasObj.putStringArrayList("pad_id", pad_id_list);
intent.putExtra("action", "delete");
intent.putExtras(ExtrasObj);
startActivity(intent);

The exception trace is:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mikifus.padland/com.mikifus.padland.PadListActivity}: java.lang.NumberFormatException: For input string: "asdfa"
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3782)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3961)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: java.lang.NumberFormatException: For input string: "asdfa"
at java.lang.Long.parseLong(Long.java:594)
at java.lang.Long.parseLong(Long.java:636)
at com.mikifus.padland.PadListActivity.i(SourceFile:8)
at com.mikifus.padland.PadListActivity.onCreate(SourceFile:2)
at android.app.Activity.performCreate(Activity.java:8086)
at android.app.Activity.performCreate(Activity.java:8074)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3755)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3961) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loop(Looper.java:213) 
at android.app.ActivityThread.main(ActivityThread.java:8178) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
 

The statement triggering this issue is:

boolean result = padlistDb.deletePad(Long.parseLong(pad_id_list.get(i)));

where pad_id_list.get(i) returns an unchecked string.

@mikifus
Copy link
Owner

mikifus commented Apr 21, 2022

Closing as it is not a bug.

@mikifus mikifus closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants