roshangit8 / socialauth-android

Automatically exported from code.google.com/p/socialauth-android
0 stars 0 forks source link

Crash when attempting to open the dialog while the activity is finishing #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Cause the activity to start finishing
2. Attempt to open a dialog

What is the expected output? What do you see instead?
The dialog should show or be disallowed gracefully but the following crash 
occurs

android.view.WindowManager$BadTokenException: Unable to add window -- token 
android.os.BinderProxy@41a73408 is not valid; is your activity running?
 at android.view.ViewRootImpl.setView(ViewRootImpl.java:685)
 at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:301)
 at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:215)
 at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:140)
 at android.view.Window$LocalWindowManager.addView(Window.java:537)
 at android.app.Dialog.show(Dialog.java:278)
 at org.brickred.socialauth.android.SocialAuthDialog$SocialAuthWebViewClient.onPageStarted(SocialAuthDialog.java:286)
 at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:309)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:137)
 at android.app.ActivityThread.main(ActivityThread.java:4517)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:511)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
 at dalvik.system.NativeStart.main(Native Method)

What version of the product are you using? On what operating system?
The latest public build; not the SVN.

Please provide any additional information below.
When a dialog is being opened first check the activity context is not being 
closed by calling isFinishing() on it. Don't open the dialog if this returns 
true.

Original issue reported on code.google.com by sordeode...@gmail.com on 26 Jan 2013 at 2:13

GoogleCodeExporter commented 9 years ago
Thanks we will check this issue.

Original comment by vineet.a...@3pillarglobal.com on 27 Jan 2013 at 7:07

GoogleCodeExporter commented 9 years ago
Hi , We are still not able to reproduce the issue.

What i understand your activity is not finishing properly. Can you please test 
your case with any of the examples given in sdk.

Original comment by vineet.a...@3pillarglobal.com on 29 Jan 2013 at 10:05

GoogleCodeExporter commented 9 years ago

Original comment by vineet.a...@3pillarglobal.com on 30 Jan 2013 at 7:19

GoogleCodeExporter commented 9 years ago
I've been able to reproduce it in your share button demo. I got the following 
error log:

02-08 21:04:06.545: E/AndroidRuntime(15488): FATAL EXCEPTION: main
02-08 21:04:06.545: E/AndroidRuntime(15488): 
android.view.WindowManager$BadTokenException: Unable to add window -- token 
android.os.BinderProxy@41642c70 is not valid; is your activity running?
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.view.ViewRootImpl.setView(ViewRootImpl.java:689)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:301)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:215)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:
140)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.view.Window$LocalWindowManager.addView(Window.java:537)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.app.Dialog.show(Dialog.java:278)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
org.brickred.socialauth.android.SocialAuthDialog$SocialAuthWebViewClient.onPageS
tarted(SocialAuthDialog.java:286)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:277)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.os.Handler.dispatchMessage(Handler.java:99)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.os.Looper.loop(Looper.java:137)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
android.app.ActivityThread.main(ActivityThread.java:4512)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
java.lang.reflect.Method.invokeNative(Native Method)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
java.lang.reflect.Method.invoke(Method.java:511)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:561)
02-08 21:04:06.545: E/AndroidRuntime(15488):    at 
dalvik.system.NativeStart.main(Native Method)

I cannot produce it every single time as the timing is rather specific, but 
press the share button, choose facebook, and hit back while the page is loading 
until you get back to the original activity. Do this a few times and then press 
the home key. Kill it with any form of task manager (even the default way in 
ICS+). I've gotten the crash inconsistently; but I can generally get it in 5 
tries or less. The crash usually occurs when you kill the activity, but 
occasionally just pressing the home key will cause the crash to occur.

Original comment by sordeode...@gmail.com on 9 Feb 2013 at 5:10

GoogleCodeExporter commented 9 years ago
ok , will check and revert.

Original comment by vineet.a...@3pillarglobal.com on 9 Feb 2013 at 8:52

GoogleCodeExporter commented 9 years ago

Original comment by vineet.a...@3pillarglobal.com on 11 Mar 2013 at 5:47

GoogleCodeExporter commented 9 years ago
Hi ,

With the help of socialauth user , we  have traced the issue. Please find new 
jar and do a test for us.

We thanks for your patience.

Original comment by vineet.a...@3pillarglobal.com on 7 Apr 2013 at 4:36

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by vineet.a...@3pillarglobal.com on 11 Apr 2013 at 7:05

GoogleCodeExporter commented 9 years ago

Some of our users are reporting this issue with 2.6 jar as well. Is it fixed? 

Original comment by anoop....@gmail.com on 23 Aug 2013 at 3:57

GoogleCodeExporter commented 9 years ago
Even I am facing this issue in 2.6 jar. Please let me know how to resolve it. 
Thanks :)

Original comment by pmu.m...@gmail.com on 21 Sep 2013 at 12:07

GoogleCodeExporter commented 9 years ago
Got Crash in socialauth-android-3.2.jar. Randomly
can suggest any way to handle jar expection. 

Original comment by tarun.sh...@ongraph.com on 25 Feb 2015 at 6:24

Attachments: