App Crash instantly without exception or log (seems like xamarin/mono bug)

EminKokalariEminKokalari USMember ✭✭

It's a weird situation here :) , I have implemented this code in my fragment to scan TCP Ports in multithread environment , it crash when debugging , and sometimes crash in release mode too with thoose messages :

E/art (12972): Nested signal detected - original signal being reported

F/art (12972): art/runtime/fault_handler.cc:117] Check failed: !initialized_

tried to set Target Android to 23 that didn’t work.

tried running adb shell setprop debug.mono.env
MONO_DEBUG=soft-breakpoints that didn’t work.

tried to compile using different Android API's Versions
ANY IDEA WHY IS THIS HAPPENING ??

HERE IS MY CODE:

public void start()
{
    for (int i = 0; i < 50; i++)
    {
        Task.Run(() => RunScanTcp());
        //ThreadPool.QueueUserWorkItem(RunScanTcp);
        //Thread thread = new Thread(new ThreadStart(RunScanTcp));
        //thread.Start();
    }
}


public void RunScanTcp()
{
    while (abort != true)
    {
            port = port + 1;
            Log.Info("PORT SCANNER", port.ToString());
    }
}

Im compiling using :

Android Version (Android 7.1 Nougat)

Minimum Android Version :

Android 4.1 (API Level 16 - Jelly Bean)

Target Android Version:

Compile Using SDK Version

NOTE:

The code is working very fine without any error or crash when the phone that I'm testing the app is debugging', it happen when I open the app inrelease configurationor when it isnot connected in debugger`
UPDATE :

After Visual Studio Update 15.2 (26430.12) , and Xamarin 4.5.0.476 - 30/05/2017(dd/mm/yyyy) the application crashed while is connected to debugger too...

Here is the debugger output :
referenceTable GDEF length=814 1
referenceTable GSUB length=11364 1
referenceTable GPOS length=47302 1
referenceTable head length=54 1
referenceTable GDEF length=428 1
referenceTable GSUB length=2302 1
referenceTable GPOS length=43252 1
referenceTable head length=54 1
referenceTable GDEF length=808 1
referenceTable GSUB length=11364 1
referenceTable GPOS length=49128 1
referenceTable head length=54 1
referenceTable GDEF length=808 1
referenceTable GSUB length=11364 1
referenceTable GPOS length=47320 1
referenceTable head length=54 1
05-31 04:31:51.590 F/art (17427): art/runtime/fault_handler.cc:117] Check failed: !initialized_

Thank's All of you ...

Answers

  • kentuckerkentucker USMember ✭✭✭✭✭

    You need code to limit the size of port. I just see you keep adding to it. It will eventually port will be larger than the data type accepts.

  • EminKokalariEminKokalari USMember ✭✭

    The problem is not with the port .... It crash without starting incrementing the port number. Anyway thanks , but it is solved in the last update.

Sign In or Register to comment.