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

Invalid hotSpot #1866

Open
fnJeff opened this issue Nov 11, 2024 · 15 comments
Open

Invalid hotSpot #1866

fnJeff opened this issue Nov 11, 2024 · 15 comments
Assignees

Comments

@fnJeff
Copy link

fnJeff commented Nov 11, 2024

Describe the bug
The viewer creates a popup window titled "TigerVNC Viewer : Error" and the error message "Invalid hotSpot" after connecting succesfully and typing a single character into a shell or text editor. I was able to use Ctrl-Tab and Shift-Ctrl-Tab to switch between desktops normally. But as soon as I click into an editor or a shell and type a character, it crashses with the error message. After reconnecting, I see that the character I typed was there in the shell/editor. Hitting the backspace key to erase this character did not cause the error/crash.

To Reproduce

  1. Connect to server using java client 1.14.1
  2. Click into a shell or text editor
  3. Type alphanumeric character (backspace did not cause the error)

Expected behavior
No crash

Screenshots
image
image
image

Client (please complete the following information):

  • OS: Windows 10
  • VNC client: TigerVNC java
  • VNC client version: 1.14.1
  • Client downloaded from: sourceforge.net/projects/tigervnc

Server (please complete the following information):

  • OS: Linux 4.18.0-553.8.1.el8_10.x86_64
  • VNC server: Xvnc TigerVNC
  • VNC server version: 1.13.1 (Underlying X server release 12011000)
  • Server downloaded from: ?
  • Server was started using: "Xvnc -inetd -ac -query amsvda0754 -desktop amsvda0754 -noreset -once -SecurityTypes=VeNCrypt,TLSPlain -PlainUsers=jr927253 -log *:syslog:30 pam_service=login"

Additional context
Related to #843
Related to #1742

@bphinz bphinz self-assigned this Nov 11, 2024
@fnJeff
Copy link
Author

fnJeff commented Nov 11, 2024

Not sure if it helps or not, but I've been using java version 1.13.0 and earlier and have never seen this issue before. I saw the same problem in 1.14.0.
Since it seems related to scaling, monitor's actual resolution is normal 4K, while you can see the actual resolution in the connection screenshot. I added a screenshot to the original post of my exact configuration from the Screen tab in case it helps narrow it down.

@bphinz
Copy link
Member

bphinz commented Nov 11, 2024 via email

@fnJeff
Copy link
Author

fnJeff commented Nov 21, 2024

Any luck reproducing this? Any idea on an ETA for a fix candidate?

The main reason I'm pushing a little is because IT is saying that slowness issues people are experiencing (after upgrading our VDIs to Rocky 8 on ESXi) can be addressed by using 1.14.x version of the viewer, which I can't do because of this issue. I'm stuck at 1.13.0 and with the slowness.

@bphinz
Copy link
Member

bphinz commented Nov 25, 2024 via email

@fnJeff
Copy link
Author

fnJeff commented Nov 25, 2024

Perfect, thanks for the update. Looking forward to your findings and hopefully an easy fix.

@fnJeff
Copy link
Author

fnJeff commented Dec 13, 2024

Still no luck? I was hoping that the similarity to the previous related cases I mentioned and the comparison between 1.13 and 1.14 would have made this an easy one. Fingers are still crossed.

@bphinz
Copy link
Member

bphinz commented Dec 22, 2024

Hi fnJeff. I'm sorry for the extended delay, I have been unsuccessfully trying to get my hands on a 4K monitor. Could you test this patch though? I'm pretty certain that it will fix the problem:

--- a/java/com/tigervnc/vncviewer/Viewport.java
+++ b/java/com/tigervnc/vncviewer/Viewport.java
@@ -200,8 +200,8 @@ class Viewport extends JPanel implements ActionListener {
       Graphics2D g2 = tmp.createGraphics();
       g2.drawImage(cursor, 0, 0, cw, ch, 0, 0, width, height, null);
       g2.dispose();
-      x = (int) Math.min(Math.floor((float) x * (float) cw / (float) width), cw - 1);
-      y = (int) Math.min(Math.floor((float) y * (float) ch / (float) height), ch - 1);
+      x = (int) Math.min(Math.floor((float) x * (float) cw / (float) width), Math.max(cw - 1, 0));
+      y = (int) Math.min(Math.floor((float) y * (float) ch / (float) height), Math.max(ch - 1, 0));
       cursor = tmp;
     }
 

@fnJeff
Copy link
Author

fnJeff commented Dec 23, 2024

I'm happy to test out the patch. However I'm not familiar with the process of doing that (I'm a EE not a software engineer). I will take a look at the project README and see if I can easily figure it out. If not I may need some more direct instructions on how to get it into an executable jar file.

@fnJeff
Copy link
Author

fnJeff commented Dec 23, 2024

To be honest, I think it may take me quite some effort to bring myself from zero knowledge up to a point where I could plug in your change and turn that into an executable jar file.

Apologies for my level of incompetence in software projects, but we have a couple options. Either you can give me some instructions on how to do this or you can compile a patch version for me. I'll leave it to you as to which is less painful. :)

@bphinz
Copy link
Member

bphinz commented Dec 23, 2024 via email

@fnJeff
Copy link
Author

fnJeff commented Dec 23, 2024

Pretty sure I would have to create a machine with JDK and cmake as I don't have that available and haven't done it before. It's probably easier, on my end at least, to wait for you to compile it tonight and release a patched version. I will be able to test it out tomorrow for sure.

Once I retire from my day job I will venture deeper into software so I can actually be more helpful with these things.

@bphinz
Copy link
Member

bphinz commented Dec 24, 2024

Can you please try the attached file? You'll need to rename it from .zip to .jar, since GitHub doesn't allow attaching .jar files.
VncViewer.zip

@fnJeff
Copy link
Author

fnJeff commented Dec 24, 2024

From what I can tell, the patch fixed the issue. Thanks!

I can use the patch for now, but do you have any idea if/when this will be included in an official release version like 1.14.2?

@bphinz
Copy link
Member

bphinz commented Dec 24, 2024 via email

@fnJeff
Copy link
Author

fnJeff commented Dec 24, 2024

Sorry, my question wasn't really clear. When do you expect the next official release that shows up on SourceForge?

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

No branches or pull requests

2 participants