Re: current->source == ¤t_source_link
"Walter C. Pelissero" <[email protected]> Thu, 28 Feb 2008 20:24:20 +0100
| Newsgroups | gmane.lisp.clg.devel |
|---|---|
| Message-ID | <[email protected]> |
Espen S Johnsen writes: > "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'll try to isolate this code a bit more and then I'll bother you again. Not right now, though. > > 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. In the meanwhile I switched to SBCL, this far, it hasn't shown any of the problems I've described before. > > 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. ~ $ sbcl This is SBCL 1.0.11.5, an implementation of ANSI Common Lisp. More information about SBCL is available at <http://www.sbcl.org/>. SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. ; in: DEFCONSTANT-UNEQL #'(LAMBDA (C) (INVOKE-RESTART 'CONTINUE)) ; #'(LAMBDA (C) (INVOKE-RESTART 'CONTINUE)) ; ; caught STYLE-WARNING: ; The variable C is defined but never used. ; ; compilation unit finished ; caught 1 STYLE-WARNING condition * (asdf:oos 'asdf:load-op :gtk) ; loading system definition from /home/wcp/lisp/clg/systems/gtk.asd into ; #<PACKAGE "ASDF0"> ; loading system definition from /home/wcp/lisp/clg/systems/clg-tools.asd into ; #<PACKAGE "ASDF1"> ; registering #<SYSTEM CLG-TOOLS {59BE5B59}> as CLG-TOOLS ; loading system definition from /usr/local/lib/sbcl/sb-posix/sb-posix.asd into ; #<PACKAGE "ASDF1"> ; loading system definition from /usr/local/lib/sbcl/sb-grovel/sb-grovel.asd ; into #<PACKAGE "ASDF2"> ; registering #<SYSTEM SB-GROVEL {59EFBA11}> as SB-GROVEL ; registering #<SYSTEM SB-POSIX {59F60B29}> as SB-POSIX ; registering #<SYSTEM SB-POSIX-TESTS {5A08E1A9}> as SB-POSIX-TESTS STYLE-WARNING: Couldn't grovel for SIGPWR (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for SIGRTMIN (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for SIGRTMAX (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ECHRNG (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EL2NSYNC (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EL3HLT (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EL3RST (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ELNRNG (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EUNATCH (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOCSI (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EL2HLT (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EBADE (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EBADR (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EXFULL (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOANO (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EBADRQC (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EBADSLT (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EDEADLOCK (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EBFONT (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOSTR (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENODATA (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ETIME (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOSR (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENONET (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOPKG (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EADV (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ESRMNT (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ECOMM (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EDOTDOT (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOTUNIQ (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EBADFD (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EREMCHG (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ELIBACC (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ELIBBAD (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ELIBSCN (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ELIBMAX (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ELIBEXEC (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ERESTART (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ESTRPIPE (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EUCLEAN (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOTNAM (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENAVAIL (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EREMOTEIO (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for ENOMEDIUM (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for EMEDIUMTYPE (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for O_DIRECTORY (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for O_LARGEFILE (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for O_DSYNC (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for O_RSYNC (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for OFILL (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for NLDLY (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for NL0 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for NL1 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for CRDLY (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for CR0 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for CR1 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for CR2 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for CR3 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for TABDLY (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for TAB0 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for TAB1 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for TAB2 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for TAB3 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for BSDLY (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for BS0 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for BS1 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for VTDLY (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for VT0 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for VT1 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for FFDLY (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for FF0 (unknown to the C compiler). STYLE-WARNING: Couldn't grovel for FF1 (unknown to the C compiler). STYLE-WARNING: Didn't find definition for "fdatasync" STYLE-WARNING: Didn't find definition for "setfsuid" STYLE-WARNING: Didn't find definition for "setfsgid" ; registering #<SYSTEM GTK {5A391749}> as GTK ; loading system definition from /home/wcp/lisp/clg/systems/atk.asd into ; #<PACKAGE "ASDF0"> ; registering #<SYSTEM ATK {59A9EF09}> as ATK ; loading system definition from /home/wcp/lisp/clg/systems/gdk.asd into ; #<PACKAGE "ASDF0"> ; registering #<SYSTEM GDK {59C2ED01}> as GDK ; loading system definition from /home/wcp/lisp/clg/systems/cairo.asd into ; #<PACKAGE "ASDF0"> ; registering #<SYSTEM CAIRO {59E0C1A9}> as CAIRO ; loading system definition from /home/wcp/lisp/clg/systems/glib.asd into ; #<PACKAGE "ASDF0"> ; loading system definition from /home/wcp/lisp/clg/systems/gffi.asd into ; #<PACKAGE "ASDF1"> ; registering #<SYSTEM GFFI {5A036421}> as GFFI ; registering #<SYSTEM GLIB {59B50291}> as GLIB ; loading system definition from /home/wcp/lisp/clg/systems/pango.asd into ; #<PACKAGE "ASDF0"> ; registering #<SYSTEM PANGO {59DA0391}> as PANGO ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* (SIGNED 32))) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; (SIGNED ; 32))>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure STYLE-WARNING: implicitly creating new generic function VALIDATE-SUPERCLASS ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* (SIGNED 32))) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; (SIGNED ; 32))>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure STYLE-WARNING: implicitly creating new generic function VALIDATE-SUPERCLASS STYLE-WARNING: implicitly creating new generic function (SETF TREE-MODEL-VALUE) STYLE-WARNING: redefining (SETF TREE-MODEL-VALUE) in DEFGENERIC ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* (SIGNED 32))) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; (SIGNED ; 32))>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* (SIGNED 32))) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; (SIGNED ; 32))>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* (SIGNED 32))) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; (SIGNED ; 32))>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* (SIGNED 32))) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; (SIGNED ; 32))>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* (SIGNED 32))) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; (SIGNED ; 32))>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure STYLE-WARNING: redefining (SETF IMAGE-MENU-ITEM-IMAGE) (#<BUILT-IN-CLASS T> #<GOBJECT-CLASS IMAGE-MENU-ITEM>) in DEFMETHOD ; in: LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) ; (SAP-ALIEN SB-ALIEN::RES-SAP (* SYSTEM-AREA-POINTER)) ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN SB-ALIEN::RES-SAP ; '#<SB-ALIEN-INTERNALS:ALIEN-POINTER-TYPE (* ; SYSTEM-AREA-POINTER)>) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure ; ; compilation unit finished ; printed 8 notes NIL * (gtk:adjustment-new 0 0 100 10 30 0) debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" {596DC781}>: The value 0 is not of type DOUBLE-FLOAT. restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level. (NIL 0) source: ; file: /home/wcp/lisp/clg/gtk/gtktypes.lisp error finding source: SB-INT:SIMPLE-READER-ERROR at 6241 (line 227, column 6) on #<SB-SYS:FD-STREAM for "file /home/wcp/lisp/clg/gtk/gtktypes.lisp" {5989F179}>: no dispatch function defined for #\? 0] -- walter pelissero http://www.pelissero.de ------------------------------------------------------------------------- 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/