XFixesGetCursorImage returning NULL?

Peter Hutterer peter.hutterer at who-t.net
Sun Feb 10 18:00:05 PST 2013


On Sat, Feb 09, 2013 at 04:46:34PM -0500, Matei David wrote:
> I've recently had an issue with the function XFixesGetCursorImage. I was
> using a program (screenclone) that assumed this function never returns
> NULL. The program worked fine from the moment I started a KDE session (I'm
> using Mint 13 KDE with kde 4.8.5) until something happened, most likely a
> sleep/resume cycle. After that point, XFixesGetCursorImage would
> occasionally (but not always) return NULL, causing that program to crash.
> After logout/login, again the function would stop returning NULL.
> 
> In the meantime, the maintainer of the program fixed it to prevent the
> crash. However, I wonder if this behaviour of XFixesGetCursorImage is
> expected, or whether it indicates something else might be wrong under the
> hood.

looking at the source, this function returns NULL when malloc fails, or if
fetching the reply fails. Not sure which one triggered in your case, but the
function can definitely return NULL and that should be dealt with in the
caller.

Cheers,
   Peter

> Ref:
> https://github.com/liskin/hybrid-screenclone/issues/10


More information about the xorg-devel mailing list