| Summary: | X crashes when I set a Python Tkinter edit control to display a long text string in 25pt DejaVu font | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | xorg | Reporter: | Bryce Harrington <bryce> | ||||||||
| Component: | Driver/intel | Assignee: | Chris Wilson <chris> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | high | CC: | silas-freedesktop | ||||||||
| Version: | 7.6 (2010.12) | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux (All) | ||||||||||
| Whiteboard: | |||||||||||
| i915 platform: | i915 features: | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Bryce Harrington
2011-05-04 19:52:32 UTC
I was able to reproduce this error locally on an i965 laptop.
The issue appears to be that the screen structure's render_dest_picture has a null devPrivates:
(gdb) up
#2 i965_composite (dest=0xb7146008, srcX=992, srcY=48, maskX=0, maskY=0, dstX=0, dstY=0, w=15, h=14)
at ../../src/i965_render.c:1845
1845 in ../../src/i965_render.c
(gdb) print (*(*(intel_screen_private *)(scrn->driverPrivate))->render_dest_picture)
$19 = {pDrawable = 0xb7146008, pFormat = 0x9ae6d88, format = PICT_a8r8g8b8, refcnt = 1, id = 0,
repeat = 0, graphicsExposures = 0, subWindowMode = 0, polyEdge = 0, polyMode = 0, freeCompClip = 1,
clientClipType = 0, componentAlpha = 1, repeatType = 0, filter = 0, stateChanges = 0, unused = 0,
pNext = 0x0, alphaMap = 0x0, alphaOrigin = {x = 0, y = 0}, clipOrigin = {x = 0, y = 0},
clientClip = 0x0, serialNumber = 339102, pCompositeClip = 0x9c4de18, devPrivates = 0x0,
transform = 0x0, pSourcePict = 0x0, filter_params = 0x0, filter_nparams = 0}
Created attachment 46341 [details] [review] check privates A simple null pointer check at this point in the code is sufficient to paper over the crash. (The tk app seems to still not work properly with a text string of this size, so there is still a bug in play, but it's unclear whether that's in X or the tk libs.) Created attachment 46342 [details] [review] Same patch, against current git head Right idea, but we either need to move the check higher or propagate the failure so that we can run the fallback. However in this case, I think we can improve the implementation by clipping the mask against the dst before filling it -- i.e. prevent us from creating the oversized temporary. Created attachment 46343 [details]
earlier (bad) shot at this patch
"we either need to move the check higher or propagate the failure so that we can run the fallback."
Originally I did a check at a higher level (see attached). However this wasn't right; the screen flashed on and off every second or two, and after a minute or so X locked up.
Yeah, that would trigger a few asserts and upset your machine. *g* I'm going to be gone for the next week (Intel tomorrow, UDS next week), so won't be able to do further work on this for a while. But if you make a better patch I may be able to take care of packaging it for Silas to test. Alright, well I'll go with the original patch to paper over the crash in the distro for now. If you come up with a better patch let me know. I have, just it's in the middle of 40,000 other lines... The right approach is included with sna. commit 18d08e49d270b7a05f14a309759c9315e5ab9679 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jun 28 20:25:46 2011 +0100 uxa/glyphs: Fallback instead of crashing on large strings Not ideal, but being slow is a major improvement over losing data. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36860 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.