iliyantn / websmsdroid

Automatically exported from code.google.com/p/websmsdroid
0 stars 0 forks source link

Crash when deleting single message #231

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open thread in SMSdroid
2. Delete single message (i chose the last one)
3. SMSdroid crashes

What version of the product are you using? On what operating system?
Most recent market version, downloaded 29-05-2010 on HTC Desire.

This is the error log:
05-29 15:26:26.102: VERBOSE/MmsProvider(142): Query uri=content://mms/, match=0
05-29 15:26:26.162: ERROR/SMSdroid(965): con: did not found conversation: 10
05-29 15:26:26.162: DEBUG/AndroidRuntime(965): Shutting down VM
05-29 15:26:26.162: WARN/dalvikvm(965): threadid=3: thread exiting with
uncaught exception (group=0x4001b390)
05-29 15:26:26.162: ERROR/AndroidRuntime(965): Uncaught handler: thread
main exiting due to uncaught exception
05-29 15:26:26.162: ERROR/AndroidRuntime(965): java.lang.NullPointerException
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
de.ub0r.android.smsdroid.SmsReceiver.updateNewMessageNotification(SmsReceiver.ja
va:280)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
de.ub0r.android.smsdroid.SMSdroid$2.onClick(SMSdroid.java:351)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertContro
ller.java:158)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
android.os.Handler.dispatchMessage(Handler.java:99)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
android.os.Looper.loop(Looper.java:123)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
android.app.ActivityThread.main(ActivityThread.java:4595)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
java.lang.reflect.Method.invokeNative(Native Method)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
java.lang.reflect.Method.invoke(Method.java:521)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-29 15:26:26.162: ERROR/AndroidRuntime(965):     at
dalvik.system.NativeStart.main(Native Method)

I don't have time to look into it myself right now, but i'll happily
provide any information you need.

Original issue reported on code.google.com by sca...@gmail.com on 29 May 2010 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by felix.bechstein on 30 May 2010 at 8:03

GoogleCodeExporter commented 9 years ago
please check the attached apk

Original comment by felix.bechstein on 1 Jun 2010 at 3:24

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately SMSdroid still crashes. I'll try and get another log later this 
afternoon.

Original comment by sca...@gmail.com on 2 Jun 2010 at 7:59

GoogleCodeExporter commented 9 years ago
this one should fix the bug.
please confirm

Original comment by felix.bechstein on 2 Jun 2010 at 3:21

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately, no. The app still crashes, right after I confirm the message 
deletion.
I already deleted the cache, does not fix the issue.

Anything I can provide you with?

Original comment by sca...@gmail.com on 2 Jun 2010 at 4:10

GoogleCodeExporter commented 9 years ago
yep. please send logs from that crash

Original comment by felix.bechstein on 2 Jun 2010 at 5:20

GoogleCodeExporter commented 9 years ago
I just ran this issue through a debugger, and the crash is in
SmsReceiver.updateNewMessageNotification().
Specifically in line 322:

n.flags |= Notification.FLAG_SHOW_LIGHTS;

At that moment, n == null, which is why it crashes. The attached patch fixes the
crash, although I suspect that there is some deeper issue here.

This is the execution flow:
- updateNew...(context, null)
- l = 1, tid = 10
- final Conversation conv = Conversation.getConversation(context, tid, true) 
returns null
- skips to i.setFlags(i.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
- crash

Also, after deleting a message, ConversationList still shows the deleted 
message text
(if the last message in a thread was deleted). Maybe this is an unrelated bug?

Original comment by sca...@gmail.com on 3 Jun 2010 at 10:07

Attachments:

GoogleCodeExporter commented 9 years ago
thx. i patched it a minute ago.

Original comment by felix.bechstein on 8 Jun 2010 at 6:13