Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 841773

Summary: dev-debug/ddd-3.3.12-r5 crash might caused by missing fonts
Product: Gentoo Linux Reporter: Du Zhe <duzhe0211>
Component: Current packagesAssignee: Maciej Mrozowski <reavertm>
Status: UNCONFIRMED ---    
Severity: normal CC: duzhe0211, jstein, luc_pierard_de_maujouy, reavertm
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ddd stderr msg; emerge --info ; $HOME/.ddd/log ; xlsfonts output;

Description Du Zhe 2022-04-30 01:09:52 UTC
Created attachment 775551 [details]
ddd stderr msg; emerge --info ; $HOME/.ddd/log ; xlsfonts output;

ddd crash after start.
i tried debuging ddd with gdb. and found it causing by a zero-pointer dereference. 
"""
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7abfc4f in XTextExtents (fs=0x0, string=string@entry=0x7fffffffc229 "32", nchars=2, dir=dir@entry=0x7fffffffc210, font_ascent=font_ascent@entry=0x7fffffffc214, font_descent=font_descent@entry=0x7fffffffc218, overall=0x7fffffffc21c) at /usr/src/debug/x11-libs/libX11-1.7.3/libX11-1.7.3/src/TextExt.c:84
84	    Bool singlerow = (fs->max_byte1 == 0);  /* optimization */
(gdb) p fs
$1 = (XFontStruct *) 0x0
"""


I also found something in the stderr msg that seems to confirm that the problem is caused by missing fonts (the stderr output had more then 10000 lines, to find important message i did sort | uniq  so these message not in original order)

“""
Warning: Unable to load any usable ISO8859 font
Warning: Cannot convert string "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-lucidatypewriter-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-medium-r-*-*-*-100-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-medium-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-*-180-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
...
...
...
Warning: 
    Name: FONTLIST_DEFAULT_TAG_STRING
    Class: XmRendition
    Conversion failed.  Cannot load font.

Warning: No font found.

