Martin Cracauer wrote:
> wino wrote on Wed, Aug 05, 2009 at 05:12:58PM +0200: 
>> Martin Cracauer wrote:
>>> [Keeping quote below for reference]
>>> The is another class of X11 errors that GIMP should survive:
>> That was my first reaction on seeing the Wacom issue.
>> It sounds to me like a memory object related to the resource has been 
>> distroyed and gimp is accessing a now invalid pointer.
> No, it's not a segfault.
> It is errors from system calls (as in return -1, set errno) when
> reading the pipes connecting GIMP through the X11 server to these
> devices and displays.
>> If this crashes gimp it is a messy bug that reveals insufficient error 
>> handling. This sort of exception should be trapped and dealt with 
>> without gimp falling on it's arse.
> But it's messy.  X11 error handling is often left at the default error
> handlers (which exit the application).  Explicitly dealing with them
> will require you to sort out what exactly the error condition was
> connected to, whether there was a device that caused this and whether
> it is optional.  Then, if it was a device or display that is allowed
> to go away, you need to clean up the application (GIMP) to remove
> entries that tell GIMP to communicate with these devices (such as the
> display draw routine drawing on all displays it knows about) to make
> them forget about the optional device that reported an error.
> When you are finished with that you will also have to deal with the
> fact that errors might come from other conditions than these devices
> going away.  Presumably you'd want to attempt a recovery of some sort
> in some cases.  Just throwing errnous devices out is better that
> exit(), though.
> To make the mess complete, X11 error handling inside a GTK+
> application isn't exactly the same thing either.
> Martin

oops, cross post with Martins reply to my earlier message that missed 
the ML due to wrong sender.

Thanks for the detailed account , Martin.

So whatever the thorough way to completely recover from such an error 
(which sounds like hard work), should not something be done to prevent 
gimp just dumping out and losing any current work changes?

Gimp-developer mailing list

Reply via email to