Hello all,
> > Hi guys,
> >
> > I traced a bug that keeps showing the sign in window also when
> > doing
> > other
> > things...
> > the bug is caused by line 390 of the handleServerCommand in
> > MsnServerHandler.cpp:
> >
> > 389 }catch(const NetworkException &netEx){
> > 390 //
> > Common::msnSingInWindowMessenger.SendMessage(MSN_SIGNIN_FAILED);
> > 391 netEx.fprint(Common::log_file);
> > 392 int error = netEx.getError();
> > 393 if ((error == ECONNRESET) // Connection reset by
> > peer
> > 394 || (error == ENOTCONN) // Not connected
> > 395 || (error == -2147459072)){ // Bad file descriptor
> > 396 logoff();
> > 397 }
> > 398 }
> >
> > I commented out this line...and no sign in window gets shown at
> > weird
> > moments...commenting out wouldn't be the solution...and as I do not
> > entirely
> > understand the code, maybe you (Daniel) can squash this bug,
>
Yes, that line does not belong there, I copy those lines from the
authentification code and forgot to remove the line.
> Well discovered.
>
> I looked in the log, there are a lot of:
> "Exception thrown: ERROR while receiving message: Interrupted system
> call - 8000000A"
>
> I think this is probably caused when a message is sent by a socket
> that
> is currently waiting to receive data. The receive operation would
> have
> to be stopped, probably throwing an exception.
>
> Daniel? :D
>
You are right Simon, that is the cause of the exception.
The receiving thread will block on Receive and when you send something
the call will be interrupted causing an error.
I didn't notice this because, before I uploaded to CVS I was validating
that there was data pending to be received. Good thing I changed that,
otherwise we wouldn't find the bug, that line should not be there.
Before the changes the thread blocked on receive just like it does now,
but then it did not throw exceptions, just returned false.
Apart from this issue, have you found any other problems with the new
code? Last time Bme crash after I left it connected for the whole day,
I couldn't identify what caused the problem, if it was a particular
command, or if after a long while the MsnBuffer gets messed up.
Regards,
Daniel
|