"""


i did some search with "-*-helvetica-bold-*-*-*-*-120-*-*-*-*-iso8859-*" "-*-lucidatypewriter-bold-r-*-*-*-120-*-*-*-*-iso8859-*" things and installed these packages: 
 media-fonts/font-adobe-100dpi
 media-fonts/font-bh-lucidatypewriter-100dpi
 media-fonts/font-bh-lucidatypewriter-75dpi

it still doesn't work.
Comment 1 Du Zhe 2022-04-30 10:35:01 UTC
after a reboot, it works now. unmerge 
 media-fonts/font-adobe-100dpi
 media-fonts/font-bh-lucidatypewriter-100dpi
 media-fonts/font-bh-lucidatypewriter-75dpi
crash happyens again. so i think ddd is depend on these fonts packages.
Comment 2 Du Zhe 2022-04-30 12:36:18 UTC
found a way to avoid depend on any specific fonts, before first running , run
$mkdir -p ~/.ddd/
$cat > ~/.ddd/init << EOT
 Ddd*defaultFont: *
 Ddd*variableWidthFont: *
 Ddd*fixedWidthFont: *
 Ddd*dataFont: *
EOT
Comment 3 Maciej Mrozowski gentoo-dev 2022-05-05 17:55:28 UTC
maciek@liwardyna ~ $ qlist -Iv media-fonts
media-fonts/corefonts-1-r7
media-fonts/croscorefonts-1.31.0
media-fonts/font-util-1.3.2-r1
media-fonts/fontawesome-5.15.3
media-fonts/hack-3.003
media-fonts/liberation-fonts-2.1.3
media-fonts/noto-20201226
media-fonts/stix-fonts-2.11
media-fonts/terminus-font-4.49.1
media-fonts/urw-fonts-2.4.9

In terminal I get:
Warning: Cannot convert string "-*-helvetica-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
(Annoyed?  Try 'Edit->Preferences->General->Suppress X Warnings'!)
Warning: Cannot convert string "-*-helvetica-medium-r-*-*-*-100-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-lucidatypewriter-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-medium-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-*-180-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-symbol-*-*-*-*-*-120-*-*-*-*-adobe-*" to type FontStruct
Warning: Could not load font "-*-lucidatypewriter-medium-*-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: Could not load font "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: Could not load font "-*-lucidatypewriter-bold-*-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead

but no crashes for me.
Comment 4 Maciej Mrozowski gentoo-dev 2022-05-05 17:57:32 UTC
But yes, some bitmap fonts will need to be added to RDEPEND.
Comment 5 Du Zhe 2022-05-07 01:22:26 UTC
(In reply to Maciej Mrozowski from comment #3)
> maciek@liwardyna ~ $ qlist -Iv media-fonts
> media-fonts/corefonts-1-r7
> media-fonts/croscorefonts-1.31.0
> media-fonts/font-util-1.3.2-r1
> media-fonts/fontawesome-5.15.3
> media-fonts/hack-3.003
> media-fonts/liberation-fonts-2.1.3
> media-fonts/noto-20201226
> media-fonts/stix-fonts-2.11
> media-fonts/terminus-font-4.49.1
> media-fonts/urw-fonts-2.4.9
> 
> In terminal I get:
> Warning: Cannot convert string
> "-*-helvetica-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
> (Annoyed?  Try 'Edit->Preferences->General->Suppress X Warnings'!)
> Warning: Cannot convert string
> "-*-helvetica-medium-r-*-*-*-100-*-*-*-*-iso8859-*" to type FontStruct
> Warning: Cannot convert string
> "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
> Warning: Cannot convert string
> "-*-lucidatypewriter-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
> Warning: Cannot convert string
> "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
> Warning: Cannot convert string
> "-*-helvetica-medium-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
> Warning: Cannot convert string
> "-*-helvetica-bold-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
> Warning: Cannot convert string
> "-*-helvetica-bold-r-*-*-*-180-*-*-*-*-iso8859-*" to type FontStruct
> Warning: Cannot convert string "-*-symbol-*-*-*-*-*-120-*-*-*-*-adobe-*" to
> type FontStruct
> Warning: Could not load font
> "-*-lucidatypewriter-medium-*-*-*-*-120-*-*-*-*-iso8859-*", using font
> "fixed" instead
> Warning: Could not load font
> "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*", using font
> "fixed" instead
> Warning: Could not load font
> "-*-lucidatypewriter-bold-*-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed"
> instead
> 
> but no crashes for me.
I installed these fonts listed, but the crash is still happening. This warning
"using font "fixed" instead"
 did not appear on my system. It seems that the crash is also based on some other unknown conditions.So, is there anything else I can do for you?
Comment 6 Maciej Mrozowski gentoo-dev 2024-10-06 11:45:02 UTC
Now that ddd-3.4.1 added support for TTF fonts via freetype, I think this problem should happen anymore.
Comment 7 CaptainBlood 2024-11-06 10:36:21 UTC
As for a working dev-debug/ddd-3.4.1 here,
I had to add both motif22-compatibility && xft as in:
Installed versions:  2.3.8-r5(16:40:46 05/11/2024)(motif22-compatibility xft -examples -jpeg -png -static-libs -unicode ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")

Each have been tested unitary, unsuccessful.
Comment 8 CaptainBlood 2024-11-06 22:47:23 UTC
(In reply to CaptainBlood from comment #7)
> As for a working dev-debug/ddd-3.4.1 here,
> I had to add both motif22-compatibility && xft as in:
missing part:
[I] x11-libs/motif
> Installed versions:  2.3.8-r5(16:40:46 05/11/2024)(motif22-compatibility xft
> -examples -jpeg -png -static-libs -unicode ABI_MIPS="-n32 -n64 -o32"
> ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
> 
> Each have been tested unitary, unsuccessful.

after that things worked out of the box, after ~/.ddd/init deletion to keep away from potentially alterated starting point.
Comment 9 CaptainBlood 2024-11-06 23:15:49 UTC
(In reply to CaptainBlood from comment #8)
Typo
> After that things worked out of the box, after ~/.ddd/init deletion to keep
> away from potentially altered starting point.