Closed
Bug 192397
Opened 22 years ago
Closed 19 years ago
Font sizes over 300pt crash mozilla built with xft and gtk2
Categories
(Core Graveyard :: GFX: Gtk, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: hile, Assigned: blizzard)
References
Details
(Keywords: crash, relnote)
Attachments
(2 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030130 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030130 Trying to use too big font sizes crashes mozilla instantly, if it's compiled with XFT2 and gtk2 support. I don't know if this is XFT2 or mozilla bug, none of my gnome 2.2. apps allow me to set that big font, except gimp 1.3, which might do something different. Anyway, this was an issue with 1.0.x as well, maybe the fix didn't make it to gtk2 version? Reproducible: Always Steps to Reproduce: 1. Go to page http://hile.dyndns.org/crashme.html 2. Either you get instant crash or this bug is not reproducable Expected Results: Well, not crashed ;) I'm using debian's latest build of mozilla-snapshot. Could not find any xft2 enabled other builds, so I'm not 100% sure this is not debian bug.
Comment 1•22 years ago
|
||
Ah, bug 150339 seems to have come back from its grave ! We'll limit the max font-size to twice the display-size, but that may not be enough for gtk2.
Assignee | ||
Comment 2•22 years ago
|
||
This test works just fine on my Red Hat rawhide system.
Comment 3•22 years ago
|
||
stacktrace from CVS XFT/gtk2 build rendering testcase with 800pt instead of 400pt. the 400pt testcase did not crash. 800pt worked ok in gtk1 build.
Comment 4•22 years ago
|
||
marking NEW
Reporter | ||
Comment 5•22 years ago
|
||
Relevant Debian build options for this version were: --with-default-mozilla-five-home=/usr/lib/mozilla$(TAG) \ --disable-debug \ --disable-tests \ --disable-short-wchar \ --enable-xprint \ --enable-optimize="-pipe -w $(OPTFLAGS)" \ --enable-strip-libs \ --enable-crypto \ --enable-mathml \ --enable-oji \ --enable-extensions=all \ --with-system-zlib \ --enable-default-toolkit=gtk2 \ --enable-ldap \ --enable-xft Maybe this helps debugging it. And yes, this bug is not in gtk1 version which is available as nightly build, but that version isn't compiled --enable-xft at all so it's quite different anyway. I'll build an CVS version with above flags and see what happens on debian with that.
Assignee | ||
Comment 6•22 years ago
|
||
Can you get a stack trace with --sync? Are you using this against an X server without RENDER support, by any chance?
Reporter | ||
Comment 7•22 years ago
|
||
Well, running mozilla --sync gives only this: The program '<unknown>' received an X Window System error. This probably reflects a bug in the program. The error was 'BadLength (poly request too large or internal Xlib length erro'. (Details: serial 4217 error_code 16 request_code 155 minor_code 20) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) And yes, of course I have RENDER ... but in addition, this particular machine has experimental DRI support as well, forgot this totally. I'll try with something else and see if I still have problems.
Reporter | ||
Comment 8•22 years ago
|
||
No, experimental DRI drivers didn't make any difference.
Comment 9•22 years ago
|
||
> Can you get a stack trace with --sync? attachment 113931 [details] is with --sync > Are you using this against an X server without RENDER support running Red Hat 8.0 XFree86 4.2.0-72.
Assignee | ||
Comment 10•22 years ago
|
||
And if you use GDK_USE_XFT=0?
Reporter | ||
Comment 11•22 years ago
|
||
With GDK_USE_XFT=0 no crash, the font is just rendered too small: see screenshot, http://hile.dyndns.org/mozilla-noxft-400pt.png. I know we limit the size, but this small?!? With a build using xft and gtk1 font size is ok and it doesn't crash. BTW, I think we are using xft2 for gtk2 builds, and xft1 for gtk1 builds? Could this make the difference?
Assignee | ||
Comment 12•22 years ago
|
||
Uhh. That's really strange.
Reporter | ||
Comment 13•22 years ago
|
||
This seems to be a bug in my X-server after all, or a combination of fontconfig 2.x and my X-server. The server's configuration is available, if interested, from http://hile.dyndns.org/configs/omnibook500/etc/X11/XF86Config-4 On another machine, with same software versions but different X-server, the page is shown but completely incorrectly, see screenshot in http://hile.dyndns.org/screenshots/mozilla-badrender.png The letters are cut to about 25% percent from left, could this be a buffer size problem?
Assignee | ||
Comment 14•22 years ago
|
||
There might be a clip region involved in that cut off text - hard to say.
Comment 15•22 years ago
|
||
I got the cut-off text at 400pt and a crash (attachment 113931 [details]) at 800pt.
Comment 16•21 years ago
|
||
I tried this again with current CVS and got a completely different stack. But I was almost certain I had done --sync for the first one. Oh well. this one makes more sense
Updated•21 years ago
|
Attachment #113931 -
Attachment is obsolete: true
Comment 17•21 years ago
|
||
*** Bug 198231 has been marked as a duplicate of this bug. ***
Comment 18•21 years ago
|
||
It's not a duplicate of bug 150339. Bug 150339 is a problem with the Type 1 backend used in XFree86 4.2 and earlier, and crashes the X server (or the font server if you happen to be running one). This one causes a protocol-level error, and looks like it might be related to Xft. It's clearly the same as Bug 198231. I'd really like to see this bug clarified before you decide to work around it by limiting the size of fonts.
Comment 19•21 years ago
|
||
It might actually be a bug in nsImageGTK. It's possible that nsImageGTK is doing overly large GetImage requests, and hence gets BadLength errors. With XFree86, GetImage should be able to handle up to 4 MB of data in one, go so that surprises me a bit. Still, if that's the case the solution would be to have nsImageGTK split the request into smaller tiles. That would also be good for interactivity, as the X server treats requests atomically.
Comment 20•21 years ago
|
||
*** Bug 213966 has been marked as a duplicate of this bug. ***
Comment 21•21 years ago
|
||
*** Bug 220318 has been marked as a duplicate of this bug. ***
Comment 22•21 years ago
|
||
adding Keith to cc to see if he can offer an insight.
Comment 23•21 years ago
|
||
I didn't account for such large glyphs in the Render extension design; the 'O' is over 4MB and doesn't fit in the largest available X request. We can fix this in several possible places: 1) Render. Add requests to build glyphs incrementally. Should probably do this. 2) Xft. Check font/glyph size and fall back to client-side rendering when they're too large. 3) Mozilla. Check pixel size and set XFT_RENDER to FC_FALSE for really large fonts. 4) fonts.conf. Same as mozilla, except no recompile is needed and it will fix all apps. Here's a sample fix you can stick in /etc/fonts/fonts.conf to test; Mozilla can perform this test in code instead of needing to edit the configuration. <match target="font"> <test name="pixelsize" compare="more"> <int>200</int> </test> <edit name="render"> <bool>false</bool> </edit> </match>
Assignee | ||
Comment 24•21 years ago
|
||
There should already be a define for this to save us from the deadly X font server: http://lxr.mozilla.org/seamonkey/search?string=FONT_MAX_FONT_SCALE do we need a hard coded number to avoid this?
Comment 25•21 years ago
|
||
You can guess the maximum pixel size supported by Render from the maximum request size; it can't be perfect because glyphs may be really wide, while the pixel size relates only to height, plus 'pixel size' may not relate to actual glyph size in any meaningful way. Adding generous padding to the estimates for the area of the glyph will probably do just fine: max_pixels = max_request - 50 max_height = sqrt (max_pixels / 3) this assumes that fonts are no more than three times as wide as the height of the font; you may want to be even more conservative.
Comment 26•21 years ago
|
||
*** Bug 224181 has been marked as a duplicate of this bug. ***
Comment 27•21 years ago
|
||
Keith, would you add that config option to a fontconfig release later? It seems better that way because it works for all apps. Nonetheless, Mozilla can be defensive.
Comment 28•21 years ago
|
||
I'll add a fix to Xft so that other applications won't hit this problem. I think it'll be equivalent to the fix in Mozilla, so there's no reason to remove that. It will, however, be more accurate in using actual font metrics rather than just guessing based on the pixel height.
Comment 29•21 years ago
|
||
*** Bug 225763 has been marked as a duplicate of this bug. ***
Comment 30•21 years ago
|
||
*** Bug 228483 has been marked as a duplicate of this bug. ***
Comment 31•21 years ago
|
||
Has this one been fixed?
Comment 32•21 years ago
|
||
*** Bug 210991 has been marked as a duplicate of this bug. ***
Comment 33•20 years ago
|
||
*** Bug 212888 has been marked as a duplicate of this bug. ***
Comment 34•20 years ago
|
||
Still crashes with : Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040406 Firefox/0.8.0+
Comment 35•20 years ago
|
||
See comment #25. If it's not added to fontconfig, yet, we have to add it to the release note.
Keywords: relnote
Comment 36•20 years ago
|
||
The bug fix goes in Xft. I thought I'd applied this months ago, but can't find any trace of it in current Xft sources...
Comment 37•20 years ago
|
||
WFM with a self-made trunk build from yesterday and the following build options: --enable-calendar --disable-freetype2 --enable-xft --enable-crypto --enable-extensions=wallet,irc,help,inspector,typeaheadfind,xml-rpc,xmlextras,venkman,p3p,cookie,content-packs --enable-svg --enable-svg-renderer-libart --disable-installer --enable-default-toolkit=gtk2 Was this fixed somehow? Can anyone still reproduce this crasher?
Comment 38•20 years ago
|
||
*** Bug 241083 has been marked as a duplicate of this bug. ***
Comment 39•20 years ago
|
||
this worksforme with xft/trunk. I increased the font size up to 1600pt with no crash. Any increase beyond that was ignored (font size stayed at ~1600pt).
Comment 40•20 years ago
|
||
Someone *please* review this patch and apply it if it's good enough. There is at least one website which makes Mozilla/Firefox crash due to this bug: http://home.mn.rr.com/aikousha/ Yes it abuses the BIG tag but Mozilla should not crash.
Comment 41•20 years ago
|
||
*** Bug 260159 has been marked as a duplicate of this bug. ***
Comment 42•19 years ago
|
||
*** Bug 268052 has been marked as a duplicate of this bug. ***
Comment 43•19 years ago
|
||
Comment 44•19 years ago
|
||
Fixed when tested on Firefox 1.5 RC1 Linux (build from the Mozilla site).
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 45•19 years ago
|
||
Sorry for the bugspam, marking WFM as this is the correct resolution as no fix was identified for the problem.
Status: REOPENED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → WORKSFORME
Comment 46•19 years ago
|
||
*** Bug 317200 has been marked as a duplicate of this bug. ***
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•