crash on first sync if you don't update your preferences

Bug #689473 reported by Olivier Bilodeau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tomdroid
Fix Released
Medium
Olivier Bilodeau

Bug Description

Tomdroid 0.4.1
Samsung Galaxy S Captivate

At first I was crashing tomdroid when hitting the sync button without setting preferences properly.

Then when I was logging with adb logcat, I couldn't get it to crash anymore but I was getting a "There was an error trying to parse your note collection. ..." instead.

Here's the stack trace:

W/System.err( 9576): java.lang.IllegalStateException: Target host must not be null, or set in parameters.
W/System.err( 9576): at org.apache.http.impl.client.DefaultRequestDirector.determineRoute(DefaultRequestDirector.java:561)
W/System.err( 9576): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:292)
W/System.err( 9576): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err( 9576): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err( 9576): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err( 9576): at org.tomdroid.sync.web.WebConnection.execute(WebConnection.java:122)
W/System.err( 9576): at org.tomdroid.sync.web.OAuthConnection.get(OAuthConnection.java:239)
W/System.err( 9576): at org.tomdroid.sync.web.SnowySyncService$3.run(SnowySyncService.java:153)
W/System.err( 9576): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
W/System.err( 9576): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
W/System.err( 9576): at java.lang.Thread.run(Thread.java:1096)
V/SyncService( 9576): sync progress: 30
E/SnowySyncService( 9576): Problem parsing the server response
E/SnowySyncService( 9576): org.json.JSONException: A JSONObject text must begin with '{' at character 0 of
E/SnowySyncService( 9576): at org.json.JSONTokener.syntaxError(JSONTokener.java:448)
E/SnowySyncService( 9576): at org.json.JSONObject.<init>(JSONObject.java:178)
E/SnowySyncService( 9576): at org.json.JSONObject.<init>(JSONObject.java:246)
E/SnowySyncService( 9576): at org.tomdroid.sync.web.SnowySyncService$3.run(SnowySyncService.java:155)
E/SnowySyncService( 9576): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
E/SnowySyncService( 9576): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
E/SnowySyncService( 9576): at java.lang.Thread.run(Thread.java:1096)

Revision history for this message
Olivier Bilodeau (plaxx) wrote :

I was able to reproduce first crash by uninstalling / reinstalling. Here's the stack trace:

D/ ( 9783): unable to unlink '/data/data/org.tomdroid/shared_prefs/org.tomdroid_preferences.xml.bak': No such file or directory (errno=2)

...

V/WindowManager( 2249): Dsptch > Window{48104a18 org.tomdroid/org.tomdroid.ui.Tomdroid paused=false}
...
V/WindowManager( 2249): Dsptch > Window{48104a18 org.tomdroid/org.tomdroid.ui.Tomdroid paused=false}

...

E/AndroidRuntime( 9783): java.lang.NullPointerException
E/AndroidRuntime( 9783): at org.tomdroid.sync.sd.SdCardSyncService.sync(SdCardSyncService.java:103)
E/AndroidRuntime( 9783): at org.tomdroid.sync.SyncService.startSynchronization(SyncService.java:75)
E/AndroidRuntime( 9783): at org.tomdroid.sync.SyncManager.startSynchronization(SyncManager.java:64)
E/AndroidRuntime( 9783): at org.tomdroid.ui.Actionbar$1.onClick(Actionbar.java:64)
E/AndroidRuntime( 9783): at android.view.View.performClick(View.java:2417)
E/AndroidRuntime( 9783): at android.view.View.onTouchEvent(View.java:4232)
E/AndroidRuntime( 9783): at android.view.View.dispatchTouchEvent(View.java:3762)
E/AndroidRuntime( 9783): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 9783): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 9783): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 9783): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 9783): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1713)
E/AndroidRuntime( 9783): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1131)
E/AndroidRuntime( 9783): at android.app.Activity.dispatchTouchEvent(Activity.java:2070)
E/AndroidRuntime( 9783): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1697)
E/AndroidRuntime( 9783): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
E/AndroidRuntime( 9783): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 9783): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 9783): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 9783): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9783): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 9783): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
E/AndroidRuntime( 9783): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
E/AndroidRuntime( 9783): at dalvik.system.NativeStart.main(Native Method)

Changed in tomdroid:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Olivier Bilodeau (plaxx) wrote :

I tried reproducing with trunk after the merge with the parsing-errors-reporting branch and I wasn't able to.

Considered fixed. Please re-open if you can reproduce.

Changed in tomdroid:
assignee: nobody → Olivier Bilodeau (plaxx)
milestone: none → 0.5.0
status: Confirmed → Fix Committed
Olivier Bilodeau (plaxx)
Changed in tomdroid:
status: Fix Committed → Fix Released
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.