Why is my debugger not working properly on Android?

PetiPeti Member ✭✭

Hello all, I have a strange situation where the debugger is causing my app to fail when running Android.

The UI will freeze, the background threads stop working and eventually I'm asked if I want to wait or to quit the App. If I run the App without the debugger attached - it works perfectly.

I've had similar problems in the past in iOS where breakpoints wouldn't work - but nothing quite like this.

I'm currently running my app on Xamarin.Forms 3.6.0.539, but was using 3.0. As best I can see using 4.1 didn't help either.

I have a feeling I did get a slightly newer version of VS2019 and Xamarin.Forms within the last week, but I am not 100% certain.

I'm pretty sure this is the last thing in the Output as it dies:

"Thread Pool Worker"
"Timer-Scheduler" at <0xffffffff>
at (wrapper managed-to-native) System.Threading.WaitHandle.Wait_internal (intptr*,int,bool,int) <0x00047>
at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle,uint,bool,bool) [0x0001f] in :0
at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle,long,bool,bool) [0x00019] in :0
at System.Threading.WaitHandle.WaitOne (long,bool) [0x00010] in :0
at System.Threading.WaitHandle.WaitOne (int,bool) [0x0001d] in :0
at System.Threading.WaitHandle.WaitOne (int) [0x00003] in :0
at System.Threading.Timer/Scheduler.SchedulerThread () [0x00043] in :0
at System.Threading.ThreadHelper.ThreadStart_Context (object) [0x0001f] in :0
at System.
Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00073] in :0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00004] in :0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x0002f] in :0
at System.Threading.ThreadHelper.ThreadStart () [0x00014] in :0
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00061] in :008-01 16:26:15.753 E/mono (28482): Full thread dump:

Sadly this doesn't really help me much.

In addition:

Microsoft Visual Studio Professional 2019
Version 16.2.0
VisualStudio.16.Release/16.2.0+29123.88
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Professional

Xamarin 16.2.0.90 ([email protected])
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.2.0.325 (remotes/origin/[email protected])
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.Android SDK 9.4.0.51 (d16-2/9fa7775)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: mono/mono/[email protected]
Java.Interop: xamarin/java.interop/[email protected]
LibZipSharp: grendello/LibZipSharp/[email protected]
LibZip: nih-at/libzip/[email protected]
ProGuard: xamarin/proguard/[email protected]
SQLite: xamarin/sqlite/[email protected]
Xamarin.Android Tools: xamarin/xamarin-android-tools/[email protected]

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

Best Answer

  • PetiPeti ✭✭
    Accepted Answer

    I found I was only able to resolve the problem by downgrading my VS2019 to 16.0.6 from 16.2.

    It was a frustrating problem as the debugging would work at first, then the app would freeze completely.

Answers

  • PetiPeti Member ✭✭
    Accepted Answer

    I found I was only able to resolve the problem by downgrading my VS2019 to 16.0.6 from 16.2.

    It was a frustrating problem as the debugging would work at first, then the app would freeze completely.

  • Pedro_MonizPedro_Moniz Member ✭✭

    I am having the same issue, someone from xamarin should take a look into this issue.

    I had to go into debug and run the application "slowly" or else the thread worker would stop working.

  • PetiPeti Member ✭✭

    @Pedro_Moniz - perhaps the very latest VS2019 works better. I'm sticking with the version I have for the moment.

  • Pedro_MonizPedro_Moniz Member ✭✭
    edited September 11

    I am using xamarin.android and no, they have not done anything related to the issue.

    I will just go back because I need to have the app ready for production and then its good bye xamarin, no more of your dumb problems. Cannot develop an app with issues like this even becoming a thing.

Sign In or Register to comment.