Bug 50975

Summary: xclock segfaults
Product: Ports & Packages Reporter: Dan Strick <strick>
Component: Individual Port(s)Assignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me CC: dan
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Dan Strick 2003-04-15 12:10:18 UTC
 	The xlock program in /usr/X11R6/bin/ does not work correctly.
 	When invoked simply as "/usr/X11R6/bin/xclock", the program
 	generates the error message
 
 		Warning: Cannot convert string "" to type XftFont
 
 	and the clock window pops up using incorrect and inconveniently
 	low-contrast colors.
 
 	Attempts to specify the colors on the xclock command line appear
 	to be ignored.
 
 	The command "/usr/X11R6/bin/xclock -d" produces the messages:
 
 		Warning: Cannot convert string "" to type XftFont
 		Segmentation fault (core dumped)
 
 	and the file:
 
 		608 -rw-------  1 dan  wheel  602112 Apr 15 03:52 xclock.core
 
 	but no clock.

Fix: 

I copied the xlock binary from my previous FreeBSD installation,
 	release 4.6.2.  It appears to work perfectly.
How-To-Repeat:  	Install FreeBSD 4.8-Release and all of XFree386 via sysinstall.
 	Install fvwm as a port.
 	Start fvwm.
 	Run xclock.
Comment 1 Ceri Davies freebsd_committer freebsd_triage 2003-04-29 00:00:41 UTC
Responsible Changed
From-To: gnats-admin->freebsd-ports-bugs

Reassign misfiled PR.
Comment 2 Tilman Keskinoz freebsd_committer freebsd_triage 2003-05-01 16:58:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->anholt

over to maintainer
Comment 3 Eric Anholt 2003-05-02 02:00:27 UTC
Could you do a backtrace in gdb of that core file?

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 4 Dan Strick 2003-05-03 08:16:45 UTC
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> From eta@lclark.edu Fri May  2 19:36:49 2003
> Subject: Re: ports/50975: xclock segfaults
> From: Eric Anholt <eta@lclark.edu>
> To: freebsd-gnats-submit@FreeBSD.org, strick@covad.net
> Date: 01 May 2003 18:00:27 -0700
>
> Could you do a backtrace in gdb of that core file?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

