Bug 27151 - When active, Dictionary<string> selector displays incorrect string if it matches the beginning of another string.
Summary: When active, Dictionary<string> selector displays incorrect string if it matc...
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.3
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-17 12:29 UTC by Kent Green [MSFT]
Modified: 2015-03-10 13:42 UTC (History)
7 users (show)

Tags:
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:
Status:
RESOLVED INVALID

Description Kent Green [MSFT] 2015-02-17 12:29:35 UTC
---Overview---
From this desk case:
https://xamarin.desk.com/agent/case/125230

When active, Dictionary<string> selector displays incorrect string if it matches the beginning of another string.

---Snippet---
In the following sample, when "Aqua" is picked, it displays the color (as expected.) However; once the picker is brought up again, the "Aqua" label is replaced with "AquaSAMPLE" until user scrolls to refresh and the label switches back to "Aqua."

> Dictionary<string, Color> nameToColor = new Dictionary<string, Color>
>        {
>			   { "AquaSAMPLE", Color.Yellow },
>            { "Aqua", Color.Aqua },         { "Black", Color.Black },
>            { "Blue", Color.Blue },         { "Fuschia", Color.Fuschia },
>            { "Gray", Color.Gray },         { "Green", Color.Green },
>            { "Lime", Color.Lime },         { "Maroon", Color.Maroon },
>            { "Navy", Color.Navy },         { "Olive", Color.Olive },
>            { "Purple", Color.Purple },     { "Red", Color.Red },
>            { "Silver", Color.Silver },     { "Teal", Color.Teal },
>            { "White", Color.White }
>        };

---Steps to reproduce---
Screencast demonstrating the issue:
http://screencast.com/t/cfh9DE5KWT

I was able to reproduce the issue using the attached sample. Steps:
1) Build the Android Project.
2) Open the picker.
3) Select "Aqua" in the picker.
4) Open the picker again, observe that instead of "Aqua", a second copy of the string "AquaSAMPLE" appears. (This is the bug.)

Additionally, note that if "AquaSAMPLE" is changed to just "SAMPLE," the issue ceases to occur. 
(This can also be used as a workaround, when feasible.)

---Version Information---
Based on my tests, this seems to occur in the following Xamarin.Forms versions:
Xamarin.Forms 1.3.3.6323
Xamarin.Forms 1.3.4.6332

---Build Info---
=== Xamarin Studio ===

Version 5.7.1 (build 17)
Installation UUID: 8ef63a7c-1b18-40de-a334-7f78777fcb55
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/kentgreen/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		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)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.10.2
Darwin Kents-MacBook-Pro.local 14.1.0 Darwin Kernel Version 14.1.0
    Mon Dec 22 23:10:38 PST 2014
    root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Comment 4 Rui Marinho 2015-03-04 09:18:21 UTC
This is a issue with xamarin android and not Xamarin Forms, i open a bug over there:

https://bugzilla.xamarin.com/show_bug.cgi?id=27643
Comment 6 Nat Friedman 2015-03-10 13:19:26 UTC
Can this please be tagged with affected customers?