Import Note -> Conflict Dialoug due to deleted or differences -> click Overwrite Local or Create Copy -> CRASH!

Bug #1153214 reported by Stefan Hammer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tomdroid
Fix Released
Critical
Unassigned
Beta
Fix Released
Critical
Unassigned

Bug Description

Something with addpullable in notemanager is wrong. no idea what it is! It probably has something to do with the remote Note which isn't in the database yet.

03-10 13:37:40.277: V/ReceiveActivity(25674): Receiving note of type
03-10 13:37:40.277: D/ReceiveActivity(25674): Action type: android.intent.action.VIEW
03-10 13:37:40.277: D/ReceiveActivity(25674): Receiving file from path: /sdcard/Download/466eef46-5fa1-4c87-8637-2544c591ae33.note
03-10 13:37:40.277: D/ReceiveActivity(25674): parsing note
03-10 13:37:40.287: V/ReceiveActivity(25674): note conflict... showing resolution dialog TITLE:Hü Lektion 7 GUID:466eef46-5fa1-4c87-8637-2544c591ae33
03-10 13:37:40.307: V/SyncDialog(25674): starting CompareNotes
03-10 13:37:40.337: V/SyncDialog(25674): comparing two versions of the same note
03-10 13:37:40.337: V/SyncDialog(25674): compared notes have different content
03-10 13:37:40.607: D/dalvikvm(25674): GC_CONCURRENT freed 273K, 28% free 8216K/11272K, paused 2ms+3ms, total 37ms
03-10 13:37:48.407: V/SyncDialog(25674): user chose remote version for note TITLE:Hü Lektion 7 GUID:466eef46-5fa1-4c87-8637-2544c591ae33
03-10 13:37:48.407: D/AndroidRuntime(25674): Shutting down VM
03-10 13:37:48.407: W/dalvikvm(25674): threadid=1: thread exiting with uncaught exception (group=0x40d0b930)
03-10 13:37:48.407: E/AndroidRuntime(25674): FATAL EXCEPTION: main
03-10 13:37:48.407: E/AndroidRuntime(25674): java.lang.NullPointerException
03-10 13:37:48.407: E/AndroidRuntime(25674): at org.tomdroid.sync.SyncService.addPullable(SyncService.java:588)
03-10 13:37:48.407: E/AndroidRuntime(25674): at org.tomdroid.ui.CompareNotes.pullNote(CompareNotes.java:445)
03-10 13:37:48.407: E/AndroidRuntime(25674): at org.tomdroid.ui.CompareNotes.onChooseNote(CompareNotes.java:427)
03-10 13:37:48.407: E/AndroidRuntime(25674): at org.tomdroid.ui.CompareNotes$4.onClick(CompareNotes.java:311)
03-10 13:37:48.407: E/AndroidRuntime(25674): at android.view.View.performClick(View.java:4204)
03-10 13:37:48.407: E/AndroidRuntime(25674): at android.view.View$PerformClick.run(View.java:17355)
03-10 13:37:48.407: E/AndroidRuntime(25674): at android.os.Handler.handleCallback(Handler.java:725)
03-10 13:37:48.407: E/AndroidRuntime(25674): at android.os.Handler.dispatchMessage(Handler.java:92)
03-10 13:37:48.407: E/AndroidRuntime(25674): at android.os.Looper.loop(Looper.java:137)
03-10 13:37:48.407: E/AndroidRuntime(25674): at android.app.ActivityThread.main(ActivityThread.java:5041)
03-10 13:37:48.407: E/AndroidRuntime(25674): at java.lang.reflect.Method.invokeNative(Native Method)
03-10 13:37:48.407: E/AndroidRuntime(25674): at java.lang.reflect.Method.invoke(Method.java:511)
03-10 13:37:48.407: E/AndroidRuntime(25674): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-10 13:37:48.407: E/AndroidRuntime(25674): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-10 13:37:48.407: E/AndroidRuntime(25674): at dalvik.system.NativeStart.main(Native Method)

Tags: ui crash
Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Google Play report:

java.lang.NullPointerException
at org.tomdroid.sync.SyncService.addPullable(SyncService.java:586)
at org.tomdroid.ui.CompareNotes.pullNote(CompareNotes.java:445)
at org.tomdroid.ui.CompareNotes.onChooseNote(CompareNotes.java:427)
at org.tomdroid.ui.CompareNotes$4.onClick(CompareNotes.java:311)
at android.view.View.performClick(View.java:2506)
at android.view.View$PerformClick.run(View.java:9112)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

CompareNotes tried to add the note to a SyncService array. however syncservice is not used when importing a note file via the Receive.java class.

therefore I changed the pullNote function and others to following:
private void pullNote(Note note) {
  if (noRemote) {
   note.setLastChangeDate();
   NoteManager.putNote(this, note);
  } else {
   SyncManager.getInstance().getCurrentService().addPullable(note);
  }
 }

This bug should be fixed with revisoin 510!

Changed in tomdroid:
status: Fix Committed → Fix Released
Revision history for this message
Tobias-kaminsky (tobias-kaminsky) wrote :

                                                            Process: org.tomdroid, PID: 7403
                                                            java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference
                                                                at org.tomdroid.sync.SyncService.addPullable(SyncService.java:589)
                                                                at org.tomdroid.ui.CompareNotes.pullNote(CompareNotes.java:494)
                                                                at org.tomdroid.ui.CompareNotes.onChooseNote(CompareNotes.java:461)
                                                                at org.tomdroid.ui.CompareNotes$4.onClick(CompareNotes.java:327)
                                                                at android.view.View.performClick(View.java:5198)
                                                                at android.view.View$PerformClick.run(View.java:21150)
                                                                at android.os.Handler.handleCallback(Handler.java:739)
                                                                at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                at android.os.Looper.loop(Looper.java:148)
                                                                at android.app.ActivityThread.main(ActivityThread.java:5466)
                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

I have this one again...?
At least it seems to be very close?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.