From: Dan Forrest <daniel.forrest@ssec.wisc.edu>
Subject: Xdec crashing
Date: 2000/02/25 [thread overview]
Message-ID: <p7bt55qmrj.fsf@gromit.ssec.wisc.edu> (raw)
Wondering if anyone has seen this before.
I have an application that writes rotated text (90, 180, or 270
degrees) using the following steps:
1) Create a pixmap (XCreatePixmap) to hold the text
2) Write the text (XDrawImageString) to the pixmap
3) Get the pixels from the pixmap (XGetImage)
4) Rotate the image data
5) Write the rotated pixels to the window (XPutImage)
This has worked without problems on all kinds of X-servers. We are
now experiencing random core dumps with Xdec under OSF1 V4.0D. From
an analysis of the core dump, it appears that Xdec is writing over
areas of memory with data intended for the pixmap. Further testing
shows the following pattern:
String Result (in pixmap after XDrawImageString)
A A
AB AB
ABC ABC
ABCD ABCD
ABCDE ABCDE
ABCDEF ABCDEF
ABCDEFG ABCDEFG
ABCDEFGH EFGH
ABCDEFGHI DEFGHI
ABCDEFGHIJ CDEFGHIJ
ABCDEFGHIJK BCDEFGHIJK
ABCDEFGHIJKL EFGHIJKL
ABCDEFGHIJKLM DEFGHIJKLM (the server crashes around here)
ABCDEFGHIJKLMN CDEFGHIJKLMN
ABCDEFGHIJKLMNO BCDEFGHIJKLMNO
Once the string is longer than 7 characters, the first (4 - (N % 4))
characters are apparently not drawn to the pixmap, but instead into
some random part of the server memory.
The workaround I am using is to make "N" calls to XDrawImageString
each with length one, instead of one call with length "N" (i.e. draw
the text into the pixmap one character at a time). This seems to
work, but we only figured it out yesterday and haven't done extensive
testing.
Has anyone seen this before? Known problem? Patches available?
--
Dan
reply other threads:[~2000-02-25 5:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox