Re: [XFree86] BadAccess errors using XShmPutImage

2003-11-04 Thread Callum Prentice
Many thanks Mark - that was exactly the problem - works perfectly now. It's likely that you're not handling the padding correctly. Is (ximage-bytes_per_line == windowWidth * windowDepthBytes) ? In general, I like to create the XImage first and then allocate the data later. That saves

[XFree86] BadAccess errors using XShmPutImage

2003-11-03 Thread Callum Prentice
i'm attempting to put together a simple test that creates a window, allocates a buffer in memory and using an XImage and XShmPutImage () displays it on my screen. i have a tiny piece of code that (as far as i know) does all the right things - it creates the window but when i try to display the

[XFree86] BadAccess errors using XShmPutImage

2003-11-03 Thread Callum Prentice
i'm attempting to put together a simple test that creates a window, allocates a buffer in memory and using an XImage and XShmPutImage () displays it on my screen. i have a tiny piece of code that (as far as i know) does all the right things - it creates the window but when i try to display the

Re: [XFree86] BadAccess errors using XShmPutImage

2003-11-03 Thread Mark Vojkovich
1) Does your X-server have SHM support? MIT-SHM should show up in the list of extensions reported by xdpyinfo. 2) Does your operating system have SHM support? This sort of thing is often disabled for security reasons. 3) Programming errors on your part? BadAccess is generated

Re: [XFree86] BadAccess errors using XShmPutImage

2003-11-03 Thread Callum Prentice
1) Does your X-server have SHM support? MIT-SHM should show up in the list of extensions reported by xdpyinfo. Yep - that extension is listed when i run xdpyinfo. 2) Does your operating system have SHM support? This sort of thing is often disabled for security reasons. i'm

Re: [XFree86] BadAccess errors using XShmPutImage

2003-11-03 Thread Mark Vojkovich
It's likely that you're not handling the padding correctly. Is (ximage-bytes_per_line == windowWidth * windowDepthBytes) ? In general, I like to create the XImage first and then allocate the data later. That saves you from having to do the work of finding out what the padding is supposed