FEZ Cerberus problems with 4.3

I found some issue with FEZ Cerberus.

  1. I can’t update to 4.3 a board that report itself as “version 1.1”. The other board reports “version 1.2” and works fine.
  1. I can’t use HttpListner class on 4.3. It fails after exactly 3 reply. Than it fail each subsequent reply. I get an exception in System.Http.dll (System.NullReferenceException).
    The same code works on the other boards (G400, Cobra II, Spider). The error (see image) is in library code. The error exception happens somewhare between context close and the call to GetContext().

...
            while (true)
            {
                // wait for call from client:
                try
                {
                    if (listener == null)
                    {
                        listener = new HttpListener("http", 80);
                        listener.MaximumResponseHeadersLength = 1024;                        
                        listener.Start();
                        Thread.Sleep(4000);
                        DebugPrint.Print("HttpListener created....");
                   }
                    wctx = listener.GetContext();                   
                    // got call:       
                    if (wctx == null)
                        continue;
                    if (wctx.Request == null)
                        continue;
                }
                catch (SocketException sex)
                {
                    DebugPrint.Print("EXCEPTION:" + sex.Message + "\r\nHttpListener stopped, cleared then restart it ... !");

                     continue;
                }
                // Process request
                //ProcessHttpRequest(wctx); // threaded version
                try
                {
                    //HttpContextServiceThread(wctx); // single version (don't use!)
                    DebugPrint.Print("URL: " + wctx.Request.RawUrl);
                }
                catch (Exception ex)
                {
                    DebugPrint.Print("Exception:" + ex.Message);
                }
                wctx.Close();
                wctx = null;
// Exception happen after this line but before returning on GetContex() call
           }


  1. TCP Sockets work ONLY if cerberus is in VS debug mode

Is there someone else that is facing these problems ?

EDIT: Calling

 
wctx.Response.Close() 

before


wctx.Close()

it throws a trappable exception in Microsoft.SPOT.Net.dll, not locking listener work.

@ dobova -

Hello,

I am not clear about

does it mean you have solution?

Not a real solution… but I noted that with the code explained above I get a trappable exception, so the listener continue to work.