Xamarin Strange exception in VS2015

I am developing an APP that interacts with BLE devices. everything works fine, so there is a fare, but when I switch several times from activity, I get an exception:

01-26 09: 06: 43.040 I / Timeline (7341): Dates: Activity_launch_request id: BLEAPPtime: 710885426 Link to the object does not establish an instance of the object. System.NullReferenceException: The reference object is not set to an instance of the object. in Xamarin.VisualStudio.Debugger.AD7DebugExceptionEvent..ctor (Thread thread, line description) in C: \ Users \ builder \ Data \ lanes \ 2599 \ 1390b70a \ Source \ XamarinVS \ Src \ Kernel \ VisualStudio \ Debugging \ MonoTools.Engine \ AD7Events.cs: lines 433 on Xamarin.VisualStudio.Debugger.ExceptionsAdapter.OnUnhandledException (Sender Object, TargetEventArgs args) in C: \ Users \ builder \ Data \ lanes \ 2599 \ 1390b70a \ Source \ XamarinVS \ Src \ Core \ VisualStudio \ Debging \ MonoTools.Engine \ ExceptionsAdapter.cs: lines 67 on Mono.Debugging.Client.DebuggerSession.OnTargetEvent (TargetEventArgs args) in Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet (Event [] es, Boolean dequeuing) with Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet (EventSet es) in Mono.Debugging.Soft.SoftDebuggerSession.EventHandler () Thread done: # 6 Thread '' (0x6) exited with code 0 (0x0).

I don’t know where it came from, if I debug every single step, until my activity ends in the last bracket of the code, then I will get this strange exception.

Does anyone know how to debug this? or about it bug.

https://bugzilla.xamarin.com/show_bug.cgi?id=38122

+4
source share
2 answers

After hours and days, I found a problem! the problem was that my application took a long time to complete the hes task, so I wrapped it in a background job

new Task (() => 
{ 
   //Your code here... 

}).Start();

Therefore, keep in mind that you need to connect long executable tasks, even if it is not so long! `

+2
source

I have exactly the same problem here, you can see the captures:

FirstError Screen

SecondError Screen

, BLE Xamarin.Android.

, ,

RangeNotifier_DidRangeBeaconsInRegionComplete/ MonitorNotifier_EnterRegionComplete MonitorNotifier_ExitRegionComplete

, , , , .

, DidRangeBeaconsInRegionComplete ​​ , , , , .

, , , , , , , , .

:

, , , !

+2

Source: https://habr.com/ru/post/1625977/


All Articles