sanyaade-g2g-repos / posit-mobile

Automatically exported from code.google.com/p/posit-mobile
GNU Lesser General Public License v2.1
0 stars 0 forks source link

OutsideIn crashes on startup #272

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new instance of OutsideIn plugin
2. Create new POSITx account and turn on syncing
3. Press "View Finds" 

What is the expected output? What do you see instead?

You should be prompted to select a project. But instead the app crashes. See 
below for the Log trace.  Note that when the app is restarted, the crash does 
not recur.  This crash seems intermittent??

12-06 07:47:35.372: ERROR/AndroidRuntime(30919): FATAL EXCEPTION: main
12-06 07:47:35.372: ERROR/AndroidRuntime(30919): 
java.lang.IllegalStateException: calling this from your main thread can lead to 
deadlock
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.accounts.AccountManager.ensureNotOnMainThread(AccountManager.java:1141)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.accounts.AccountManager.access$200(AccountManager.java:138)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.accounts.AccountManager$AmsTask.internalGetResult(AccountManager.java:12
23)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:1260)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:1181)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.accounts.AccountManager.blockingGetAuthToken(AccountManager.java:737)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
org.hfoss.posit.android.experimental.sync.Communicator.getAuthKey(Communicator.j
ava:281)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
org.hfoss.posit.android.experimental.PositMain.onClick(PositMain.java:291)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.view.View.performClick(View.java:2485)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.view.View$PerformClick.run(View.java:9080)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.os.Handler.handleCallback(Handler.java:587)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.os.Handler.dispatchMessage(Handler.java:92)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.os.Looper.loop(Looper.java:130)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
android.app.ActivityThread.main(ActivityThread.java:3683)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
java.lang.reflect.Method.invokeNative(Native Method)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
java.lang.reflect.Method.invoke(Method.java:507)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-06 07:47:35.372: ERROR/AndroidRuntime(30919):     at 
dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by ram8...@gmail.com on 6 Dec 2011 at 12:53

GoogleCodeExporter commented 9 years ago
This also happens in Basic POSIT.  After restarting, the issue goes away.  I 
wonder if it can be that the Android account has not completely finished??

Original comment by ram8...@gmail.com on 6 Dec 2011 at 3:12

GoogleCodeExporter commented 9 years ago
This issue continues to come up intermittently and less often than not.  It 
seems to come up if you immediately go to Posit after turning syncing on in the 
Android settings.  Could it be that the account has not been completely set up 
yet -- i.e., a timing issue??

Original comment by ram8...@gmail.com on 10 Dec 2011 at 2:12

GoogleCodeExporter commented 9 years ago
Revision 460af46ed062 adds a catch clause to catch the IllegalStateException.  
This is not an optimal fix because it reports back that the user must create an 
account even though an account has been created.  

Keeping this issue open for now until a better fix can be found.

Original comment by ram8...@gmail.com on 10 Dec 2011 at 8:06

GoogleCodeExporter commented 9 years ago
This issue has been resolved.

Original comment by ram8...@gmail.com on 30 Dec 2011 at 2:34