Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The server crashes if the remote cursor shape changes #34

Open
mykola-mokhnach opened this issue Feb 6, 2019 · 8 comments
Open

The server crashes if the remote cursor shape changes #34

mykola-mokhnach opened this issue Feb 6, 2019 · 8 comments

Comments

@mykola-mokhnach
Copy link
Contributor

mykola-mokhnach commented Feb 6, 2019

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)

@stweil
Copy link
Owner

stweil commented Feb 10, 2019

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.

@stweil
Copy link
Owner

stweil commented Feb 10, 2019

The crash dump looks like it might be related to something unexpected in your copy+paste buffer.

@mykola-mokhnach
Copy link
Contributor Author

mykola-mokhnach commented Feb 10, 2019

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.

@mykola-mokhnach
Copy link
Contributor Author

For me it looked like there was some race condition while we were trying to call free(cursorData);, but I cannot say for sure

@mykola-mokhnach
Copy link
Contributor Author

    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);

@stweil
Copy link
Owner

stweil commented Feb 10, 2019

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.

@stweil
Copy link
Owner

stweil commented Jul 3, 2019

@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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants