On Thu, 4 Dec 2003, Callum Prentice wrote: > > I think you've misinterpreted this. Aside from corruption of > > the ximage data structure, the only time BadValue is returned > > is if your source rectangle passed to XShmPutImage lies outside > > of the XImage (or if you pass junk for the send_event). Check > > your dimensions passed to XShmPutImage. > > that's odd then - if a rearrange my code so i call create 1 then write 1 then create 2 then > write 2 it works perfectly. > > if i call create 1 create 2 write 1 write 2 it fails with the X error i mentioned. > > (where 'create' does all the shm stuff and creation of the ximage and 'write' does the > 'XShmPutImage' > > so i don't need to save/restone any of the XShmSegmentInfo then ? Looking through the code, it looks like Xlib stores a pointer to the shminfo. I didn't realize it did that. That would imply that each XImage needs a XShmSegmentInfo that sticks around for the life of the XImage. It impresses me that it is a mistake that it did this rather than copying the contents of the XShmSegmentInfo. I'm not sure why it was implemented that way. I don't think we have any XShm man pages. If we did, hopefully, they would mention something like that. The error must be that the first XImage ends up with the second XImage's data and subsequently the operation appears to be addressing outside of the shared memory segment, so the BadValue error happens. Mark. _______________________________________________ XFree86 mailing list XFree86@xxxxxxxxxxx http://XFree86.Org/mailman/listinfo/xfree86