Bug 58433 - Label LineBreakMode="HeadTruncation" crashes App on Android when see details
Summary: Label LineBreakMode="HeadTruncation" crashes App on Android when see details
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.4.0
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-27 12:21 UTC by mr.pearce
Modified: 2017-08-24 15:19 UTC (History)
2 users (show)

Tags: linebreakmode, ac
Is this bug a regression?: ---
Last known good build:


Attachments
ExampleProject (190.50 KB, application/x-zip-compressed)
2017-07-27 14:30 UTC, mr.pearce
Details


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 for Bug 58433 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description mr.pearce 2017-07-27 12:21:03 UTC
Tested On 
Xamarin.Forms 
2.3.4.247 and 2.3.5.256-pre6

RepoSteps
Create a new Empty Content Page
Add the Following.

When i Create a Label with LineBreakMode="HeadTruncation" and the text is long enough for a Linebreak it crashes

When the Label has a Margin >= 3
When the Label is inside a Grid and the Grid has more than one Columndefinition or has a Margin or Padding >= 3
When the Label is inside a StackLayout and the Stacklayout has a Margin or Padding >= 3

Other LineBreakModes are working




Microsoft Visual Studio Professional 2017 
Version 15.2 (26430.16) Release
VisualStudio.15.Release/15.2.0+26430.16
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Professional

Visual Basic 2017   00370-20006-01510-AA794
Microsoft Visual Basic 2017

Visual C# 2017   00370-20006-01510-AA794
Microsoft Visual C# 2017

Visual F# 4.1   00370-20006-01510-AA794
Microsoft Visual F# 4.1

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GorillaPlayerPackage Extension   1.0
GorillaPlayerPackage Visual Studio Extension Detailed Info

JetBrains ReSharper Ultimate 2017.2 EAP 9   Build 109.0.20170720.100122-eap09
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

VisualSVN   6.0.1
Integration with Subversion version control. For more information about VisualSVN, see the VisualSVN website at http://www.visualsvn.com
Copyright © 2017 VisualSVN Software Ltd. All rights reserved.

Xamarin   4.5.0.486 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.3.1.2 (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.10.0.37 (ad35de4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 mr.pearce 2017-07-27 12:42:59 UTC
Also tested on VS 15.3 Preview 5 
with Xamarin.Forms 2.3.4.247
Comment 2 Paul DiPietro [MSFT] 2017-07-27 13:40:32 UTC
I have attempted to reproduce this issue on a Galaxy S8 with 2.3.5-pre6 and am unable to do so (in this instance I have tried using the Label with a margin >3 as well as it being inside a StackLayout with a margin >3, as mentioned in the original comment). If you can please elaborate on which version of Android you're using as well as uploading a reproduction project that demonstrates the behavior using your exact code, we would be able to investigate further. This will be set to needinfo for the time being and will be closed in 30 days without a response.
Comment 3 mr.pearce 2017-07-27 14:30:32 UTC
Created attachment 23850 [details]
ExampleProject
Comment 4 mr.pearce 2017-07-27 14:30:48 UTC
Just Tested it on some Devices

Working on 
Android 6.0 Emulator 
LG G5 (LG-H850) Android 7 Device

Crashing on 
Emulators
Android 4.4.2 Nexus 5 (4.95", 1080 x1920: xxhdpi)  - API Level 19
Logiscan 1560 (480x800: hdpi) Android 5.1.1 - Api Level 22

Real Device
Logiscan 1560 Android 5.1.1


In that Testproject i not even had to do some fancy stuff with the Label.
Just added a Label with an long text and the LineBreakMode="HeadTruncation"

Test project is attatched.
Comment 5 mr.pearce 2017-08-24 10:46:12 UTC
I just saw that this is still under need info although i provided it.
Comment 6 Paul DiPietro [MSFT] 2017-08-24 15:19:18 UTC
I just ran the project and it looks to be at least occurring on an API 19 emulator (imitating a Nexus 5). Did not check against API 22, but a 24 emulator seems fine. Also tested against the 2.4.0-pre1 build.