xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.88k forks source link

Bottom Tabs throws a Java.Lang.RuntimeException: 'Font asset not found sans-serif' as a FirstChanceException #13601

Open mfeingol opened 3 years ago

mfeingol commented 3 years ago

Steps to Reproduce

  1. Build, deploy app, start debugging
  2. Observe 12 Java.Lang.RuntimeExceptions at startup
  3. Hit F5 to continue

I wasn't able to reproduce this in a fresh Xamarin Forms Android app, so I can give you access to build and run my app if needed.

There are two issues here:

  1. Disabling first-chance handling of Java.Lang.RuntimeException in Visual Studio requires disabling all exceptions in Exception Settings. Disabling just Java.Lang.RuntimeException does not work: the exceptions mentioned below are still raised in the debugger. This happens every time I run my app.

  2. The exception is thrown 12 times at startup, even though my app doesn't reference a sans-serif font at all. In order:

Java.Lang.RuntimeException: 'Font asset not found sans-serif'
Java.Lang.RuntimeException: 'Font asset not found Fonts/sans-serif'
Java.Lang.RuntimeException: 'Font asset not found fonts/sans-serif'
Java.Lang.RuntimeException: 'Font asset not found sans-serif'
Java.Lang.RuntimeException: 'Font asset not found Fonts/sans-serif'
Java.Lang.RuntimeException: 'Font asset not found fonts/sans-serif'

... with the following stack trace:

    0xC in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:157,13  C#  Annotated Frame
    0x6E in Java.Interop.JniEnvironment.StaticMethods.CallStaticObjectMethod    C#  Annotated Frame
    0x1A in Java.Interop.JniPeerMembers.JniStaticMethods.InvokeObjectMethod C#  Annotated Frame
    0x51 in Android.Graphics.Typeface.CreateFromAsset   C#  Annotated Frame
    0x10 in Xamarin.Forms.Platform.Android.FontExtensions.LoadTypefaceFromAsset at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:121,5    C#  Annotated Frame
    0xF8 in Xamarin.Forms.Platform.Android.FontExtensions.TryGetFromAssets at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:106,7 C#  Annotated Frame
    0xD in Xamarin.Forms.Platform.Android.FontExtensions.ToTypeFace at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:47,4 C#  Annotated Frame
    0x4D in Xamarin.Forms.Platform.Android.FontExtensions.CreateTypeface at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:181,5   C#  Annotated Frame
    0x39 in System.Collections.Concurrent.ConcurrentDictionary<System.Tuple<string,Xamarin.Forms.FontAttributes>,Android.Graphics.Typeface>.GetOrAdd at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs:1002,17   C#  Annotated Frame
    0x24 in Xamarin.Forms.Platform.Android.FontExtensions.ToTypeface at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:161,4   C#  Annotated Frame
    0x43 in Xamarin.Forms.Platform.Android.FontExtensions.ToTypeface at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:136,4   C#  Annotated Frame
    0xC in Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer.UpdateFont at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\LabelRenderer.cs:327,4    C#  Annotated Frame
    0x11F in Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer.UpdateText at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\LabelRenderer.cs:424,5  C#  Annotated Frame
    0x87 in Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer.OnElementChanged at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\LabelRenderer.cs:256,5 C#  Annotated Frame
    0x25 in Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer.set_Element at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\LabelRenderer.cs:76,5   C#  Annotated Frame
    0x17 in Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\LabelRenderer.cs:163,4 C#  Annotated Frame
    0x40 in Xamarin.Forms.Platform.Android.Platform.CreateRenderer at D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:358,4 C#  Annotated Frame
    0xC4 in Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:140,6 C#  Annotated Frame
    0x176 in Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:351,6  C#  Annotated Frame
    0x8 in Xamarin.Forms.Platform.Android.VisualElementPackager.Load at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:112,4  C#  Annotated Frame
    0x8 in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.SetPackager at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:481,4   C#  Annotated Frame
    0xF0 in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:244,5   C#  Annotated Frame
    0x3A in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:131,4 C#  Annotated Frame
    0x40 in Xamarin.Forms.Platform.Android.Platform.CreateRenderer at D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:358,4 C#  Annotated Frame
    0xC4 in Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:140,6 C#  Annotated Frame
    0x176 in Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:351,6  C#  Annotated Frame
    0x8 in Xamarin.Forms.Platform.Android.VisualElementPackager.Load at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:112,4  C#  Annotated Frame
    0x8 in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.SetPackager at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:481,4   C#  Annotated Frame
    0xF0 in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:244,5   C#  Annotated Frame
    0x3A in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.View>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:131,4 C#  Annotated Frame
    0x40 in Xamarin.Forms.Platform.Android.Platform.CreateRenderer at D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:358,4 C#  Annotated Frame
    0xC4 in Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:140,6 C#  Annotated Frame
    0x176 in Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:351,6  C#  Annotated Frame
    0x8 in Xamarin.Forms.Platform.Android.VisualElementPackager.Load at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementPackager.cs:112,4  C#  Annotated Frame
    0x8 in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.SetPackager at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:481,4   C#  Annotated Frame
    0xF0 in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:244,5   C#  Annotated Frame
    0x3A in Xamarin.Forms.Platform.Android.VisualElementRenderer<Xamarin.Forms.Page>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:131,4 C#  Annotated Frame
    0x40 in Xamarin.Forms.Platform.Android.Platform.CreateRenderer at D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:358,4 C#  Annotated Frame
    0x14 in Xamarin.Forms.Platform.Android.AppCompat.Platform.AddChild at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:383,4   C#  Annotated Frame
    0x62 in Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:341,4    C#  Annotated Frame
    0xE8 in Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:295,5    C#  Annotated Frame
    0x21 in Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:500,5  C#  Annotated Frame
    0xC in Xamarin.Forms.Platform.Android.FormsAppCompatActivity.SetMainPage at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:533,4   C#  Annotated Frame
    0x36 in Xamarin.Forms.Platform.Android.FormsAppCompatActivity.AppOnPropertyChanged at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:463,5 C#  Annotated Frame
    0x12 in Xamarin.Forms.BindableObject.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:266,7   C#  Annotated Frame
    0x2 in Xamarin.Forms.Element.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\Element.cs:362,4  C#  Annotated Frame
    0x91 in Xamarin.Forms.Application.set_MainPage at D:\a\1\s\Xamarin.Forms.Core\Application.cs:93,5   C#  Annotated Frame

