Open mykola-mokhnach opened 5 years ago
I cannot reproduce this issue. The cursor grows when I shake it on the Mac with macOS 10.13.6, I have OSXvnc-server -rfbnoauth
running on the same Mac. A Linux vncclient ist connected. That setting works with no crash.
The crash dump looks like it might be related to something unexpected in your copy+paste buffer.
Sorry, the screenshot is from the other crash. The original issue was happening inside loadCurrentCursorData
, free_tiny
call. Unfortunately I didn't save the original stack trace and I am unable to reproduce it right now.
But anyway thanks for looking into it.
For me it looked like there was some race condition while we were trying to call free(cursorData);
, but I cannot say for sure
cursorData = (unsigned char*)malloc(sizeof(unsigned char) * cursorDataSize);
err = CGSGetGlobalCursorData(connection,
cursorData,
&cursorDataSize,
&cursorRowBytes,
&cursorRect,
&hotspot,
&cursorDepth,
&components,
&cursorBitsPerComponent);
//CGSReleaseConnection(connection);
if (err != kCGErrorSuccess) {
// maybe cursorDataSize here is not the same as it was while malloc has been executed
free(cursorData);
CGSGetGlobalCursorData
seems to be an undocumented function. Either we need a documented method to get the cursor image, or we simply ignore the cursor image and always use the same cursor on the VNC viewer side.
@mykola-mokhnach, would it be acceptable to use the default cursor on the viewer side (until someone finds working code to get the cursor image)?
It looks like the current implementation of cursor bitmap capture does not properly handle "locate cursor" feature which is available in the recent MacOS releases (the arrow grows in size for a moment if one shakes it for a while)