Bug 606671
Summary: | tk segfaults without font (Type1) installed | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Aleš Mareček <amarecek> | ||||||||||
Component: | tk | Assignee: | Jaroslav Škarvada <jskarvad> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||||||||
Severity: | high | Docs Contact: | |||||||||||
Priority: | low | ||||||||||||
Version: | 6.0 | CC: | jkaluza, jskarvad, ovasik, rstrode | ||||||||||
Target Milestone: | rc | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | tk-8.5.7-5.el6 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2010-11-10 21:47:06 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Aleš Mareček
2010-06-22 08:11:36 UTC
I was able to reproduce this bug, but only in situation when all fonts was removed. In that case, whole gnome environment was not usable ("squares" instead of letters, firefox crashed too etc.). So it would be fine to know if you have some additional fonts installed. I'm also attaching backtrace created with tk debugging symbols. Created attachment 426239 [details]
backtrace
I had only the xorg-x11-fonts-misc-7.2-9.1.el6.noarch. I understand that X are not very usable in this installation but... in situation where is possible to create this type of installation without forcing it should not segfaults. Created attachment 426256 [details]
proposed patch
This patch fixes the crash in libtk, but maybe it would be better to find out another way which could allow to run tk applications with some font from xorg-x11-fonts-misc package.
After applying the patch, reproducer ends up with following ruby exception:
/usr/lib/ruby/1.8/tk.rb:1970:in `_invoke_without_enc': unhandled exception
from /usr/lib/ruby/1.8/tk.rb:1970:in `_ip_invoke_core'
from /usr/lib/ruby/1.8/tk.rb:2006:in `_tk_call_core'
from /usr/lib/ruby/1.8/tk.rb:2034:in `tk_call_without_enc'
from /usr/lib/ruby/1.8/tk.rb:5103:in `create_self'
from /usr/lib/ruby/1.8/tk.rb:5058:in `initialize'
from 555730.rb:11:in `new'
from 555730.rb:11
Created attachment 426277 [details]
misc font fallback
This patch add misc font to fallback.
The Tk is compiled with xft support by default, thus the fallback approach from comment 8 is not usable (it is only for old X11 core font system). The actual problem is that the fontconfig doesn't see the misc font. It is because the fontconfig is configured -with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts and does not scan directories recursively (documented feature). In order to make it work with misc font add the following line to your /etc/fonts/fonts.conf: <dir>/usr/share/X11/fonts/misc</dir> Then wait for fontconfig refresh (cca 30 seconds) or run 'fc-cache -f' Also bitmap fonts must be enabled in fontconfig (by default they are). Probably this would fix other affected applications as well. The segfault if there is no font seen by fontconfig is fixed in tk-8.5.7-5.el6 but the test script doesn't run. In order to make it work please follow the comment 9. Thanks Jaroslav, it seems it works well (https://bugzilla.redhat.com/show_bug.cgi?id=606671#c9). After adding "<dir>/usr/share/X11/fonts/misc</dir>" in /etc/fonts/fonts.conf it doesn't segfault. Red Hat Enterprise Linux 6.0 is now available and should resolve the problem described in this bug report. This report is therefore being closed with a resolution of CURRENTRELEASE. You may reopen this bug report if the solution does not work for you. Also see bug 1025331 |