... and then:

Java.Lang.RuntimeException: 'Font asset not found '
Java.Lang.RuntimeException: 'Font asset not found Fonts/'
Java.Lang.RuntimeException: 'Font asset not found fonts/'
Java.Lang.RuntimeException: 'Font asset not found '
Java.Lang.RuntimeException: 'Font asset not found Fonts/'
Java.Lang.RuntimeException: 'Font asset not found fonts/'

... with the following stack trace:

    0xC in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:157,13  C#  Annotated Frame
    0x6E in Java.Interop.JniEnvironment.StaticMethods.CallStaticObjectMethod    C#  Annotated Frame
    0x1A in Java.Interop.JniPeerMembers.JniStaticMethods.InvokeObjectMethod C#  Annotated Frame
    0x51 in Android.Graphics.Typeface.CreateFromAsset   C#  Annotated Frame
    0x10 in Xamarin.Forms.Platform.Android.FontExtensions.LoadTypefaceFromAsset at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:121,5    C#  Annotated Frame
    0xF8 in Xamarin.Forms.Platform.Android.FontExtensions.TryGetFromAssets at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:106,7 C#  Annotated Frame
    0xD in Xamarin.Forms.Platform.Android.FontExtensions.ToTypeFace at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:47,4 C#  Annotated Frame
    0x77 in Xamarin.Forms.Platform.Android.FontImageSourceHandler.LoadImageAsync at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontImageSourceHandler.cs:29,5    C#  Annotated Frame
    0x58 in Xamarin.Forms.Platform.Android.ResourceManager.GetFormsBitmapAsync at D:\a\1\s\Xamarin.Forms.Platform.Android\ResourceManager.cs:152,5  C#  Annotated Frame
    0x33 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Android.Graphics.Bitmap>.Start<Xamarin.Forms.Platform.Android.ResourceManager.<GetFormsBitmapAsync>d__22> at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:471,17   C#  Annotated Frame
    0x35 in Xamarin.Forms.Platform.Android.ResourceManager.GetFormsBitmapAsync  C#  Annotated Frame
    0x1EE in Xamarin.Forms.Platform.Android.ResourceManager.GetFormsDrawableAsync at D:\a\1\s\Xamarin.Forms.Platform.Android\ResourceManager.cs:132,11  C#  Annotated Frame
    0x33 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Android.Graphics.Drawables.Drawable>.Start<Xamarin.Forms.Platform.Android.ResourceManager.<GetFormsDrawableAsync>d__21> at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:471,17 C#  Annotated Frame
    0x35 in Xamarin.Forms.Platform.Android.ResourceManager.GetFormsDrawableAsync    C#  Annotated Frame
    0x254 in Xamarin.Forms.Platform.Android.ImageViewExtensions.UpdateBitmap at D:\a\1\s\Xamarin.Forms.Platform.Android\Extensions\ImageViewExtensions.cs:65,15 C#  Annotated Frame
    0x33 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<Xamarin.Forms.Platform.Android.ImageViewExtensions.<UpdateBitmap>d__2> at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:316,17    C#  Annotated Frame
    0x46 in Xamarin.Forms.Platform.Android.ImageViewExtensions.UpdateBitmap C#  Annotated Frame
    0x5 in Xamarin.Forms.Platform.Android.ImageViewExtensions.UpdateBitmap at D:\a\1\s\Xamarin.Forms.Platform.Android\Extensions\ImageViewExtensions.cs:13,4    C#  Annotated Frame
    0x6E in Xamarin.Forms.Platform.Android.FastRenderers.ImageElementManager.TryUpdateBitmap at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\ImageElementManager.cs:140,5  C#  Annotated Frame
    0x33 in System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<Xamarin.Forms.Platform.Android.FastRenderers.ImageElementManager.<TryUpdateBitmap>d__6> at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:316,17   C#  Annotated Frame
    0x3D in Xamarin.Forms.Platform.Android.FastRenderers.ImageElementManager.TryUpdateBitmap    C#  Annotated Frame
    0xA3 in Xamarin.Forms.Platform.Android.FastRenderers.ImageElementManager.OnElementPropertyChanged at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\ImageElementManager.cs:84,5  C#  Annotated Frame
    0x33 in System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<Xamarin.Forms.Platform.Android.FastRenderers.ImageElementManager.<OnElementPropertyChanged>d__4> at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:84,17   C#  Annotated Frame
    0x2D in Xamarin.Forms.Platform.Android.FastRenderers.ImageElementManager.OnElementPropertyChanged   C#  Annotated Frame
    0x52 in Xamarin.Forms.Platform.Android.ImageButtonRenderer.OnElementPropertyChanged at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\ImageButtonRenderer.cs:302,4   C#  Annotated Frame
    0x12 in Xamarin.Forms.BindableObject.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:266,7   C#  Annotated Frame
    0x2 in Xamarin.Forms.Element.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\Element.cs:362,4  C#  Annotated Frame
    0x6 in Xamarin.Forms.ImageButton.RaiseImageSourcePropertyChanged at D:\a\1\s\Xamarin.Forms.Core\ImageButton.cs:176,4    C#  Annotated Frame
    0xB in Xamarin.Forms.ImageElement.ImageSourceSourceChanged at D:\a\1\s\Xamarin.Forms.Core\ImageElement.cs:142,5 C#  Annotated Frame
    0x2 in Xamarin.Forms.ImageButton.Xamarin.Forms.IImageElement.OnImageSourceSourceChanged at D:\a\1\s\Xamarin.Forms.Core\ImageButton.cs:195,4 C#  Annotated Frame
    0x1C in System.Reflection.RuntimeMethodInfo.InternalInvoke  C#  Annotated Frame
    0x70 in System.Reflection.RuntimeMethodInfo.Invoke at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395,6   C#  Annotated Frame
    0x6 in System.Reflection.MethodBase.Invoke at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Reflection/MethodBase.cs:53,66    C#  Annotated Frame
    0xDC in Xamarin.Forms.WeakEventManager.HandleEvent at D:\a\1\s\Xamarin.Forms.Core\WeakEventManager.cs:74,5  C#  Annotated Frame
    0x11 in Xamarin.Forms.ImageSource.OnSourceChanged at D:\a\1\s\Xamarin.Forms.Core\ImageSource.cs:150,4   C#  Annotated Frame
    0x6 in Xamarin.Forms.FontImageSource.<>c.<.cctor>b__19_2 at D:\a\1\s\Xamarin.Forms.Core\FontImageSource.cs:26,34    C#  Annotated Frame
    0x12E in Xamarin.Forms.BindableObject.SetValueActual at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:512,5 C#  Annotated Frame
    0x17C in Xamarin.Forms.BindableObject.SetValueCore at D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:446,5   C#  Annotated Frame
    0x125 in Xamarin.Forms.Internals.TypedBinding<Sideroads.ShellPageFlyout,string>.ApplyCore at D:\a\1\s\Xamarin.Forms.Core\TypedBinding.cs:233,5  C#  Annotated Frame
    0x33 in Xamarin.Forms.Internals.TypedBinding<Sideroads.ShellPageFlyout,string>.Apply at D:\a\1\s\Xamarin.Forms.Core\TypedBinding.cs:115,5   C#  Annotated Frame
    0x7 in Xamarin.Forms.Internals.TypedBinding<Sideroads.ShellPageFlyout,string>.PropertyChangedProxy.<OnPropertyChanged>b__16_0 at D:\a\1\s\Xamarin.Forms.Core\TypedBinding.cs:297,31 C#  Annotated Frame
    0x29 in Xamarin.Forms.DispatcherExtensions.Dispatch at D:\a\1\s\Xamarin.Forms.Core\DispatcherExtensions.cs:53,6 C#  Annotated Frame
    0x3F in Xamarin.Forms.Internals.TypedBinding<Sideroads.ShellPageFlyout,string>.PropertyChangedProxy.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\TypedBinding.cs:297,5  C#  Annotated Frame
    0x15 in Xamarin.Forms.BindingExpression.WeakPropertyChangedProxy.OnPropertyChanged at D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:666,6    C#  Annotated Frame

