[Sugar-devel] Findings for Register Bug LP #617813

Bernie Innocenti bernie at codewiz.org
Wed Sep 1 17:55:03 EDT 2010

(let's always cc sugar-devel@ when we discuss sugar bugs, so the rest of
the Sugar development community can jump in with better suggestions than

El Thu, 02-09-2010 a las 00:45 +0530, Dipankar Patro escribió:
> Hello Bernie,
> Following are the findings and plan of action for the LP Bug : #617813
> Problem : Sugar freezes when we try to register on emulator
> Findings:
> We think that sugar is not handling the inaccessible sites/servers
> properly.
> The current code just checks for regular errors. It doesn't have
> provisions for long time lags.
> This can easily be rectified a small code to stop register procedure
> if the time elapsed is more than allowed lag time.
> Plan of action:
> Add the required snippet in
> /usr/share/pyshared/jarabe/desktop/schoolserver.py
> at
> line 100
> somewhat similar to
> if (t>45 seconds), a message
> Wish if you could provide some pointers on this.

The problem is that schoolserver registration code uses blocking I/O.
There's no way you can test for a timeout, because your code will not be
executed while the network operation is going on.

GUI applications cannot generally use blocking networking operations
like that. In order to fix this bug, this code should be rewritten using
asynchronous callbacks.

The good news is that somone already proposed a solution for this
problem a very time ago: http://bugs.sugarlabs.org/ticket/1152

The bad news is that this patch was written for Sugar 0.82 and it will
probably need some adaptation.

Hope this helps,

   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/

More information about the Sugar-devel mailing list