Re: current->source == &current_source_link

Espen S Johnsen <[email protected]> 28 Feb 2008 19:34:35 +0100
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
"Walter C. Pelissero" <[email protected]> writes:

> This simplified function updates an horizontal scale once a second
> based on a value received from another program via a socket.  It also
> remotely modifies the same value if the user slides the cursor.  The
> updater runs in background as a "timeout" function invoked by GTK.
> 
> The problem with it is that after some user activity, I haven't been
> able to identify with certainty (I just move the cursor about), I
> receive an error of failed assertion in gmain.c.  Sometimes, before
> that, the update function (the one going "tick") stops being invoked
> and then, more user interaction will cause the error.
> 
> I haven't been able to reproduce the error without calling the
> SOME-REMOTE-VALUE function, which does a bit of socket I/O.  Maybe
> it's got something to do with that.
> 
> Has anyone else seen this error before?
> What am I doing wrong?

The code looks ok, but without knowing what SOME-REMOTE-VALUE looks like
it would be extremely hard to tell what is going on.

> I haven't been able to reproduce the error on SBCL yet but, noticing
> that the behaviour of the scale is much more jerky, I'd suspect the
> main loop might be quite different under SBCL.

This is probably caused by the hackish way asynchronous event handling
is done in SBCL currently, but the old (pre 1.0.6) behavior should be
back real soon now.

> By the way.  CMUCL doesn't seem to need all those explicit casts to
> double float I had to put in this sample code.  I'm wondering if it
> couldn't be made like that also under SBCL.

That is very strange. The behavior should be exactly the same in both
CMUCL and SBCL.

-- 
Espen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/