Expected Behavior

No exceptions are thrown at startup. And if handled exceptions have to be thrown, then VS should allow me to silence them without disabling all other exception handling.

Actual Behavior

12 exceptions are thrown at startup. They can't be silenced with disabling all exception handling.

Version Information

Microsoft Visual Studio Enterprise 2019 Version 16.8.4 VisualStudio.16.Release/16.8.4+30907.101 Microsoft .NET Framework Version 4.8.04084

Installed Version: Enterprise

Visual C++ 2019 00435-60000-00000-AA219 Microsoft Visual C++ 2019

ADL Tools Service Provider 1.0 This package contains services used by Data Lake tools

ASA Service Provider 1.0

ASP.NET and Web Tools 2019 16.8.557.25636 ASP.NET and Web Tools 2019

ASP.NET Core Razor Language Services 16.1.0.2052803+84e121f1403378489b842e1797df2f3f5a49ac3c Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2019 16.8.557.25636 For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 16.8.557.25636 Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0 This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.6.3000.0 Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 16.8.557.25636 Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.6.3000.0 Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

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

Extensibility Message Bus 1.2.6 (master@34d6af2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events

GitHub.VisualStudio 2.11.106.19330 A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure HDInsight Azure Node 2.6.3000.0 HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.6.3000.0 Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio 16.0 Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service 2.6.3000.0 Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0 Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30924.1

Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 2.1.113+g422d40002e.RR Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 16.8.43 (00471f8) Support for debugging Mono processes with Visual Studio.

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

ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension 1.0 Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools 16.0.62012.31170 Microsoft SQL Server Data Tools

ToolWindowHostedEditor 1.0 Hosting json editor into a tool window

TypeScript Tools 16.0.21016.2001 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 16.8.0-beta.20507.4+da6be68280c89131cdba2045525b80890401defd Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions 1.0 View, manage, and diagnose containers within Visual Studio.

Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers

Visual Studio Tools for Kubernetes 1.0 Visual Studio Tools for Kubernetes

VisualStudio.DeviceLog 1.0 Information about my package

VisualStudio.Foo 1.0 Information about my package

VisualStudio.Mac 1.0 Mac Extension for Visual Studio

Xamarin 16.8.000.261 (d16-8@bb99248) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.8.0.507 (remotes/origin/d16-8@e87b24884) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 16.8.112 (86385a3) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 11.1.0.26 (d16-8/a36ce73) Xamarin.Android Reference Assemblies and MSBuild support. Mono: 5e9cb6d Java.Interop: xamarin/java.interop/d16-8@79d9533 ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000 SQLite: xamarin/sqlite/3.32.1@1a3276b Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

Xamarin.iOS and Xamarin.Mac SDK 14.8.0.3 (c51fabee8) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Log File

Available on request. I don't think you need one?

jpobst commented 3 years ago

This looks like it's probably in the Xamarin Forms stack, transferring there.

Feel free to send it back if it's a Xamarin.Android issue.

mfeingol commented 3 years ago

@jpobst: thanks! Any thoughts on the first issue, the fact that it's not possible to disable first-chance Java.Lang.RuntimeExceptions without disabling all exceptions?

jpobst commented 3 years ago

Looking at the place where it is thrown, it definitely isn't thrown like I would expect. My random guess is that this mechanism of throwing has an issue with first chance exceptions?

public static unsafe JniObjectReference CallStaticObjectMethod (JniObjectReference type, JniMethodInfo method)
{
    if (!type.IsValid)
        throw new ArgumentException ("Handle must be valid.", "type");
    if (method == null)
        throw new ArgumentNullException ("method");
    if (!method.IsValid)
        throw new ArgumentException ("Handle value is not valid.", "method");
    System.Diagnostics.Debug.Assert (method.IsStatic);

    var __info = JniEnvironment.CurrentInfo;
    var tmp = __info.Invoker.CallStaticObjectMethod (__info.EnvironmentPointer, type.SafeHandle, method.ID);

    Exception __e = JniEnvironment.GetExceptionForLastThrowable ();
    if (__e != null)
        ExceptionDispatchInfo.Capture (__e).Throw ();   // <-- Thrown here, instead of `throw new RuntimeException`

    JniEnvironment.LogCreateLocalRef (tmp);
    return new JniObjectReference (tmp, JniObjectReferenceType.Local);
}

I'll ask around and see if anyone knows more.

jonpryor commented 3 years ago

Possibly related?

The short version is that exception handling is a bit "weird", primarily because when an exception is thrown, it's not really possible for Xamarin.Android to participate in the "normal" two-pass "is this exception handled" algorithm that the debugger expects. Thus, either all exceptions are "not handled" -- which is why you're seeing so many first chance exceptions in the IDE -- or all exceptions are handled, which means there would never be a first-chance exception.

I have no good suggestions for workarounds. I can only hope that eventually we'll be able to make things work "better."

mfeingol commented 3 years ago

Thanks, @jonpryor.

Oddly those links gave me a workaround hint: disable System.Exception in Exception Settings and the debugger no longer breaks when the Java.Lang.Runtime exception is thrown. Kind of odd, but there you go.

So I guess the remaining question is... what is my app, which has nothing to do with sans-serif, doing to trigger these exceptions during Xamarin.Forms bootup?

jsuarezruiz commented 3 years ago

@mfeingol Could you attach a sample where reproduce your same exception?

mfeingol commented 3 years ago

@jsuarezruiz: I can't, but I can give you access to my project on GitHub if you want to reproduce it there.

mfeingol commented 3 years ago

@jsuarezruiz: let me know.

Redth commented 3 years ago

Please, if you can give @jsuarezruiz access to the repo and let us know here when you do, thanks.

mfeingol commented 3 years ago

@Redth, @jsuarezruiz: invite sent.

PureWeen commented 3 years ago

@mfeingol I'm guessing you have a shell app

Shell by default uses "sans-serif" for the text on the BottomNav I don't have any historical context as to why it does or if that's correct though :-/

mfeingol commented 3 years ago

@PureWeen: interesting guess, but no, I'm not using shell. I'm using FlyoutPage because I need to use tabs in inner navigation pages.

PureWeen commented 3 years ago

It looks like it's anything that uses bottom tabs

https://github.com/xamarin/Xamarin.Forms/blob/80a4dbfb1cd897f478c38d0aafa6a5d67940d2f3/Xamarin.Forms.Platform.Android/Renderers/BottomNavigationViewUtils.cs#L176

Shell and BottomTabs use the same implementation on android

mfeingol commented 3 years ago

I'm using TabbedPage, for what it's worth. But using tabs at the top, not the bottom.

bwinklesky commented 2 years ago

Bumping this issue.

rysbilinski commented 2 years ago

Also bumping. Workaround of disabling System.Exception works

EmilAlipiev commented 1 year ago

is that error still available in Maui? XF latest version at least has it

mfeingol commented 1 year ago

I haven't seen it in Maui. XF definitely still has it.

bricefriha commented 1 year ago

Any update on this issue?

Jacksenss commented 8 months ago

any progress on this issue?