Bug 21576 - Java.Lang.IllegalStateException The current thread must have a looper
Summary: Java.Lang.IllegalStateException The current thread must have a looper
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.2.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-07-24 13:50 UTC by John Miller [MSFT]
Modified: 2015-05-18 16:36 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description John Miller [MSFT] 2014-07-24 13:50:56 UTC
### Overview: 

    The test case (see private comment) demonstrates this exception while using the app. 

### Steps to Reproduce: 

    1. Run the test case on an Android device or emulator.
    2. In the first Entry field, start typing "Sao". 
    3. If the crash is not reproduced at this point, continue to step 4.
    4. Touch the button "Procurar carona" at the bottom of the screen.
    5. Navigate back.
    6. Repeat steps 5-6 until it crashes (usually 1-2 attempts). 
### Actual Results: 

>[mono] Unhandled Exception:
>[mono] Java.Lang.IllegalStateException: Exception of type 'Java.Lang.IllegalStateException' was thrown.
>[mono]   at Android.Runtime.JNIEnv.CallVoidMethod (IntPtr object, IntPtr jmethod) [0x00062] in >/Users/builder/data/lanes/monodroid-mlion-monodroid-4.12->series/163212a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:490 
>[mono]   at Android.Animation.Animator.Cancel () [0x00043] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12->series/163212a9/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.Animation.Animator.cs:531 
>[mono]   at Xamarin.Forms.Platform.Android.AndroidTicker.DisableTimer () [0x00000] in <filename unknown>:0 
>[mono]   at Xamarin.Forms.Ticker.Disable () [0x00000] in <filename unknown>:0 
>[mono]   at Xamarin.Forms.Ticker.Remove (Int32 handle) [0x00000] in <filename unknown>:0 
>[mono]   at Xamarin.Forms.Tweener.Finalize () [0x00000] in <filename unknown>:0 
>[mono]   --- End of managed exception stack trace ---
>[mono] java.lang.IllegalStateException: The current thread must have a looper

### Expected Results: 

    No crash.

### Build Date & Platform: 

    Tested on XF 1.2.1 and 1.2.2 pre2

### Additional Information: 

    See private comments
Comment 2 Ram Chandra 2014-08-20 06:31:15 UTC
I have checked this issue with the steps mentioned on bug description and I am able  to reproduce this issue.

I observed that when I enter "Sao" inn first entry field and tab the "Procurar carona" button, I am getting following exception an application is crashed. 

"Java.Lang.IllegalStateException: Exception of type 'Java.Lang.IllegalStateException' was thrown.

Screencast: http://www.screencast.com/t/cmq7brmrL

Application Output: https://gist.github.com/saurabh360/1277d2a21973a4072fb3
Adb logs: https://gist.github.com/saurabh360/803716496a28f8622255

Environment Info:

=== Xamarin Studio ===

Version 5.3 (build 428)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
	Mono 3.8.0 ((no/62a857e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000007

=== Apple Developer Tools ===

Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 141adb9
Build date: 2014-08-15 12:54:28-0400

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.0   (API level 11)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 503000428
Git revision: 3166b1cd326fbea84dcf024e73cb31ccc83a9811
Build date: 2014-08-15 14:50:33-04
Xamarin addins: 3d041b1639f938107c5e1c71c54d9a346b30c660

=== Operating System ===

Mac OS X 10.9.3
Darwin Jatin66s-iMac.local 13.2.0 Darwin Kernel Version 13.2.0
    Thu Apr 17 23:03:13 PDT 2014
    root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Comment 3 Eric Maupin 2015-05-18 16:36:37 UTC
This appears to be fixed in the current version.