From larry at theclapp.org Fri Apr 6 03:39:20 2007 From: larry at theclapp.org (Larry Clapp) Date: Thu, 5 Apr 2007 23:39:20 -0400 Subject: [mcclim-devel] clim-demo::demodemo fails with some kind of font problem Message-ID: <20070406033920.GB28885@santa.theclapp.org> Hello, McClimmers, I run Debian GNU/Linux, mostly "stable", some "testing". I'm using SBCL. I followed the instructions here (http://mcclim.cliki.net/GettingStarted) and got clean compiles on everything. (Well, I never got the debugger, at least, so I assume they were clean. :) The clim demo fails with some kind of font problem: > * (clim-demo::run-test 'clim-demo::demodemo) > Received CLX NAME-ERROR in process "# {C8B6749}>'s event process." > > debugger invoked on a XLIB:NAME-ERROR in thread # alhost\" :DISPLAY-ID 0 {C8B6749}>'s event process." {BAE9961}>: > Asynchronous NAME-ERROR in request 36 (last request was 37) Code 45.0 [OpenFont] > Received CLX FONT-ERROR in process "initial process" > > debugger invoked on a XLIB:FONT-ERROR in thread #: > FONT-ERROR in current request Code 47.0 [QueryFont] ID #x5E00019 > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [ABORT] Exit debugger, returning to top level. > > (XLIB::X-ERROR XLIB:FONT-ERROR > :DISPLAY # > :ERROR-KEY XLIB:FONT-ERROR > :ASYNCHRONOUS NIL > :CURRENT-SEQUENCE 37 > :RESOURCE-ID 98566169 > :MAJOR 47 > :MINOR 0 > :SEQUENCE 37) > 0] 0 I *think* this is the relevant part of the backtrace: > 3: (XLIB::REPORT-ERROR > # > 7 > XLIB:FONT-ERROR > :ASYNCHRONOUS NIL > :CURRENT-SEQUENCE 400 > :RESOURCE-ID 98566169 > :MAJOR 47 > :MINOR 0 > :SEQUENCE 400) > 4: (XLIB::READ-REPLY # #) > 5: (XLIB::QUERY-FONT > #) > 6: (XLIB:OPEN-FONT > # > "-adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1") > 7: ((SB-PCL::FAST-METHOD CLIM:TEXT-STYLE-MAPPING (CLIM-CLX::CLX-PORT T)) > # > # > # > # > NIL) > 8: (CLIM-CLX::TEXT-STYLE-TO-X-FONT > # > #) So I guess # gets transformed into -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1 but I don't actually have that font on my system: % xlsfonts | grep -e -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1 % Any advice? (Hopefully other than "install -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1". :) Thanks! -- Larry Clapp From csr21 at cantab.net Fri Apr 6 06:51:53 2007 From: csr21 at cantab.net (Christophe Rhodes) Date: Fri, 06 Apr 2007 07:51:53 +0100 Subject: [mcclim-devel] clim-demo::demodemo fails with some kind of font problem In-Reply-To: <20070406033920.GB28885@santa.theclapp.org> (Larry Clapp's message of "Thu, 5 Apr 2007 23:39:20 -0400") References: <20070406033920.GB28885@santa.theclapp.org> Message-ID: <87r6qyj8qe.fsf@cantab.net> Larry Clapp writes: > Any advice? (Hopefully other than "install > -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1". :) Actually, I think that probably /is/ the advice, at least for starters, but I think I can narrow down the hunt by telling you that you probably need to install gsfonts-x11. You might also need to run "xset fp rehash"; at least, last time I installed that package the postinst script didn't quite get things set up right. (Restarting X is also an option, if an undesireable one...) Cheers, Christophe From larry at theclapp.org Fri Apr 6 11:55:07 2007 From: larry at theclapp.org (Larry Clapp) Date: Fri, 6 Apr 2007 07:55:07 -0400 Subject: [mcclim-devel] clim-demo::demodemo fails with some kind of font problem In-Reply-To: <87r6qyj8qe.fsf@cantab.net> References: <20070406033920.GB28885@santa.theclapp.org> <87r6qyj8qe.fsf@cantab.net> Message-ID: <20070406115506.GC28885@santa.theclapp.org> On Fri, Apr 06, 2007 at 07:51:53AM +0100, Christophe Rhodes wrote: > Larry Clapp writes: > > Any advice? (Hopefully other than "install > > -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1". > > :) > > Actually, I think that probably /is/ the advice, at least for > starters, but I think I can narrow down the hunt by telling you that > you probably need to install gsfonts-x11. You might also need to > run "xset fp rehash"; at least, last time I installed that package > the postinst script didn't quite get things set up right. > (Restarting X is also an option, if an undesireable one...) Thanks, Christophe. "apt-get install gsfonts-x11" says "gsfonts-x11 is already the newest version." By my reading of the tracelog and the code, here's the call sequence: 8: (CLIM-CLX::TEXT-STYLE-TO-X-FONT # #) Backends/CLX/port.lisp: text-style-to-x-font calls ... 7: ((SB-PCL::FAST-METHOD CLIM:TEXT-STYLE-MAPPING (CLIM-CLX::CLX-PORT T)) # # # # NIL) ... Backends/CLX/port.lisp: text-style-mapping, which calls Backends/CLX/port.lisp: open-font, which for some reason is not listed in the backtrace. Here's open-font: (defun open-font (display font-name) (let ((fonts (xlib:list-font-names display font-name :max-fonts 1))) (if fonts (xlib:open-font display (first fonts)) (xlib:open-font display "fixed")))) font-name should look like "-adobe-helvetica-medium-r-*-*-24-*-*-*-*-*-*-*". xlib:list-font-names looks like it's supposed to return at most one font that matches that pattern (I'd assume some *installed* font, but apparently not!). For unknown reasons xlib:list-font-names returns -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1, and open-font calls xlib:open-font on that font: 6: (XLIB:OPEN-FONT # "-adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1") and that fails. So ... any help? It looks like if I could build a good proof-of-bug if I knew how to connect to the display. Some poking around leads me to: * (let ((display (xlib:open-display "localhost"))) (print (xlib:list-font-names display "-adobe-helvetica-medium-r-*-*-24-*-*-*-*-*-*-*" :max-fonts 1)) (xlib:close-display display)) ("-adobe-helvetica-medium-r-narrow--24-173-100-100-p-0-iso8859-1") Here are my -adobe-helvetica-medium-r-*-*-24-*-*-*-*-*-*-* fonts: % xlsfonts | grep adobe-helvetica-medium-r-[^-]*-[^-]*-24- -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso10646-1 -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1 Why would xlib:list-font-names return a font that I don't actually have installed, when two fonts that I *do* have installed match the given pattern? Thanks again for any help! -- Larry Clapp From rpgoldman at real-time.com Fri Apr 6 13:32:32 2007 From: rpgoldman at real-time.com (Robert Goldman) Date: Fri, 06 Apr 2007 08:32:32 -0500 Subject: [mcclim-devel] clim-demo::demodemo fails with some kind of font problem In-Reply-To: <20070406115506.GC28885@santa.theclapp.org> References: <20070406033920.GB28885@santa.theclapp.org> <87r6qyj8qe.fsf@cantab.net> <20070406115506.GC28885@santa.theclapp.org> Message-ID: <46164BF0.9090104@real-time.com> Larry Clapp wrote: > On Fri, Apr 06, 2007 at 07:51:53AM +0100, Christophe Rhodes wrote: >> Larry Clapp writes: >>> Any advice? (Hopefully other than "install >>> -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1". >>> :) >> Actually, I think that probably /is/ the advice, at least for >> starters, but I think I can narrow down the hunt by telling you that >> you probably need to install gsfonts-x11. You might also need to >> run "xset fp rehash"; at least, last time I installed that package >> the postinst script didn't quite get things set up right. >> (Restarting X is also an option, if an undesireable one...) > > Thanks, Christophe. "apt-get install gsfonts-x11" says "gsfonts-x11 > is already the newest version." Have you tried using either of the freetype backends? There's an sbcl-specific one that most people use and, because I don't use SBCL all the time, I contributed a CFFI one that's mostly a thin modification of the SBCL backend. Best, R From david at lichteblau.com Fri Apr 6 13:46:31 2007 From: david at lichteblau.com (David Lichteblau) Date: Fri, 6 Apr 2007 15:46:31 +0200 Subject: [mcclim-devel] clim-demo::demodemo fails with some kind of font problem In-Reply-To: <20070406115506.GC28885@santa.theclapp.org> References: <20070406033920.GB28885@santa.theclapp.org> <87r6qyj8qe.fsf@cantab.net> <20070406115506.GC28885@santa.theclapp.org> Message-ID: <20070406134631.GA23051@ununoctium> Quoting Larry Clapp (larry at theclapp.org): > ... Backends/CLX/port.lisp: text-style-mapping, which calls > Backends/CLX/port.lisp: open-font, which for some reason is not listed > in the backtrace. As a workaround, you might be able to select a different font. Try changing clim-clx::*clx-text-family+face-map* so that it uses some other font family. Perhaps there are fonts that just work for you. d. From eric.marsden at free.fr Fri Apr 6 17:19:38 2007 From: eric.marsden at free.fr (Eric Marsden) Date: Fri, 06 Apr 2007 19:19:38 +0200 Subject: [mcclim-devel] Re: clim-demo::demodemo fails with some kind of font problem References: <20070406033920.GB28885@santa.theclapp.org> <87r6qyj8qe.fsf@cantab.net> <20070406115506.GC28885@santa.theclapp.org> Message-ID: <87mz1lcted.fsf@free.fr> >>>>> "lc" == Larry Clapp writes: lc> % xlsfonts | grep adobe-helvetica-medium-r-[^-]*-[^-]*-24- lc> -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso10646-1 lc> -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1 lc> lc> Why would xlib:list-font-names return a font that I don't actually lc> have installed, when two fonts that I *do* have installed match the lc> given pattern? I believe that the problem you describe is due to a bug in Xorg http://article.gmane.org/gmane.lisp.lispworks.general/5285 but maybe it's up to applications to understand the font size of 0 as an indication that the font is scalable, so to ask for it at some other size. -- Eric Marsden From splittist at gmail.com Thu Apr 26 22:15:56 2007 From: splittist at gmail.com (John Q. Splittist) Date: Fri, 27 Apr 2007 00:15:56 +0200 Subject: [mcclim-devel] C syntax patch Message-ID: <7928a3a10704261515t164ff244u843e9012915e018d@mail.gmail.com> Folks, A patch implementing the beginnings of a C syntax for McClim/climacs can be found at http://common-lisp.net/~dmurray/mcclim-c.tar.gz . It is quite ugly at the moment, but I thought it best to make it available now than watch it rot. The file contains a diff and 3 additional files: c-syntax.lisp, c-syntax-commands.lisp and lr-syntax.lisp. This last contains code that is now common to the C and Lisp syntaxes. Have fun! JQS From christian at defun.dk Mon Apr 30 18:23:59 2007 From: christian at defun.dk (Christian Lynbech) Date: Mon, 30 Apr 2007 20:23:59 +0200 Subject: [mcclim-devel] McCLIM on the Mac Message-ID: I could use some pointers on the status of McCLIM on the Mac. In particular, I am interested in how to run against the native graphics system rather than having to run the X11 server. I have looked a bit on the beagle backend but I cannot get it to work. A few fixes is needed just to get it to compile. Once that is done, it does compile and load but once an application (such as the calculator demo) is started, the lisp process freezes with output to the effect of: ? 2007-04-22 20:07:30.708 dppccl[2492] *** Assertion failure in -[NSWindowGraphicsContext reenableDisplayPosting], GraphicsContext.subproj/NSWindowGraphicsContext.m:117 2007-04-22 20:07:30.708 dppccl[2492] *** Assertion failure in -[NSViewHierarchyLock unlockTopMostReader], AppKit.subproj/NSViewHierarchyLock.m:444 2007-04-22 20:07:30.710 dppccl[2492] Error in event loop: Objective-C runtime exception: Invalid parameter not satisfying: th suggesting something going wrong deep down below the lisp level. This was with the latest mcclim CVS, OpenMCL 1.0 and PPC OSX 10.4.9. Before diving in I would like to know if the beagle backend is considered dead beyond repair (or at least if others than myself has any interest in it). Are there alternatives, can the gtkairo or opengl backends be brought to fly without X11? ------------------------+----------------------------------------------------- Christian Lynbech | christian #\@ defun #\. dk ------------------------+----------------------------------------------------- Hit the philistines three times over the head with the Elisp reference manual. - petonic at hal.com (Michael A. Petonic) From smustudent1 at yahoo.com Mon Apr 30 19:04:31 2007 From: smustudent1 at yahoo.com (C Y) Date: Mon, 30 Apr 2007 12:04:31 -0700 (PDT) Subject: [mcclim-devel] McCLIM on the Mac In-Reply-To: Message-ID: <943987.38310.qm@web56705.mail.re3.yahoo.com> IIRC, the last updates on the beagle backend were running into some collisions between how McCLIM wanted to work and how the Mac works. http://common-lisp.net/pipermail/mcclim-devel/2005-November/004301.html I would suggest the first place to look would be at the OpenMCL Objective-C bridge, to make sure that works - if you can, grab a copy of OpenMCL that was current when the original work on the Beagle backend was done and a tarball release from around then and see if those work. I don't know how much has changed in McCLIM since the last Beagle updates and whether it would cause breakage. Beagle is the "right way" to do an McCLIM backend for MacOSX, as I understand it - it will give the best "native" appearance and behavior. Cario's website says it has an experimental Quartz backend but I don't know if it's ever been tried with McCLIM. Cheers, CY --- Christian Lynbech wrote: > I could use some pointers on the status of McCLIM on the Mac. In > particular, I am interested in how to run against the native graphics > system rather than having to run the X11 server. > > I have looked a bit on the beagle backend but I cannot get it to > work. A few fixes is needed just to get it to compile. Once that is > done, it does compile and load but once an application (such as the > calculator demo) is started, the lisp process freezes with output to > the effect of: > > ? 2007-04-22 20:07:30.708 dppccl[2492] *** Assertion failure > in -[NSWindowGraphicsContext reenableDisplayPosting], > GraphicsContext.subproj/NSWindowGraphicsContext.m:117 > 2007-04-22 20:07:30.708 dppccl[2492] *** Assertion failure in > -[NSViewHierarchyLock unlockTopMostReader], > AppKit.subproj/NSViewHierarchyLock.m:444 > 2007-04-22 20:07:30.710 dppccl[2492] Error in event loop: > Objective-C runtime exception: > Invalid parameter not satisfying: th > > suggesting something going wrong deep down below the lisp level. This > was with the latest mcclim CVS, OpenMCL 1.0 and PPC OSX 10.4.9. > > Before diving in I would like to know if the beagle backend is > considered dead beyond repair (or at least if others than myself has > any interest in it). Are there alternatives, can the gtkairo or > opengl backends be brought to fly without X11? > > > ------------------------+----------------------------------------------------- > Christian Lynbech | christian #\@ defun #\. dk > ------------------------+----------------------------------------------------- > Hit the philistines three times over the head with the Elisp > reference manual. > - petonic at hal.com (Michael A. > Petonic) > _______________________________________________ > mcclim-devel mailing list > mcclim-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From david at lichteblau.com Mon Apr 30 21:04:23 2007 From: david at lichteblau.com (David Lichteblau) Date: Mon, 30 Apr 2007 23:04:23 +0200 Subject: [mcclim-devel] McCLIM on the Mac In-Reply-To: References: Message-ID: <20070430210423.GA8062@ununoctium> Hi, Quoting Christian Lynbech (christian at defun.dk): > I have looked a bit on the beagle backend but I cannot get it to > work. A few fixes is needed just to get it to compile. Once that is > done, it does compile and load but once an application (such as the > calculator demo) is started, the lisp process freezes with output to > the effect of: can you submit those fixes as a patch? If Beagle works at all, even just to the extent that it compiles and loads, I think it would be worth getting it reintegrated into mcclim.asd, so that anyone who wants to give it a try can do so easily. IIRC others have reported on IRC that Beagle works for them with a little hacking, so it must be possible somehow. > Before diving in I would like to know if the beagle backend is > considered dead beyond repair (or at least if others than myself has Well, I do not have a Mac, so my interest in Beagle is just from the "native backend implementor" point of view. But I hope nobody would throw Gtkairo away just because it is a little buggy, and the same should be true for Beagle. > any interest in it). Are there alternatives, can the gtkairo or opengl > backends be brought to fly without X11? Gtkairo works without X on MS Windows, but I am not aware of anyone having it tried on MacOS without X. Starting with GTK+ 2.9 there appears to be a Quartz implementation of GDK though, so it should be possible: http://developer.imendio.com/projects/gtk-macosx Of course, a full GDK/GTK+ implementation cannot actually offer a native look and feel on MacOS. But then, CLIM has its own look and feel issues anyway, so that might not make much of a difference... d. From duncan at robotcat.demon.co.uk Mon Apr 30 21:25:07 2007 From: duncan at robotcat.demon.co.uk (Duncan Rose) Date: Mon, 30 Apr 2007 22:25:07 +0100 Subject: [mcclim-devel] McCLIM on the Mac In-Reply-To: <943987.38310.qm@web56705.mail.re3.yahoo.com> Message-ID: <44DA07BB-F761-11DB-8FE9-000A9577B8A2@robotcat.demon.co.uk> On Monday, April 30, 2007, at 08:04 pm, C Y wrote: > > IIRC, the last updates on the beagle backend were running into some > collisions between how McCLIM wanted to work and how the Mac works. > http://common-lisp.net/pipermail/mcclim-devel/2005-November/004301.html > I don't think these issues are insurmountable; I've not been keeping up with McCLIM development over the last 18 months (I dunno, start a little side-project and what happens...), but I did see that Tim made a couple of changes to Beagle's event processing (it was whilst investigating some event issues that I got sidetracked). Whether that's helped any I'm not sure. > I would suggest the first place to look would be at the OpenMCL > Objective-C bridge, to make sure that works - if you can, grab a copy > of OpenMCL that was current when the original work on the Beagle > backend was done and a tarball release from around then and see if > those work. I don't know how much has changed in McCLIM since the last > Beagle updates and whether it would cause breakage. IIRC I got a couple of reports that Beagle didn't compile out of the box on 10.4. I never had a box with 10.4 on it and as far as I know nobody made any great effort to resolve the issue. OS X and OpenMCL have moved on quite a lot since then so if anything the bitrot is probably worse than was reported back then (although I note you're not using a much newer version of OpenMCL than I was (0.14.3)). > > Beagle is the "right way" to do an McCLIM backend for MacOSX, as I > understand it - it will give the best "native" appearance and behavior. I remember having quite a long discussion wrt whether Cocoa or Carbon was the way to go for a (foreign) native L&F on the Mac; I can't help feeling that the direction I ended up taking (Cocoa) wasn't necessarily the best (in terms of making life easier when hooking up to the native window system, I suspect the low-level nature of Carbon is probably a win). > Cario's website says it has an experimental Quartz backend but I don't > know if it's ever been tried with McCLIM. > > Cheers, > CY > > > --- Christian Lynbech wrote: > >> I could use some pointers on the status of McCLIM on the Mac. In >> particular, I am interested in how to run against the native graphics >> system rather than having to run the X11 server. >> >> I have looked a bit on the beagle backend but I cannot get it to >> work. A few fixes is needed just to get it to compile. Once that is >> done, it does compile and load but once an application (such as the >> calculator demo) is started, the lisp process freezes with output to >> the effect of: The calculator demo never used to work very well with Beagle (irrespective of frame manager). Trying to run anything from demodemo just caused deadlock in the event processing, so if you're getting that it's possible you've done as well as the code currently allows :-) I would say that if you bind CLIM:*DEFAULT-FRAME-MANAGER* to BEAGLE:BEAGLE-STANDARD-FRAME-MANAGER (see the README.txt file in the backends/Beagle directory) and you get further, you may be seeing some side-effects to the problems in the event handling code (although I don't recall them making themselves apparent via assertion failures, so I'm not hopeful). Sorry not to be more helpful... -Duncan >> >> ? 2007-04-22 20:07:30.708 dppccl[2492] *** Assertion failure >> in -[NSWindowGraphicsContext reenableDisplayPosting], >> GraphicsContext.subproj/NSWindowGraphicsContext.m:117 >> 2007-04-22 20:07:30.708 dppccl[2492] *** Assertion failure in >> -[NSViewHierarchyLock unlockTopMostReader], >> AppKit.subproj/NSViewHierarchyLock.m:444 >> 2007-04-22 20:07:30.710 dppccl[2492] Error in event loop: >> Objective-C runtime exception: >> Invalid parameter not satisfying: th >> >> suggesting something going wrong deep down below the lisp level. This >> was with the latest mcclim CVS, OpenMCL 1.0 and PPC OSX 10.4.9. >> >> Before diving in I would like to know if the beagle backend is >> considered dead beyond repair (or at least if others than myself has >> any interest in it). Are there alternatives, can the gtkairo or >> opengl backends be brought to fly without X11? >> >> >> > ------------------------ > +----------------------------------------------------- >> Christian Lynbech | christian #\@ defun #\. dk >> > ------------------------ > +----------------------------------------------------- >> Hit the philistines three times over the head with the Elisp >> reference manual. >> - petonic at hal.com (Michael A. >> Petonic) >> _______________________________________________ >> mcclim-devel mailing list >> mcclim-devel at common-lisp.net >> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > mcclim-devel mailing list > mcclim-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel >