Bug 44295 - "Specified argument was out of the range of valid values." in ApplyFont when set PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled
Summary: "Specified argument was out of the range of valid values." in ApplyFont when ...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.1
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-14 14:41 UTC by John Hardman
Modified: 2017-04-17 18:27 UTC (History)
4 users (show)

Tags: WinPhone Silverlight SL UserIdleDetectionMode ApplyFont
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 NOT_REPRODUCIBLE

Description John Hardman 2016-09-14 14:41:51 UTC
I'm not planning on publishing my app for WinPhone 8 Silverlight, so just logging this for completeness, rather than personally wanting it fixed.

I noticed that if I include the following line in my App.xaml.cs in the Debug build for WinPhone 8 SL, I get an exception ("Specified argument was out of the range of valid values.") with the stack trace shown below:

    PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;


Xamarin.Forms.Platform.WinPhone.FontExtensions.ApplyFont(TextBlock self, Font font)\r\n  
Xamarin.Forms.Platform.WinPhone.LabelRenderer.UpdateFont(TextBlock textBlock)\r\n  
Xamarin.Forms.Platform.WinPhone.LabelRenderer.OnElementChanged(ElementChangedEventArgs`1 e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.HandleChildAdded(Object sender, ElementEventArgs e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.Load()\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.HandleChildAdded(Object sender, ElementEventArgs e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.Load()\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.HandleChildAdded(Object sender, ElementEventArgs e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.Load()\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.HandleChildAdded(Object sender, ElementEventArgs e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.Load()\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.HandleChildAdded(Object sender, ElementEventArgs e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.Load()\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.HandleChildAdded(Object sender, ElementEventArgs e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.Load()\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.HandleChildAdded(Object sender, ElementEventArgs e)\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementPackager.Load()\r\n  
Xamarin.Forms.Platform.WinPhone.VisualElementRenderer`2.SetElement(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.Platform.CreateRenderer(VisualElement element)\r\n  
Xamarin.Forms.Platform.WinPhone.ViewToRendererConverter.WrapperControl..ctor(View view)\r\n  
Xamarin.Forms.Platform.WinPhone.ViewToRendererConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)\r\n  
System.Windows.Data.BindingExpression.ConvertToTarget(Object value)\r\n  
System.Windows.Data.BindingExpression.GetValue(DependencyObject d, DependencyProperty dp)\r\n  
System.Windows.DependencyObject.EvaluateExpression(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry)\r\n  
System.Windows.DependencyObject.EvaluateBaseValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)\r\n  
System.Windows.DependencyObject.EvaluateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry, ValueOperation operation)\r\n  
System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)\r\n  
System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)\r\n  
System.Windows.Data.BindingExpression.SendDataToTarget()\r\n  
System.Windows.Data.BindingExpression.SourceAcquired()\r\n  
System.Windows.Data.BindingExpression.System.Windows.IDataContextChangedListener.OnDataContextChanged(Object sender, DataContextChangedEventArgs e)\r\n  
System.Windows.Data.BindingExpression.DataContextChanged(Object sender, DataContextChangedEventArgs e)\r\n  
System.Windows.DataContextChangedEventHandler.Invoke(Object sender, DataContextChangedEventArgs e)\r\n  
System.Windows.FrameworkElement.OnDataContextChanged(DataContextChangedEventArgs e)\r\n  
System.Windows.FrameworkElement.OnTreeParentUpdated(DependencyObject newParent, Boolean bIsNewParentAlive)\r\n  
System.Windows.DependencyObject.UpdateTreeParent(IManagedPeer oldParent, IManagedPeer newParent, Boolean bIsNewParentAlive, Boolean keepReferenceToParent)\r\n  
MS.Internal.FrameworkCallbacks.ManagedPeerTreeUpdate(IntPtr oldParentElement, IntPtr parentElement, IntPtr childElement, Byte bIsParentAlive, Byte bKeepReferenceToParent, Byte bCanCreateParent)
Comment 1 Paul DiPietro [MSFT] 2016-10-10 16:52:48 UTC
Odd that I was testing with another WP8 repro that has that line in the App.xaml.cs and it doesn't crash. I trust it's possible this could be occurring but I think we should wait for more information, although WP8 is not targeted much these days.
Comment 2 John Hardman 2016-10-11 10:50:17 UTC
@Paul DiPietro - Yes, I think there is more to it than just the use of UserIdleDetectionMode . I'm happy for this to be closed. If anybody else hits the problem, it can always be re-opened.
Comment 3 Samantha Houts [MSFT] 2017-04-17 18:27:42 UTC
Closing per Comment 2. Thank you for the report!