[plt-scheme] drscheme fails at runtime (linux, plt-scheme-4.2.5)

From: Imran Rafique (imran at rafique.org)
Date: Fri May 21 18:37:26 EDT 2010

Mathew (thanks for helping me through this, btw)

Nothing in ~/.plt-scheme/plt-prefs.ss which could explain this (I haven't
added anything to this manually). Contents of file are below.

This is all rather confusing. When I run drscheme while ssh'ed in from the
other machine (ie: using its X server), there doesn't look to be any
old-style non-truetype fonts on display.

I'm ploughing ahead with vim and an mzscheme repl in gnu-screen (sending
expr's from vim to the repl via one of my vimscripts), which is pretty much
how I code in clojure. Regardless, I would like to get drscheme running -
would be a shame to have a nice looking debugger etc available, and not use
it. Am I the only one who has this problem under linux and v4.2.?

--- plt-prefs.ss ---
 (
 (|plt:DrScheme-splash-max-width| 697)
 (plt:framework-pref:framework:exit-when-no-frames #t)
 (plt:framework-pref:drscheme:module-browser-size-percentage 1/5)
 (plt:framework-pref:drscheme:logging-size-percentage 3/4)
 (plt:framework-pref:drscheme:unit-window-size-percentage 1/2)
 (plt:framework-pref:drscheme:recent-language-names (("Determine language
from source" #6(#t write mixed-fraction-e #f #t debug) (default) #0() "#lang
scheme\n" #t)))
 (plt:framework-pref:drscheme:language-settings ((-32768) (#6(#t write
mixed-fraction-e #f #t debug) (default) #0() "#lang scheme\n" #t)))
 (plt:framework-pref:drscheme:keybindings-window-size (400 . 600))
 (plt:framework-pref:drscheme:frame:initial-position #f)
 (plt:framework-pref:drscheme:unit-window-width 682)
 (plt:framework-pref:drscheme:unit-window-height 649)
 (plt:framework-pref:drscheme:unit-window-max? #f)
 (plt:framework-pref:framework:verify-exit #t)
 (plt:framework-pref:drscheme:console-previous-exprs (("(* 1280 1.6)") ("(*
1280 1.6)") ("(/ 1280 1.6)") ("(* 480 1.6)")))
)

Regards,
            Imran Rafique


On Fri, May 21, 2010 at 5:49 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> Do you have a preferences file in "~/.plt-scheme/plt-prefs.ss"? It
> could explicitly set the font that DrScheme uses to an old-style font
> instead of an Xft font.
>
> At Thu, 20 May 2010 18:31:13 -0700, Imran Rafique wrote:
> > Mathew,
> >
> > Actually, mred runs fine (just tried it). So there's some font being used
> by
> > code called from drscheme.ss which is causing drscheme to fail?
> >
> > Regards,
> >             Imran Rafique
> >
> >
> > On Thu, May 20, 2010 at 6:39 AM, Matthew Flatt <mflatt at cs.utah.edu>
> wrote:
> >
> > > My guess is still that the issue is a lack of support for old-style X11
> > > fonts in the X server. If that's right, there's still the question of
> > > why DrScheme is trying to use an old-style font.
> > >
> > > When Xft is enabled, it looks like there's still an XLoadFont() call
> > > via XCreateFontCursor(), which is used to get basic cursors like the
> > > arrow and I-beam cursor. I don't think that's a likely culprit, but it
> > > may be worth checking in gdb...
> > >
> > >
> > > I expect that you will see the error when running `mred'. Can you try
> > > using `gdb' to run `mred' with the `-synchronous' flag to find out what
> > > X call is leading to the X_OpenFont message?
> > >
> > > Using gdb would go something like this:
> > >
> > >   % gdb mred
> > >   (gdb) handle SIGSEGV nostop noprint
> > >   (gdb) run -synchronous
> > >
> > > The second line is needed because page protection and signal handlers
> > > are used to implement write barriers. If you don't ignore SIGSEGVs,
> > > then `mred' will appear to crash right away.
> > >
> > > The above may not be enough to get gdb to interrupt the program when
> > > it's about to exit with an X11 error. You may have to set breakpoints
> > > on exit().
> > >
> > > Thanks,
> > > Matthew
> > >
> > >
> > > At Wed, 19 May 2010 14:57:52 -0700, Imran Rafique wrote:
> > > > Mathew (thanks for responding, btw),
> > > >
> > > > Xft seems to be enabled.
> > > > ''configure --help' says that xft support is enabled by default, and
> I
> > > > didn't disable it manually (I only did --disable-shared)
> > > >
> > > > $ pwd
> > > > /home/imran/opt/plt-scheme/plt-4.2.5/src/build
> > > >
> > > > $ grep -iC2 xft config.log
> > > > configure:10964: result: yes
> > > > configure:11241: checking for cairo_create in -lcairo
> > > > configure:11276: g++ -o conftest -O2 -march=x86-64 -pipe    -pthread
> > > > conftest.cpp -lcairo  -L/usr/lib64 -L/usr/X11R6/lib64  -lGL -lXrender
> > > -lXft
> > > > -lXrender -lfontconfig -lfreetype -lX11   -lcairo   -ldl -lm  -ldl
> -lm
> > > > -rdynamic >&5
> > > > configure:11282: $? = 0
> > > > configure:11300: result: yes
> > > > --
> > > > MREDLINKER='$(CXX)'
> > > > MRLIBINSTALL='install-no-lib'
> > > > MROPTIONS=' -DOPERATOR_NEW_ARRAY -DUSE_GL -DWX_USE_XRENDER
> -DWX_USE_XFT
> > > > -DWX_USE_CAIRO -DWX_USE_LIBPNG -DWX_USE_LIBJPEG'
> > > > MZBINTARGET='normal-bin'
> > > > MZINSTALLTARGET='unix-install'
> > > > --
> > > > XMKMF=''
> > > > X_CFLAGS=' -I/usr/include/freetype2   -I/usr/include/cairo
> > > > -I/usr/include/pixman-1 -I/usr/include/freetype2
> -I/usr/include/libpng12
> > >  '
> > > > X_EXTRA_LIBS=' -lGL -lXrender -lXft -lXrender -lfontconfig -lfreetype
> > > -lX11
> > > >   -lcairo   -lpng -lz -ljpeg'
> > > > X_LIBS=' -L/usr/lib64 -L/usr/X11R6/lib64'
> > > > X_PRE_LIBS=' -lSM -lICE'
> > > >
> > > >
> > > > Regards,
> > > >             Imran Rafique
> > > >
> > > >
> > > > On Wed, May 19, 2010 at 5:20 AM, Matthew Flatt <mflatt at cs.utah.edu>
> > > wrote:
> > > >
> > > > > At Tue, 18 May 2010 15:35:01 -0700, Imran Rafique wrote:
> > > > > > The error msg is:
> > > > > > X Error of failed request:  BadValue (integer parameter out of
> range
> > > for
> > > > > > operation)
> > > > > >   Major opcode of failed request:  45 (X_OpenFont)
> > > > > >   Value in failed request:  0x5e0040b
> > > > > >   Serial number of failed request:  14804
> > > > > >   Current serial number in output stream:  14805
> > > > > >
> > > > > > [...]
> > > > > >
> > > > > > I'm guessing that there needs to be some post-install font
> > > configuration
> > > > > > that needs to be done (mkfontdir?), but I don't see plt-scheme
> trying
> > > to
> > > > > > install its own fonts anywhere (blindness on my part
> > > notwithstanding!).
> > > > > Does
> > > > > > plt-scheme install any of its own fonts for drscheme, or does it
> > > expect a
> > > > > > specific font to already be available on the local x server (in
> which
> > > > > case,
> > > > > > which one is it?).
> > > > >
> > > > > No, PLT Scheme doesn't install any fonts.
> > > > >
> > > > > There are two font modes: old-stle X11 fonts and Fontconfig/Xft
> fonts.
> > > > > The mode depends partly on the way that PLT Scheme is compiled
> (with Xf
> > > > > support or not) and partly on what's available from the X server at
> > > > > run-time.
> > > > >
> > > > > When you configure, does the configure script say that Xft support
> is
> > > > > enabled?
> > > > >
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100521/febb1d30/attachment.html>

Posted on the users mailing list.