This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 41808 - Setting UILabel Text type to "Attributed", then back to "Plain" causes compilation error in Storyboard.
Summary: Setting UILabel Text type to "Attributed", then back to "Plain" causes compil...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS Designer (show other bugs)
Version: 6.0.0 (C7)
Hardware: PC Windows
: Normal normal
Target Milestone: (C8)
Assignee: Bugzilla
Depends on:
Reported: 2016-06-14 17:10 UTC by Ryan Frawley
Modified: 2016-09-06 17:37 UTC (History)
12 users (show)

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

First Storyboard file (3.26 KB, application/xml)
2016-06-27 12:22 UTC, Saurabh
Second storyboard file (3.29 KB, application/xml)
2016-06-27 12:22 UTC, Saurabh

Description Ryan Frawley 2016-06-14 17:10:36 UTC
It seems that changing the type of the UILabel text causes a previously defined color to be corrupted.

Steps to reproduce:

- Create a storyboard view and add a UILabel.
- Set the label color to "Custom", and select a color (I used R: 0, G: 0, B: 0, A: 250)
- Set the Text Type to "Attributed"
- Set the Text Type to "Plain"
- Try compiling the project

The error I received was: 

Severity	Code	Description	Project	File	Line	Suppression State
Error		2016-06-14 12:00:29.774 ibtoold[2171:33735] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/
Details:  Failed to unarchive an instance of NSColor
Object:   <IBDocumentUnarchiver: 0x7fa4c4b75000>
Method:   -unarchiveObjectFromElement:
Thread:   <NSThread: 0x7fa4c1c1a2c0>{number = 1, name = main}
Hints: None
  0   -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
  4   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
  5   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
  6   -[IBDocumentUnarchiver unarchiveObjectForKey:defaultValue:] (in IDEInterfaceBuilderKit)
  7  0x000000010b5e787f (in IDEInterfaceBuilderCocoaTouchIntegration)
  8   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
  9   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 10   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
 11   -[IBDocumentUnarchiver unarchiveArrayDictionaryOrObjectFromElement:] (in IDEInterfaceBuilderKit)
 12   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke_2 (in IDEInterfaceBuilderKit)
 13   -[NSXMLElement(IBIDEXMLElementAddition) ib_enumerateElements:] (in IDEInterfaceBuilderKit)
 14   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 15   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 16   -[IBDocumentUnarchiver unarchiveArrayFromElement:] (in IDEInterfaceBuilderKit)
 17   -[IBDocumentUnarchiver unarchiveArrayWithName:forOptionalKey:defaultValue:] (in IDEInterfaceBuilderKit)
 18   -[NSView(IBViewIntegration) ibUnarchiveSubviews:] (in IDEInterfaceBuilderKit)
 19   -[NSView(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] (in IDEInterfaceBuilderKit)
 20  0x000000010b6a03dd (in IDEInterfaceBuilderCocoaTouchIntegration)
 21   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 22   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 23   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
 24   -[IBDocumentUnarchiver unarchiveArrayDictionaryOrObjectFromElement:] (in IDEInterfaceBuilderKit)
 25   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke_2 (in IDEInterfaceBuilderKit)
 26   -[NSXMLElement(IBIDEXMLElementAddition) ib_enumerateElements:] (in IDEInterfaceBuilderKit)
 27   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 28   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 29   -[IBDocumentUnarchiver unarchiveArrayFromElement:] (in IDEInterfaceBuilderKit)
 30   -[IBDocumentUnarchiver unarchiveArrayWithName:forOptionalKey:defaultValue:] (in IDEInterfaceBuilderKit)
 31   -[NSView(IBViewIntegration) ibUnarchiveSubviews:] (in IDEInterfaceBuilderKit)
 32   -[NSView(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] (in IDEInterfaceBuilderKit)
 33  0x000000010b6a03dd (in IDEInterfaceBuilderCocoaTouchIntegration)
 34   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 35   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 36   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
 37   -[IBDocumentUnarchiver unarchiveArrayDictionaryOrObjectFromElement:] (in IDEInterfaceBuilderKit)
 38   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke_2 (in IDEInterfaceBuilderKit)
 39   -[NSXMLElement(IBIDEXMLElementAddition) ib_enumerateElements:] (in IDEInterfaceBuilderKit)
 40   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 41   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 42   -[IBDocumentUnarchiver unarchiveArrayFromElement:] (in IDEInterfaceBuilderKit)
 43   -[IBDocumentUnarchiver unarchiveArrayWithName:forOptionalKey:defaultValue:] (in IDEInterfaceBuilderKit)
 44   -[NSView(IBViewIntegration) ibUnarchiveSubviews:] (in IDEInterfaceBuilderKit)
 45   -[NSView(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] (in IDEInterfaceBuilderKit)
 46  0x000000010b6a03dd (in IDEInterfaceBuilderCocoaTouchIntegration)
 47  0x000000010b676d77 (in IDEInterfaceBuilderCocoaTouchIntegration)
 48   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 49   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 50   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
 51   -[IBDocumentUnarchiver unarchiveObjectForKey:defaultValue:] (in IDEInterfaceBuilderKit)
 52   -[NSView(IBViewIntegration) ibUnarchiveSubviews:] (in IDEInterfaceBuilderKit)
 53   -[NSView(IBDocumentArchivingGenerator) unarchiveWithDocumentUnarchiver:] (in IDEInterfaceBuilderKit)
 54  0x000000010b6a03dd (in IDEInterfaceBuilderCocoaTouchIntegration)
 55  0x000000010b670337 (in IDEInterfaceBuilderCocoaTouchIntegration)
 56   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 57   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 58   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
 59   -[IBDocumentUnarchiver unarchiveArrayDictionaryOrObjectFromElement:] (in IDEInterfaceBuilderKit)
 60   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke_2 (in IDEInterfaceBuilderKit)
 61   -[NSXMLElement(IBIDEXMLElementAddition) ib_enumerateElements:] (in IDEInterfaceBuilderKit)
 62   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 63   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 64   -[IBDocumentUnarchiver unarchiveArrayFromElement:] (in IDEInterfaceBuilderKit)
 65   -[IBDocumentUnarchiver unarchiveArrayWithName:forOptionalKey:defaultValue:] (in IDEInterfaceBuilderKit)
 66  0x000000010b665ab8 (in IDEInterfaceBuilderCocoaTouchIntegration)
 67   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 68   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 69   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
 70   -[IBDocumentUnarchiver unarchiveObjectForKey:defaultValue:] (in IDEInterfaceBuilderKit)
 71  0x000000010b6ac564 (in IDEInterfaceBuilderCocoaTouchIntegration)
 72  0x000000010b67da93 (in IDEInterfaceBuilderCocoaTouchIntegration)
 73   __51-[IBDocumentUnarchiver unarchiveObjectFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 74   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 75   -[IBDocumentUnarchiver unarchiveObjectFromElement:] (in IDEInterfaceBuilderKit)
 76   -[IBDocumentUnarchiver unarchiveArrayDictionaryOrObjectFromElement:] (in IDEInterfaceBuilderKit)
 77   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke_2 (in IDEInterfaceBuilderKit)
 78   -[NSXMLElement(IBIDEXMLElementAddition) ib_enumerateElements:] (in IDEInterfaceBuilderKit)
 79   __50-[IBDocumentUnarchiver unarchiveArrayFromElement:]_block_invoke (in IDEInterfaceBuilderKit)
 80   -[IBDocumentUnarchiver recurseWithElement:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
 81   -[IBDocumentUnarchiver unarchiveArrayFromElement:] (in IDEInterfaceBuilderKit)
 82   -[IBDocumentUnarchiver unarchiveArrayWithName:forOptionalKey:] (in IDEI	lc360.ios
Comment 1 Jerome Liger 2016-06-15 10:02:38 UTC
Same error in my storyboard !

VS2013 update5, Xamarin, Xamarin.iOS
(impossible to do the last update to Xamarin, with VS2013 there are .NET errors... not solved)

So... I'm blocked
Comment 2 Ryan Frawley 2016-06-15 13:37:19 UTC
As a workaround Jerome, you can change the color back to something predefined or custom, or delete the label and recreate it.
Comment 3 Sebastien Pouliot 2016-06-19 20:36:33 UTC
XI does not compile (or touch/look at) the storyboard file itself (it's done by Apple tools) so it's likely something _wrong_ written by the designer.
Comment 4 Alan McGovern 2016-06-20 14:10:47 UTC
This was a regression in the designer and has been fixed now. We added an automated test covering this case too.
Comment 5 Saurabh 2016-06-27 10:17:07 UTC
I have checked this Issue with latest master build. I am still getting this Issue on master build:

Error details:
Environment details and logs:

As per my understanding fix of this Issue should be in master build. Hence, I checked it on master build.
Comment 6 Alan McGovern 2016-06-27 10:58:32 UTC
Can you screencast what you did and also attach a copy of the storyboard from before and after you make the modifications? The original issue reported here doesn't exist in the builds I'm testing with.
Comment 7 Saurabh 2016-06-27 12:21:37 UTC
This is the screencast for the same:
and attaching the storyboard files.
Comment 8 Saurabh 2016-06-27 12:22:29 UTC
Created attachment 16502 [details]
First Storyboard file
Comment 9 Saurabh 2016-06-27 12:22:55 UTC
Created attachment 16503 [details]
Second storyboard file
Comment 10 Saurabh 2016-06-27 12:23:51 UTC
As per comment#7 changing the status to Reopened
Comment 11 xamarin-release-manager 2016-06-28 10:33:19 UTC
Fixed in version (master)

Author: Alan McGovern
Commit: b22374a5a0e2ff35a66321142ab1899db6434d0e (xamarin/md-addins)
Included in Commit: e08772c7f10c25fefb87ba3f8ebb2632af0cff0f (mono/monodevelop)
Comment 12 xamarin-release-manager 2016-07-05 18:15:40 UTC
Fixed in version (cycle7)

Author: Alan McGovern
Commit: b02274be9b70aa54056aec2dbb4a6e1ef86f839e (xamarin/md-addins)
Included in Commit: 7f6191304515373c9e9e886b831760baa8f30a6a (mono/monodevelop)
Comment 13 DeeKay 2016-08-09 16:50:11 UTC
The exact same bug also exists within Visual Studio during iOS development.
Comment 14 Saurabh 2016-08-11 11:29:28 UTC
I have checked this Issue with latest master build XS 6.2 (build 329) and observed that  no error appearing after changing Text type of Label to "Attributed", then back to "Plain".
Environment Info:

I checked the same with Cycle 7 SR1 builds XS 6.0.2 (Build 73) but on this build I am still observing the same Issue, Getting build error.
Build output:
Environment Info and Logs:

I am also observing same Issue in VS as well with C7SR1 build (XVS
Build output:
Comment 15 Vinicius Jarina 2016-09-06 14:20:30 UTC
Hi Saurabh

Can you confirm this is still happening on C8.

I have tested here and seems to be working fine, can we close this issue?
Comment 16 Alan McGovern 2016-09-06 15:32:12 UTC
It looks like the bug was reopened because it was in c7, but the fix was never requested for c7. I'll just close this as it was fixed and verified in C8/master.
Comment 17 Parmendra Kumar 2016-09-06 17:37:46 UTC
I have checked this issue with latest C8 build and observed that this issue is working fine.

Hence marked this issue as verified.


Microsoft Visual Studio Enterprise 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Enterprise
Xamarin (2de3dea)
Xamarin.Android (9ad0da0)
Xamarin.iOS (9838930)

XS Version 6.1 (build 5417)
Mono 4.6.0 (mono-4.6.0-branch/6fa66df) (64-bit)
Xcode 7.3.1 (10188.1)
Xamarin.iOS: (Xamarin Enterprise)
Xamarin.Android : (Xamarin Enterprise)
Mac OS X 10.11.5

Note You need to log in before you can comment on or make changes to this bug.