ice% cd /tmp
ice% mkdir x
ice% cd x
ice% cp /usr/X11R6/bin/xclock .
ice% ./xclock -d
Warning: Cannot convert string "" to type XftFont
Segmentation fault (core dumped)
ice% ls -l
total 636
-rwxr-xr-x  1 dan  wheel   27376 May  2 19:45 xclock
-rw-------  1 dan  wheel  602112 May  2 19:45 xclock.core
ice% gdb xclock xclock.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
(no debugging symbols found)...
Core was generated by `xclock'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/X11R6/lib/libXft.so.2...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libfontconfig.so.1...
(no debugging symbols found)...done.
Reading symbols from /usr/local/lib/libfreetype.so.9...
(no debugging symbols found)...done.
Reading symbols from /usr/local/lib/libexpat.so.4...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXrender.so.1...
(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXaw.so.7...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXmu.so.6...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXt.so.6...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libSM.so.6...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libICE.so.6...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXpm.so.4...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXext.so.6...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6...
(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.4...(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXThrStub.so.6...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2...
(no debugging symbols found)...done.
Reading symbols from /usr/X11R6/lib/libXcursor.so.1...
(no debugging symbols found)...done.
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...
done.
#0  0x28076b08 in XftCharIndex () from /usr/X11R6/lib/libXft.so.2
(gdb) bt
#0  0x28076b08 in XftCharIndex () from /usr/X11R6/lib/libXft.so.2
#1  0x2807381c in XftTextExtents8 () from /usr/X11R6/lib/libXft.so.2
#2  0x804a0c4 in XftDrawPicture ()
#3  0x281aad72 in CallInitialize () from /usr/X11R6/lib/libXt.so.6
#4  0x281ab272 in xtCreate () from /usr/X11R6/lib/libXt.so.6
#5  0x281ab732 in _XtCreateWidget () from /usr/X11R6/lib/libXt.so.6
#6  0x281ab843 in XtCreateManagedWidget () from /usr/X11R6/lib/libXt.so.6
#7  0x8049a50 in XftDrawPicture ()
#8  0x8049716 in XftDrawPicture ()
(gdb) quit
ice%
Comment 5 Eric Anholt freebsd_committer freebsd_triage 2003-05-04 23:27:13 UTC
On Sat, 2003-05-03 at 00:20, Dan Strick wrote:

Are your fontconfig, Xft, and freetype ports up to date?  Also, what
font ports do you have installed?

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 6 Dan Strick 2003-05-05 03:17:44 UTC
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> From anholt@FreeBSD.org Sun May  4 18:50:36 2003
> Subject: Re: ports/50975: xclock segfaults
> From: Eric Anholt <anholt@FreeBSD.org>
> To: Dan Strick <strick@covad.net>
> Date: 04 May 2003 15:27:13 -0700
>
> On Sat, 2003-05-03 at 00:20, Dan Strick wrote:
>
> Are your fontconfig, Xft, and freetype ports up to date?  Also, what
> font ports do you have installed?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

My XF86Config file specifies these fonts:

    FontPath   "/usr/X11R6/lib/X11/fonts/local/"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/TTF/"
    FontPath   "/usr/X11R6/lib/X11/fonts/URW/"

The command "pkg_info | grep -i font" produces:

XFree86-FontServer-4.3.0 XFree86-4 font server
XFree86-font100dpi-4.3.0 XFree86-4 bitmap 100 dpi fonts
XFree86-font75dpi-4.3.0 XFree86-4 bitmap 75 dpi fonts
XFree86-fontCyrillic-4.3.0 XFree86-4 Cyrillic fonts
XFree86-fontDefaultBitmaps-4.3.0 XFree86-4 default bitmap fonts
XFree86-fontEncodings-4.3.0 XFree86-4 font encoding files
XFree86-fontScalable-4.3.0 XFree86-4 scalable fonts
Xft-2.1_3           A client-sided font API for X applications
fontconfig-2.1_6    An XML-based font configuration API for X Windows
freetype2-2.1.3_1   A free and portable TrueType font rendering engine
mozilla-fonts-1.0_1 Web fonts for Netscape/Mozilla
mplayer-fonts-0.50  A font pack for the mplayer OSD and SUB
urwfonts-1.0        Another font package for X

I do not recall installing any other font related software, though it is
quite possible that one or more of the ports I have installed dragged
in something else.  I first discovered the problem after I had installed
standard FreeBSD 4.8-release with the following X11 related packages
from the release:

	XFree86-4.3.0,1.tgz
	XFree86-FontServer-4.3.0.tgz
	XFree86-Server-4.3.0_2.tgz
	XFree86-clients-4.3.0_1.tgz
	XFree86-documents-4.3.0.tgz
	XFree86-font100dpi-4.3.0.tgz
	XFree86-font75dpi-4.3.0.tgz
	XFree86-fontCyrillic-4.3.0.tgz
	XFree86-fontDefaultBitmaps-4.3.0.tgz
	XFree86-fontEncodings-4.3.0.tgz
	XFree86-fontScalable-4.3.0.tgz
	XFree86-libraries-4.3.0_1.tgz
	XFree86-manuals-4.3.0.tgz
	Xft-2.1_3.tgz
	expat-1.95.6_1.tgz
	fontconfig-2.1_6.tgz
	freetype2-2.1.3_1.tgz
	imake-4.3.0.tgz
	pkgconfig-0.15.0.tgz
	png-1.2.5_2.tgz
	wrapper-1.0_2.tgz

and the X11 related port:

	x11-wm/fvwm

Dan Strick
strick@covad.net
Comment 7 Eric Anholt freebsd_committer freebsd_triage 2003-05-06 04:48:08 UTC
Could you update your Xft, fontconfig, and freetype2 and see if it's
still a problem?

If that doesn't help, you might want to try removing the non-XFree86
font ports one by one and seeing if that helps (and which one is
responsible).
-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 8 Eric Anholt freebsd_committer freebsd_triage 2003-08-26 21:10:47 UTC
State Changed
From-To: open->closed

Feedback timeout.