Bug 60613 - Fractional NumberOfLines for Label
Summary: Fractional NumberOfLines for Label
Status: RESOLVED NORESPONSE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 4.7.0 (15.4)
Hardware: PC Windows
: Normal normal
Target Milestone: Future Cycle
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-10 09:58 UTC by Sergei
Modified: 2018-01-29 21:47 UTC (History)
5 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 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 NORESPONSE

Description Sergei 2017-11-10 09:58:33 UTC
1) Add label to view
2) Set Number of lines = 0 for this label in designer
3) Save storyboard
4) Open storyboard file as xml and find there description of added label. We can see that numberOfLines="0.0".

After some working with such a storyboard error message about custom components rendering will appear. In designer log there is exception 
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x0005f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.99.8.25/src/mono/mcs/class/referencesource/mscorlib/system/number.cs:1077 
at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00015] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.99.8.25/src/mono/mcs/class/referencesource/mscorlib/system/number.cs:745 
at System.Int32.Parse (System.String s, System.Globalization.NumberStyles style, System.IFormatProvider provider) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.99.8.25/src/mono/mcs/class/referencesource/mscorlib/system/int32.cs:145 
at System.Convert.ToInt32 (System.String value, System.IFormatProvider provider) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.99.8.25/src/mono/mcs/class/referencesource/mscorlib/system/convert.cs:1121 
at System.String.System.IConvertible.ToInt32 (System.IFormatProvider provider) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.99.8.25/src/mono/mcs/class/referencesource/mscorlib/system/string.cs:3372 
at System.Convert.ChangeType (System.Object value, System.Type conversionType, System.IFormatProvider provider) [0x0011a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.99.8.25/src/mono/mcs/class/referencesource/mscorlib/system/convert.cs:361 
at MonoTouch.Design.UIKitParser.ChangeType (System.Object value, System.Type type) [0x00055] in /Users/builder/data/lanes/5153/70936af1/source/XamarinVS/External/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Server/TypeSystem/Loader.cs:125 
at MonoTouch.Design.Parser.ParseElement (System.Object result, MonoTouch.Design.ParseContext context) [0x00109] in /Users/builder/data/lanes/5153/70936af1/source/XamarinVS/External/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:1102

If I replace numberOfLines="0.0" with numberOfLines="0" in storyboard file manually, this error goes away.
Comment 1 John Miller [MSFT] 2017-11-10 15:28:14 UTC
Hi Sergei,

I was unable to reproduce this using the latest versions of the tooling (15.4.3). Would you please update to these versions and let me know if you can reproduce the issue? It looks like you are currently still using an old web preview of Xamarin.iOS (10.99).

You can update Visual Studio on Windows to 15.4.3:
https://releases.xamarin.com/service-release-15-4-3/

You will want to update the Mac using the Updater:
https://docs.microsoft.com/en-us/visualstudio/mac/update

You may also need to update Xcode using the Mac App Store.
Comment 2 Sergei 2017-11-13 06:29:03 UTC
This bug still can be observed with latest stable Visual Studio version (15.4.3) and latest xcode version (9.1). Zero number of lines for label is saved as '0.0'.
I can reproduce this bug even in a sample project created from Visual Studio (Cross Platform App -> Native).
Comment 3 John Miller [MSFT] 2017-12-05 19:08:16 UTC
Hi Sergei,

Thanks for confirming. Could you please attach a project that I can use to reproduce this? You can delete the bin/obj and /packages folders to reduce the zip size. I was unable to reproduce the issue so far.
Comment 4 John Miller [MSFT] 2018-01-29 21:47:06 UTC
Because we have not received a reply to our request for more information, we are marking this issue as RESOLVED→NORESPONSE. If you are still encountering this issue on the latest Visual Studio 15.6 Preview 3, please don’t hesitate to reopen the ticket with the requested information. Thanks!