TigerVNC / tigervnc

High performance, multi-platform VNC client and server
https://tigervnc.org
GNU General Public License v2.0
4.85k stars 904 forks source link

X Error of failed request: BadCursor (invalid Cursor parameter) #1699

Open Jondoe398 opened 7 months ago

Jondoe398 commented 7 months ago

I tried to compile and install on an ARM device, but when I executed x0vncserver and tried to control this ARM device using a Windows device, I received the following error message:

Wed Nov 22 17:29:28 2023
 Connections: accepted: xxxxxxxxxx
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type None(1)
 XDesktop:    Enabling 8 buttons of X pointer device
 XDesktop:    Allocated shared memory image
X Error of failed request:  BadCursor (invalid Cursor parameter)
  Major opcode of failed request:  138 (XFIXES)
  Minor opcode of failed request:  25 (XFixesGetCursorImageAndName)
  Resource id in failed request:  0x38c
  Serial number of failed request:  80
  Current serial number in output stream:  80

However, using the VNCView on the ARM device to control the Windows device worked fine.

CendioOssman commented 7 months ago

Thanks for your report.

Which distribution was this on?

Jondoe398 commented 7 months ago

Thanks for your report.

Which distribution was this on?

I am currently trying to use version 1.10, and I am now attempting to use the latest version, though I'm not sure if it will resolve the issue.

Jondoe398 commented 7 months ago

The current suspicion is that there is an issue with Xfixes_LIB. If I remove its call during the compilation of x0vncserver, that is, by using -DHAVE_XFIXES, it seems to work normally. It's unclear if this has pinpointed the real problem.

CendioOssman commented 7 months ago

Yes, if you remove all of the XFixes stuff then you'll likely bypass the issue.

What Linux distribution are you using?

Why the old version of TigerVNC if you are building it yourself?

Jondoe398 commented 7 months ago

Yes, if you remove all of the XFixes stuff then you'll likely bypass the issue.

What Linux distribution are you using?

Why the old version of TigerVNC if you are building it yourself?

When I was trying, I had already switched to the new version of TigerVNC, but still encountered the aforementioned issue. The environment I tested on is version 4.19.71-arm64-desktop.

CendioOssman commented 7 months ago

That sounds like a Linux kernel version. But what's the rest of the system? Raspberry Pi OS? It helps us understand which libraries are used.

And what X server are you attaching x0vncserver to?

Jondoe398 commented 7 months ago

Sorry, I just saw this. I checked using Xorg -version and here are the results

X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.19.0-arm64-desktop aarch64 Uos Current Operating System: Linux user-PC 4.19.71-arm64-desktop #52.57030 SMP PREEMPT Mon Jan 9 15:36:53 CST 2023 aarch64 Kernel command line: hhee_enable=false last_bootup_keypoint=70 reboot_reason=COLDBOOT exception_subtype=no himntn=0111111111111010001011000000000000000010100000 normal_reset_type=COLDBOOT BOOT_IMAGE=/vmlinuz-4.19.71-arm64-desktop root=UUID=2d8d9611-4c2d-4d72-ba48-1ddae0ca2b4b ro resume=/dev/sdd7 systemd.force-hibernate=1 splash quiet loglevel=0 plymouth.ignore-serial-consoles usbcore.autosuspend=-1 DEEPIN_GFXMODE= ima_appraise=off security=selinux checkreqprot=1 libahci.ignore_sss=1 Build Date: 13 February 2023 06:32:01AM xorg-server 2:1.20.4.52-1+dde (https://www.debian.org/support) Current version of pixman: 0.36.0 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version.

CendioOssman commented 6 months ago

Again, what distribution is this? Raspberry Pi OS?

Ryan-Xu commented 5 months ago

distribution is UOS/Deepin

Again, what distribution is this? Raspberry Pi OS?

The os distribution UOS/DeepIn (https://www.uniontech.com/)

CendioOssman commented 5 months ago

The only ARM machine we have here is Raspberry Pi, unfortunately, and I don't see any version of DeepIn for that, and I can't find any downloads at all for UOS.

Do you know if it possible for us to get that distribution running here so we can debug it?

Ryan-Xu commented 5 months ago

The only ARM machine we have here is Raspberry Pi, unfortunately, and I don't see any version of DeepIn for that, and I can't find any downloads at all for UOS.

Do you know if it possible for us to get that distribution running here so we can debug it?

This is OS download link, you can try it: https://cdimage-download.chinauos.com/desktop-professional/1060u2/uos-desktop-20-professional-L420-L540-1060-arm64-HISILICON-202311.iso?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDYyNDU3NzIsImZpbGVfbmFtZSI6ImRlc2t0b3AtcHJvZmVzc2lvbmFsLzEwNjB1Mi91b3MtZGVza3RvcC0yMC1wcm9mZXNzaW9uYWwtTDQyMC1MNTQwLTEwNjAtYXJtNjQtSElTSUxJQ09OLTIwMjMxMS5pc28ifQ.3ytKr4A8Y2TqAnWHcrDRyjbLeXngBbcF-Qf3rS4S5Zk

Ryan-Xu commented 5 months ago

I refer to this(https://trac.ffmpeg.org/ticket/1738) method to modify it, but in order to solve the problem, it is best to disable the use of the XFixes library

CendioOssman commented 5 months ago

Thanks, that's an interesting reference.

I checked the Xorg code, and it does indeed see like it can send a BadCursor response. But I'm unable to get a test setup for it.

How is the X server started? What arguments are given, and what configuration?

Ryan-Xu commented 4 months ago

Thanks, that's an interesting reference.

I checked the Xorg code, and it does indeed see like it can send a BadCursor response. But I'm unable to get a test setup for it.

How is the X server started? What arguments are given, and what configuration?

I starte vncserver like this, other configuration is default. sudo -u user bash -c "export XAUTHORITY=/home/user/.Xauthority DISPLAY=:0 QT_QPA_PLATFORM=xcb LD_LIBRARY_PATH=/opt/apps/com.company.app/files/lib/ QT_PLUGIN_PATH=/opt/apps/com.company.app/files/lib/plugins/ QT_QPA_PLATFORM_PLUGIN_PATH=/opt/apps/com.company.app/files/lib/plugins/platforms/; /opt/apps/com.company.app/files/bin/vncserver -PasswordFile nbotdkd15 -pww hgfYwdfdxDdfdfds5z -pwr dfdsfdsf9kjkjkjV2dfdsf5sO -id 0123456 -MaxIdleTime 600"

CendioOssman commented 4 months ago

That seems to be a very different setup compared to what @Jondoe398 described.

Are you saying you are running both vncserver and x0vncserver at the same time?

CendioOssman commented 4 months ago

Furthermore, what vncserver is that? I cannot find any google hits for the arguments -pww and -pwr.

Ryan-Xu commented 4 months ago

Furthermore, what vncserver is that? I cannot find any google hits for the arguments -pww and -pwr.

Custom parameters are used for authentication and can be ignored。

Jondoe398 commented 3 months ago

Sorry, I haven't been paying attention to this issue recently. I'm running x0vncserver with only 'SecurityTypes=None' specified; all other settings are at their default parameters.

Jondoe398 commented 3 months ago

I performed an incorrect shutdown.