Bug 215173 - X11 XGetWindowProperty _NET_WORKAREA wrong on x86_64
X11 XGetWindowProperty _NET_WORKAREA wrong on x86_64
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: libX11 (Show other bugs)
6
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Søren Sandmann Pedersen
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-11 16:44 EST by Ian MacArthur
Modified: 2014-06-18 05:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-16 10:41:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
C code sample that illustrates the failure (1.59 KB, text/plain)
2006-11-13 05:59 EST, Ian MacArthur
no flags Details
Notes on results obtained running test-code (2.71 KB, text/plain)
2006-11-13 06:21 EST, Ian MacArthur
no flags Details

  None (edit)
Description Ian MacArthur 2006-11-11 16:44:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/418.9 (KHTML, like Gecko) Safari/419.3

Description of problem:
I have a piece of code that uses the _NET_WORKAREA property of XGetWindowProperty to determine the 
usable screen area. This code works correctly under i386 builds but fails on x86-64 builds.

Investigation shows that, although XGetWindowProperty claims in it's returned status that the returned 
parameter array is 32-bit aligned, examination of the raw byte array returned shows it is actually 64-bit 
aligned.
However, subsequent codes depends on the format value returned by XGetWindowProperty to extract 
the returned values, and so of course it fails - the resulting window sizes are therefore unusable.

I would guess that the raw parameter array returned by XGetWindowProperty has not been correctly 
packed and so returns the machine native alignment, but fails to report that in the format status code.


Version-Release number of selected component (if applicable):
Xorg 7.1.1 kernel-2.6.18-1.2798.fc6

How reproducible:
Always


Steps to Reproduce:
1. Build code that uses XGetWindowProperty and _NET_WORKAREA
2. Show window sized to fit workarea
3.

Actual Results:
Window appears, but wrong size and positon, since the x, y, w, h, screen workarea parameters have been 
miscomputed

Expected Results:
A window the right size and position to fit the screen should appear

Additional info:
Comment 1 Matthias Clasen 2006-11-12 12:25:32 EST
You need to show us your code for us to find the error...
Comment 2 Ian MacArthur 2006-11-13 05:59:11 EST
Created attachment 141036 [details]
C code sample that illustrates the failure
Comment 3 Ian MacArthur 2006-11-13 06:21:00 EST
Created attachment 141039 [details]
Notes on results obtained running test-code
Comment 4 Ian MacArthur 2006-11-24 12:04:26 EST
I was just running through my open bugs and I see this one still marked as NEEDINFO against my name... 
Is there still more inout you need from me, or is the sample code and results I've posted so far enough?

Cheers,
-- 
Ian
Comment 5 Matěj Cepl 2007-04-06 10:56:22 EDT
Sorry for the delat, this bug somehow got lost -- is it still reproducible with
the current update of FC6? If yes, please attach your X server config file
(/etc/X11/xorg.conf) and X server log file (/var/log/Xorg.*.log) to the bug
report as individual uncompressed file attachments using the bugzilla file
attachment link below.

Could you please also try to run without any /etc/X11/xorg.conf whatsoever and
let X11 autodetect your display and video card? Attach to this bug
/var/log/Xorg.0.log from this attempt as well, please.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.
Comment 6 Ian MacArthur 2007-04-06 11:50:11 EDT
Sorry - I no longer have this box in x86_64 mode. I needed to to be working and stable, so I converted 
it to i386 mode and it works fine in that config. Same hardware etc., all running well.

I didn't think to configure for dual-boot (I was deperate to get the box working) and I'll need it in this 
sate for at least 4~6 weeks with my current work, so I can't easily get back to an x86-64 state anytime 
soon.

I take it that nobody else sees this then? It seemed robustly reproducible to me, anyway!

Thanks,
-- 
Ian
Comment 7 Matthias Clasen 2007-04-16 10:39:31 EDT
This is just a quirk of XGetWindowProperty. From the man page:

    If the returned format is 32, the returned data is represented
    as a long array and should be cast to that type to obtain the elements.

Note You need to log in before you can comment on or make changes to this bug.