-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random crashes running the application #5241
Comments
Other threads
|
Other threads
|
Other threads
|
Thanks for the report. One first suspicion is that this might be an appearance of dotnet/java-interop#719. If you can reproduce the problem fairly consistently in your local environment, you can check if adding the draft Xamarin.Android.Build.Tasks.AddKeepAlives NuGet package to your project resolves the issue. The steps to use it are:
The source code for the NuGet package can be browsed in: https://github.com/brendanzagaeski/xamarin-android/tree/addkeepalives/src/Xamarin.Android.Build.Tasks.AddKeepAlives. The plan is that this functionality will be integrated into the linker in a future version of Xamarin.Android to make it easier to enable. If this NuGet package does not resolve the issue, let me know. In that case, the next best step will be to collect the detailed gref logs. I can provide some additional guidance on that if the issue still happens when using the NuGet package. |
Other threads
|
Didn't work for me, but - I probably need to update Mapsui with this package as well, am I right? |
I tried using the package - didn't work. Then tried to downgrade to Xamarin.Android 10 and downgrade all packages to pre-summer versions, again, didn't work. I also tried using older alpha version of our application (from August), which I believe worked properly, together with both Xam.Android 10 and 11 and it still crashes. |
Thanks for testing! The NuGet package should in theory rewrite all of the local copies of the dependencies of the app, so it wouldn't be necessary to rebuild the Mapsui package separately. But I did just realize that I forgot to mention at least one an important instruction. The NuGet package will only work if the managed linker (Linking in the Android Options section of the Visual Studio project property pages) is enabled. In other words, the Xamarin.Android.Build.Tasks.AddKeepAlives NuGet package is mostly intended for use in the Release configuration. If the managed linker was already enabled in your initial tests, or if the NuGet package still doesn't resolve the issue with that setting enabled, here are the next pieces of information to collect:
|
We disabled linking long time ago, because it caused our app to crash with MvvmCross. I will try, if it possibly helps. |
Sounds good. At least for testing purposes, there are a couple approaches that will allow testing the NuGet package even if it turns out that it's not possible to enable the managed linker for that configuration. I'll start setting up one of those as a backup plan. I think in the past, I've seen some projects using MvvmCross where they required a few custom linker preserve rules to make them work with the managed linker enabled, so I might be able to help out with some quick suggestions there too. |
Sounds like another long night of trying. About Mvx - Yes, I've seen several stackoverflow threads about that problem, but the no-linking option worked for us until now. |
That's interesting. Usually the "Failed to resolve" message from the linker would mean that the Mapsui library was built against a different version of the BruTile library than the one currently referenced by the app. The guess would be that the I'll keep setting up the backup approach for use without the managed linker. I should have that info ready fairly soon. |
Mapsui.Pds.Extensions uses earlier version of BruTile I see - so bumping it up to similar version as Mapsui could work? |
Yes, hopefully that would resolve that first linker error anyway 🙂 |
Sadly it didn't work, now it can't resolve MbTilesType type. |
Whoops. I forgot that I had already set up the Xamarin.Android.Build.Tasks.AddKeepAlives NuGet package to work regardless of whether the managed linker is enabled or disabled. So that NuGet package should be rewriting the assemblies even when the managed linker is disabled, as long it is indeed running during the build. That means you can now go back to disabling the managed linker as it was originally and then completing the other data gathering steps to collect the diagnostic MSBuild output and detailed gref logs. If you like, feel free to attach the diagnostic MSBuild output first before trying the gref log steps. I can check that output to see if the Thanks in advance! |
That was my only hope! :( I will send you those logs asap. |
I just realized some of it would be in the Czech language, let me know if it's impossible for you to understand the context and I will reinstall VS2019 in English. But most of Android build info should be in English. |
Excellent. Thanks for the additional log files. It looks like the NuGet package might have stopped one cause of the error but that another cause of the problem is still present. From the attached log files
I'll discuss this with the team to figure out the next steps for the investigation. |
Thank you very much, I really hope you can find a solution to this soon. What bothers me - why downgrading to older Xamarin.Android 10 and older NuGet packages does not solve this - it was definitely stable back in August or at least in June/July. |
Could you please try Xamarin.Android 16.9 to see whether it still happens? |
Hello, |
Having a similar problem using Xamarin Forms 5.0.0.1931 The crash is happening in some code I've not changed in a long time, but this is a new problem. Problem occurs after opening and navigating away from a page several times. Could this issue be related to having too many threads concurrently? |
My team also started having this problem around Oct 2020. I've tried the steps listed here, and I've also updated to the latest xamarin.android (11.2.2.1), and updated all of the nuget packages on my android project but the crash persists. |
Hi @hajmajeboss. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you. |
Steps to Reproduce
Expected Behavior
Stable application.
Actual Behavior
Occasional crashes when changing fragments or at startup, crashes every 5 seconds when swiping Mapsui Map
Version Information
Microsoft Visual Studio Community 2019
Verze 16.7.3
VisualStudio.16.Release/16.7.3+30503.244
Microsoft .NET Framework
Verze 4.8.03752
Nainstalovaná verze: Community
Visual C++ 2019 00435-60000-00000-AA678
Microsoft Visual C++ 2019
ASP.NET and Web Tools 2019 16.7.532.28833
ASP.NET and Web Tools 2019
ASP.NET Core Razor Language Services 16.1.0.2035807+72d099b977d3a85e65fa3b0614ca8cfc803fef02
Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2019 16.7.532.28833
Další informace najdete na adrese https://www.asp.net/.
Azure App Service Tools v3.0.0 16.7.532.28833
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 16.7.532.28833
Azure Functions and Web Jobs Tools
Balíček hostitele adaptéru ladění pro Visual Studio Code 1.0
Rozložení zprostředkovatele komunikace pro hostující adaptéry ladění pro Visual Studio Code v sadě Visual Studio
Common Azure Tools 1.10
Poskytuje běžné služby, které se dají použít v Azure Mobile Services a Nástrojích Microsoft Azure.
Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
IncrediBuild Build Acceleration 1.5.0.13
IncrediBuild effectively reduces compilation and development times by up to 90%.
Line Press 13d97f3e-75e2-4715-a444-715b5f39f0a4
Control the line-height of code lines, and compress empty or any unimportant lines. Have best of both worlds, more code view with no cram.
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Zjednodušuje se konfigurace kanálů Azure DevOps ze sady Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.1
Umožňují vyvíjet, spouštět a ověřovat aplikace ASP.NET Core v cílovém prostředí. Stisknutím klávesy F5 převedete aplikaci přímo do kontejneru s laděním. Když stisknete kombinaci kláves CTRL+F5, můžete aplikaci upravit a aktualizovat bez nutnosti znovu sestavovat kontejner.
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 16.7.5 (112c7bc)
Support for debugging Mono processes with Visual Studio.
Nástroje C# 3.7.0-6.20427.1+18ede13943b0bfae1b44ef078b2f3923159bcd32
Komponenty C# použité v IDE. V závislosti na typu vašeho projektu a nastavení se může použít jiná verze kompilátoru.
Nástroje Microsoft Azure 2.9
Nástroje Microsoft Azure pro Microsoft Visual Studio 2019 – verze 2.9.30701.1
Nástroje TypeScript 16.0.20702.2001
Nástroje TypeScript pro Microsoft Visual Studio
Nástroje Visual Basicu 3.7.0-6.20427.1+18ede13943b0bfae1b44ef078b2f3923159bcd32
Komponenty Visual Basicu použité v IDE. V závislosti na typu vašeho projektu a nastavení se může použít jiná verze kompilátoru.
Node.js Tools 1.5.20701.1 Commit Hash:b0da3724234b78593207434292d9f891440edea1
Přidá podporu pro vývoj a ladění aplikací Node.js v sadě Visual Studio.
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Průvodci Microsoft Visual C++ 1.0
Průvodci Microsoft Visual C++
Rozšíření IntelliCode 1.0
Podrobné informace o rozšíření IntelliCode Visual Studio
Správce balíčků NuGet 5.7.0
Správce balíčků NuGet v sadě Visual Studio. Další informace o NuGet najdete na webu https://docs.nuget.org/.
SQL Server Data Tools 16.0.62008.03130
Microsoft SQL Server Data Tools
Visual C++ pro vývoj na různých mobilních platformách (Android) 16.0.30309.115
Visual C++ pro vývoj na různých mobilních platformách (Android)
Visual F# Tools 10.10.0.0 pro F# 4.7 16.7.0-beta.20361.3+3ef6f0b514198c0bfa6c2c09fefe41a740b024d5
Microsoft Visual F# Tools 10.10.0.0 pro F# 4.7
Visual Studio Container Tools Extensions (Preview) 1.0
Zobrazování, správa a diagnostika kontejnerů v sadě Visual Studio
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
VisualStudio.DeviceLog 1.0
Informace o balíčku
VisualStudio.Foo 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamaridea.VisualStudioPlugin 1.0
VS + Xamarin + IDEA = Love
Xamarin 16.7.000.440 (d16-7@358f3c6)
Rozšíření sady Visual Studio pro umožnění vývoje pro Xamarin.iOS a Xamarin.Android
Xamarin Designer 16.7.0.495 (remotes/origin/d16-7@79c0c522c)
Rozšíření sady Visual Studio, které v sadě Visual Studio povoluje nástroje Xamarin Designeru
Xamarin Templates 16.7.85 (1bcbbdf)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 11.0.2.0 (d16-7/025fde9)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: 83105ba
Java.Interop: xamarin/java.interop/d16-7@1f3388a
ProGuard: Guardsquare/proguard@ebe9000
SQLite: xamarin/sqlite@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-7@017078f
Xamarin.iOS and Xamarin.Mac SDK 13.20.2.2 (817b6f72a)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Log File
JNI DETECTED ERROR IN APPLICATION: use of deleted global reference 0x5746
And JNI ERROR (app bug): accessed deleted Global 0x578a
And many similar errors.
Going to post logs as I encounter these errors.
The text was updated successfully, but these errors were encountered: