XGetImage didn't generate the error, XCreatePixmap did.
You are forgetting the client-server model.  The server didn't
get the CreatePixmap until you made your GetImage request,
which would flush requests to the server (necessary since
GetImage requires a reply from the server).  Call XSync after 
your XCreatePixmap and you'll see it fail then.


                        Mark.

On Sat, 8 Nov 2003, Pierrot wrote:

> Hi all,
> 
> I'm a newcomer to this list and my problem may be off topic.
> 
> Anyway, running on Xfree 4.2.0, one of my applications (I mean the one 
> I'm currently coding) is crashing with the following error:
> 
> X Error of failed request:  BadAlloc (insufficient resources for operation)
>   Major opcode of failed request:  53 (X_CreatePixmap)
>   Serial number of failed request:  14967
>   Current serial number in output stream:  15016
> 
> But, after a bit of investigation, It seems that this error is generated 
> by a call to XGetImage(), and not a XCreatePixmap() request. Actually 
> any call to XGetImage in my application will generate a BadAlloc...
> 
> And as far as I know, XGetImage should not generate a BadAlloc 
> (according to the Xlib reference).
> 
> So I would need so help and advice on this. Is this a known issue? 
> Should I look a bit deeper into the XFree code to locate the exact error 
> and why it is generated? Should I give up coding and stay away from 
> computers for a while?
> 
> Thank you in advance for any hint,
> 
> Pierre
> 
> 
> 
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
> 

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to