weixin_39745724
weixin_39745724
2021-01-03 07:28

Building App with VS 16.2 (Win) with Xamarin iOS 12.14.0.110 makes the app freeze (without visible crash)

After one of our VS's for Mac spontaneously updated to 8.2, we had to update our it's "partner" VS Win to 16.2, and after that, the Win VS can not be used to debug anymore as the App will eventually freeze (and sometimes but rarely crash the debugger). Or maybe it's the debugger freezing the App, can't be sure.

Any help/suggestions appreciated.

Steps to Reproduce

  1. Build App in Visual Studio Windows 16.2 (Xamarin iOS 12.14.0.110)
  2. Run App
  3. Use App until it freezes (no crash)

Expected Behavior

Application should continue to run, and actually does so in VS Mac 8.1.4 (Xamarin iOS 12.10.0.157), VS Mac 8.2 (12.14.0.110)and VS Win 16.1.6 (Xamarin.iOS 12.10.0.157)

Actual Behavior

After a few seconds of App use, it frezes and will not do anything. If "lucky" we get a crash popup like these:

Xamarin_Fail Xamarin_Fail_02 Xamarin_Fail_03

but for the most part, all we get is :

Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject|Information|0|Beginning build for C:\Users\Nuno\source\repos\JanusAppvs\JanusApp\JanusApp.csproj. Properties: DeviceSpecificBuild: false, TargetiOSDevice: , ServerPort: 52079, ServerUser: cavedigital, ContinueOnDisconnected: False, ServerAddress: 192.168.96.16 Xamarin.VisualStudio.Progress.ProgressReportService|Information|0|Starting Simulator to launch App... Xamarin.VisualStudio.Progress.ProgressReportService|Information|0|The Simulator has been started to launch App... System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs12860Nuno - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs12860Nuno - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs12860Nuno - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs12860Nuno - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive Xamarin.VisualStudio.IOS.XamarinIOSPackage|Error|0|Error in soft debugger method call thread on method String System.ArgumentException:get_Message () on object System.ArgumentException Mono.Debugger.Soft.ObjectCollectedException: The requested operation cannot be completed because the object has been garbage collected. at Mono.Debugger.Soft.VirtualMachine.ErrorHandler(Object sender, ErrorHandlerEventArgs args) in E:\A_work\3253\s\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft\VirtualMachine.cs:line 338 at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet) in E:\A_work\3253\s\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft\Connection.cs:line 1562 at Mono.Debugger.Soft.Connection.Object_GetInfo(Int64 id) in E:\A_work\3253\s\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft\Connection.cs:line 2536 at Mono.Debugger.Soft.VirtualMachine.GetObjectT in E:\A_work\3253\s\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft\VirtualMachine.cs:line 526 at Mono.Debugger.Soft.VirtualMachine.DecodeValue(ValueImpl v, Dictionary`2 parent_vtypes) in E:\A_work\3253\s\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft\VirtualMachine.cs:line 629 at Mono.Debugger.Soft.ObjectMirror.EndInvokeMethodInternalWithResult(IAsyncResult asyncResult) in E:\A_work\3253\s\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft\ObjectMirror.cs:line 367 at Mono.Debugging.Soft.MethodCall.EndInvoke() in E:\A_work\3253\s\external\debugger-libs\Mono.Debugging.Soft\SoftDebuggerAdaptor.cs:line 2811 Xamarin.VisualStudio.IOS.XamarinIOSPackage|Information|0|Aborting invocation of method String System.ArgumentException:get_Message () on object System.ArgumentException

and "Xamarin.VisualStudio.IOS.XamarinIOSPackage|Information|0|Aborting invocation of method String System.ArgumentException:get_Message () on object System.ArgumentException" will keep coming util we kill the App.

Oddly enough, sometimes that line will be "Xamarin.VisualStudio.Android.XamarinIOSPackage|Information|0|Aborting invocation of method String System.ArgumentException:get_Message () on object System.ArgumentException" despite the fact that our project is iOS only...

Environment

Microsoft Visual Studio Enterprise 2019 Version 16.2.0 VisualStudio.16.Release/16.2.0+29123.88 Microsoft .NET Framework Version 4.7.03190

Installed Version: Enterprise

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

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

Application Insights Tools for Visual Studio Package 9.1.00611.1 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2019 16.2.290.48383 ASP.NET and Web Tools 2019

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

Azure App Service Tools v3.0.0 16.2.290.48383 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.3.9000.0 Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 16.2.290.48383 Azure Functions and Web Jobs Tools

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

C# Tools 3.2.0-beta4-19359-03+15b43b33901c88f68ef43f8314b5a2457716780d 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.

Cookiecutter 16.2.19178.1 Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Extensibility Message Bus 1.2.0 (d16-2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events

IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure HDInsight Azure Node 2.3.9000.0 HDInsight Node under Azure Node

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

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

Microsoft Azure Stream Analytics Language Service 2.3.9000.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 0x10 - v2.9.20626.2

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 1.0 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.2.6 (4cfc7c3) Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 5.2.0 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

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension 1.0 Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools 16.0.61906.28070 Microsoft SQL Server Data Tools

ToolWindowHostedEditor 1.0 Hosting json editor into a tool window

TypeScript Tools 16.0.10627.2001 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 3.2.0-beta4-19359-03+15b43b33901c88f68ef43f8314b5a2457716780d 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 10.4 for F# 4.6 16.2.0-beta.19321.1+a24d94ecf97d0d69d4fbe6b8b10cd1f97737fff4 Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in 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.Mac 1.0 Mac Extension for Visual Studio

VSColorOutput 2.6.5 Color output for build and debug windows - http://mike-ward.net/vscoloroutput

Xamarin 16.2.0.90 (d16-2) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.2.0.325 (remotes/origin/d16-2) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 16.3.117 (59a59e8) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.iOS and Xamarin.Mac SDK 12.14.0.110 (a8bcecc) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

VS bug #956977

该提问来源于开源项目:xamarin/xamarin-macios

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

11条回答

  • weixin_39745724 weixin_39745724 4月前

    Well, things have taken a turn for the worse now :( Because of XCode 11 i HAD to update, and guess what, 16.3(.2) is still doing it. Both VS Win, VS Mac, Mono and Xamarin updated to the latest versions, still same "debug freezes/crashes" on the Win side of things, but now VS Mac doesn't break at breakpoints, it breaks "close to the breakpoint" but not "at the breakpoint"... Great fun catching null references and the like when you can't break into the code.

    If i just build>deploy, all works well, but debug just doesn't work. Even tried to build from a clean Win10+VS 2019 CE, but same result, app starts then freezes at some random point.

    Some more dumps:

    Xamarin_error_01 Xamarin_error_01_2019-10-02_10-38-12.4656.Ide.log Xamarin_error_01_2019-10-02_10-42-56.4804.Ide.log

    点赞 评论 复制链接分享
  • weixin_39661780 weixin_39661780 4月前

    Hi! This should be fixed in 16.4. Can you try and confirm? Thanks! J

    点赞 评论 复制链接分享
  • weixin_39745724 weixin_39745724 4月前

    Tried. With 16.4 debugging in simulator is now working properly, no freezes or crashes. Debugging in a real device results in "Terminated" (not the app, the "debugger link") at random times, no pattern. And the real showstopper is that now we can't build release versions, as LD will go about it's work and 2h later is still using 100% cpu and not finished, when the full build/package cycle takes ~6m in 16.1.16.

    Quite honestly, 16.2+is a total mess, and the rollbacks are too time consuming to be reasonable when you're trying to push a product out the door. Sticking to 16.1.16 as long as we can, and scrapping Xamarin for any future projects, easier to learn Swift AND Java than to constantly deal with instability in your development framework.

    点赞 评论 复制链接分享
  • weixin_39661780 weixin_39661780 4月前

    Hi! So your first paragraph, is that all 16.4? Meaning, packaging is hanging there for you? Thanks! J

    点赞 评论 复制链接分享
  • weixin_39745724 weixin_39745724 4月前

    Yes. 16.(2/3) never managed to last long enough without freezing that we could even think about building a release... Anyway, just before we switched back to 16.1.16, we figured what was making LD hang. We had the building option at "arm7v+arm7vs+arm64". arm7vs makes LD hang. It can compile for the other architectures, but not that one.

    点赞 评论 复制链接分享
  • weixin_39661780 weixin_39661780 4月前

    pinging on the hang building arm7vs

    点赞 评论 复制链接分享
  • weixin_39980347 weixin_39980347 4月前

    arm7vs builds hanging is very very likely https://github.com/xamarin/xamarin-macios/issues/6787

    You can read the issue for details, but your application has grown too big for Apple's 32-bit tooling to handle.

    点赞 评论 复制链接分享
  • weixin_39538693 weixin_39538693 4月前

    Is this still happening? How we can try to reproduce? Or should we close this?

    点赞 评论 复制链接分享
  • weixin_39745724 weixin_39745724 4月前

    My bad, 16.4 fixed it to the point of being usable, so guess it's closed ;)

    点赞 评论 复制链接分享
  • weixin_39980347 weixin_39980347 4月前

    I've sync'ed in our VS team on to this issue, but it may be difficult to track this down without a sample showing the problem.

    点赞 评论 复制链接分享
  • weixin_39745724 weixin_39745724 4月前

    Sadly, there's not even a point in the App where it happens, it's just "oh, it happened again" so we can't pinpoint it. Because of the App's nature, we have heavy duty logging, to console, to files and even over the network, and there's nothing consistent in there. I'm in the process of finishing a component that can execute commands in the App, so i'll know whether it's actually dead or "just visually frozen". If i fnd anything "interesting" i'll update here.

    点赞 评论 复制链接分享

相关推荐