-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Bottom Tabs throws a Java.Lang.RuntimeException: 'Font asset not found sans-serif' as a FirstChanceException #13601
Comments
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. |
@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? |
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?
I'll ask around and see if anyone knows more. |
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." |
Thanks, @jonpryor. Oddly those links gave me a workaround hint: disable So I guess the remaining question is... what is my app, which has nothing to do with |
@mfeingol Could you attach a sample where reproduce your same exception? |
@jsuarezruiz: I can't, but I can give you access to my project on GitHub if you want to reproduce it there. |
@jsuarezruiz: let me know. |
Please, if you can give @jsuarezruiz access to the repo and let us know here when you do, thanks. |
@Redth, @jsuarezruiz: invite sent. |
@mfeingol I'm guessing you have a shell app Shell by default uses "sans-serif" for the text on the BottomNav |
@PureWeen: interesting guess, but no, I'm not using shell. I'm using FlyoutPage because I need to use tabs in inner navigation pages. |
It looks like it's anything that uses bottom tabs Xamarin.Forms/Xamarin.Forms.Platform.Android/Renderers/BottomNavigationViewUtils.cs Line 176 in 80a4dbf
Shell and BottomTabs use the same implementation on android |
I'm using TabbedPage, for what it's worth. But using tabs at the top, not the bottom. |
Bumping this issue. |
Also bumping. Workaround of disabling System.Exception works |
is that error still available in Maui? XF latest version at least has it |
I haven't seen it in Maui. XF definitely still has it. |
Any update on this issue? |
any progress on this issue? |
Steps to Reproduce
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:
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.
The exception is thrown 12 times at startup, even though my app doesn't reference a sans-serif font at all. In order:
... with the following stack trace:
... and then:
... with the following stack trace:
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@ebe9000
SQLite: xamarin/sqlite@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?
The text was updated successfully, but these errors were encountered: