ultravnc / UltraVNC

UltraVNC Server, UltraVNC Viewer and UltraVNC SC | Official repository: https://github.com/ultravnc/UltraVNC
https://uvnc.com
GNU General Public License v3.0
722 stars 181 forks source link

vnc viewer exited #79

Open hellothere-yan opened 1 year ago

hellothere-yan commented 1 year ago

hello,When I connect to my own vnc server, the vnc viewer window exits, but I have no problem using TightVNC viewer.

“vncviewer.exe”(Win32): 已加载“E:\ultra\vncviewer\Debug\vncviewer.exe”。已加载符号。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\ntdll.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\kernel32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\KernelBase.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\ws2_32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\rpcrt4.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22000.120_none_e541a94fcce8ed6d\comctl32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\winmm.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcrt.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\user32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\gdi32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\win32u.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\win32u.dll”。 “vncviewer.exe”(Win32): 已卸载“C:\Windows\SysWOW64\win32u.dll” “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\comdlg32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\gdi32full.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\ucrtbase.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcp_win.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\combase.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\SHCore.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\shlwapi.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\shell32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\advapi32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\sechost.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\imm32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22000.1098_none_94058a64d9e96c8c\GdiPlus.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\windows.storage.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\WinTypes.dll”。 Started and Winsock (v 2) initialised bufsize expanded to 4352 Registered connection with app “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\riched32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\riched20.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\msls31.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\usp10.dll”。 Saving to E:\ultra\vncviewer\Debug\options.vnc “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\d3d9.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\dwmapi.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\kernel.appcore.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\DXCore.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\uxtheme.dll”。 DPI 96 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\msctf.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\bcryptprimitives.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\TextInputFramework.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\oleaut32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\CoreMessaging.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\CoreUIComponents.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\cryptbase.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\ole32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\clbcatq.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\SogouTSF.ime”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\msimg32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\version.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\SogouPY.ime”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\oleacc.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\winhttp.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\ntmarta.dll”。 “vncviewer.exe”(Win32): 已加载“D:\My_soft\输入法\SogouInput\Components\PicFace\1.1.0.1881\PicFace.dll”。 “vncviewer.exe”(Win32): 已加载“D:\My_soft\输入法\SogouInput\11.6.0.5419\Resource.dll”。 “vncviewer.exe”(Win32): 已卸载“D:\My_soft\输入法\SogouInput\11.6.0.5419\Resource.dll” “vncviewer.exe”(Win32): 已加载“D:\My_soft\输入法\SogouInput\11.6.0.5419\Resource.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\profapi.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\psapi.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\TextShaping.dll”。 线程 0x988c 已退出,返回值为 0 (0x0)。 “vncviewer.exe”(Win32): 已加载“C:\Program Files (x86)\Sangfor\SSL\SangforPWEx\SangforUDProtectEx.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\crypt32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Program Files (x86)\Sangfor\SSL\SangforPWEx\sangforvpnlibcrypto-1_1.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\wintrust.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\wtsapi32.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\msasn1.dll”。 线程 0x88bc 已退出,返回值为 0 (0x0)。 “vncviewer.exe”(Win32): 已卸载“C:\Windows\SysWOW64\SogouTSF.ime” Reset keyboard for first use Flush dead key gives: 1 character(s): 0x0020 ( ) “vncviewer.exe”(Win32): 已加载“C:\Program Files (x86)\Sangfor\SSL\ClientComponent4\SangforTcp.dll”。模块已生成,不包含符号。 “vncviewer.exe”(Win32): 已卸载“C:\Program Files (x86)\Sangfor\SSL\ClientComponent4\SangforTcp.dll” “vncviewer.exe”(Win32): 已加载“C:\Program Files (x86)\Sangfor\SSL\ClientComponent4\SangforTcp.dll”。模块已生成,不包含符号。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcp60.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\urlmon.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\IPHLPAPI.DLL”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\mfc42.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\dbghelp.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\iertutil.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\wininet.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\srvcli.dll”。 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\netutils.dll”。 CSProxy refcount 161 Loading E:\ultra\vncviewer\Debug\vncviewer.exe... WSPStartup ===> E:\ultra\vncviewer\Debug\vncviewer.exe使用链式SPI“vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\mswsock.dll”。 [WSPConnect] Socket ip 10.17.136.197:5900Connected to 10.17.136.197 port 5900 DSMPlugin not enabled RFB server supports protocol version 3.8 Connected to RFB server, using protocol version 3.8 “vncviewer.exe”(Win32): 已加载“C:\Windows\SysWOW64\SogouTSF.ime”。 VNC authentication succeeded Read a 7-byte string Desktop name "BMC VNC " Geometry 1024 x 768 depth 32 Screen work area is 1920 x 1032 Reset keyboard for first use Flush dead key gives: 1 character(s): 0x0020 ( ) Clipboard changed Ignore Clipboard while initializing! No next window in chain; WM_DRAWCLIPBOARD will not be passed SetClipboardViewer to 0x00901a36; next is 0x00000000. Last error 0x00000000Screen work area is 1920 x 1032 DPI changed, SizeWindow Screen work area is 1920 x 1032 Update-processing thread started Screen work area is 1920 x 1032 Screen work area is 1920 x 1032 线程 0x5e40 已退出,返回值为 0 (0x0)。 线程 0x48dc 已退出,返回值为 0 (0x0)。 Receiving cursor shape update, cursor 20x20 bufsize expanded to 22656 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 zlibbufsize expanded to 65792 DPI changed, new=144 old=96 DPI changed, SizeWindow Screen work area is 1920 x 1008

hellothere-yan commented 1 year ago

hello ,anybody here?

RudiDeVos commented 1 year ago

Yes, but with just a log trace is hard to tell what is going on. The only thing i see is that the server is switching resolution a few times

hellothere-yan commented 1 year ago

Is there any other way to know why the ultra VNC viewer quit? I can't find the reason why VNC quits,thanks。 Is it because the server switches the resolution?

hellothere-yan commented 1 year ago

Snipaste_2023-03-29_19-27-10 I noticed that my mouse keeps flickering too

RudiDeVos commented 1 year ago

Display changes are supported. What are you testing, is there a way i can repeat it, i really need to see it in the debugger.

There can be many reasons why the viewer exit. Most likely it's a buffer protection, like having a 1920 x1280 screen and writing pixel (1921,1280) and this is something you can only see in a debugger.

hellothere-yan commented 1 year ago

Thank you for your reply, I am using libvncserver, the encoding method I use is tight, I want to adapt to ultra VNC,but the viewer quits after working for a while.

hellothere-yan commented 1 year ago

i found that the resolution sent by my server during initialization is consistent with the resolution of the video frame I actually send. it is 1024*768

hellothere-yan commented 1 year ago

here is my wireshark data. 11

hellothere-yan commented 1 year ago

From the packet data, it seems that the data sent by the viewer to the server is wrong.I do not know why ultra VNC viewer send data like this.

hellothere-yan commented 1 year ago

do you need the packet data ?

Neustradamus commented 1 year ago

@RudiDeVos: Please look @hellothere-yan comments :)

RudiDeVos commented 1 year ago

I need to be able to run the viewer in debug ( Visual studio) while he is connected to that server, trace and log just doesn't provide enough info. Can you provide a server or put some server on the net i can use to connect to ?

hellothere-yan commented 1 year ago

@RudiDeVos I'm afraid not. My server is a BMC KVM of a linux server.IT is hard to put it on server.Is there any other way?thank you

hellothere-yan commented 1 year ago

my server is based on obmc-ikvm, Can you load it?

hellothere-yan commented 1 year ago

I noticed that my mouse keeps flickering ,What could be the cause of this?

hellothere-yan commented 1 year ago

Is the mouse blinking the cause of the vnc viewer exiting?

hellothere-yan commented 1 year ago

I use tight encoding, and there is no problem with tigger VNC。

hellothere-yan commented 1 year ago

I have single-step debugging in visual studio, but I still haven't found the reason why the viewer exits. How can I make the viewer stop before the program exits. Several times while stepping through, my computer became unresponsive.

RudiDeVos commented 1 year ago

If you put a breakpoint at the last line, the callstack should indicate were it comes from.

hellothere-yan commented 1 year ago

Following your advice, I found where the program exits break

hellothere-yan commented 1 year ago

This seems to be looking for the beginning(0xffd8) and end of the picture(0xffd9), and then exits if it can't find it. However, through my wireshark packet capture data analysis, my picture frame data has a beginning(0xffd8) and a end(0xffd9).the following is my last packet, frame

RudiDeVos commented 1 year ago

Looks like the tight decoder crash when decompessing a jpeg block. As you are using libvncserver, can you try with an another encoder.

We are using libjpeg-turbo and libvncServer also seems to use it, still some decompression error.

Even windows to windows this would be a hell to debug as it happen in the jpeg library

void ClientConnection::DecompressJpegRect(int x, int y, int w, int h) abd verify if xywh is actual part of the desktop.

RudiDeVos commented 1 year ago

1.4.2.0 have update libs, including libjpeg-turbo... you never know

hellothere-yan commented 1 year ago

Yes, I updated to 1.4.2.0, but there will still be exits, and it is the same as before. Snipaste_2023-04-17_10-07-19 break

Neustradamus commented 9 months ago

@hellothere-yan: Have you tested the latest dev build or previous stable?

hellothere-yan commented 9 months ago

@hellothere-yan: Have you tested the latest dev build or previous stable?

yes,I tested version 1.4.3.3 and unfortunately still have the problem, it looks like the problem is the same

RudiDeVos commented 9 months ago

We don't know if it's caused by the server or viewer If i can't repeat the crash, i can not fix it. Sorry

Neustradamus commented 2 months ago

@hellothere-yan: What is your situation?

There is a 1.4.3.6 and a 1.5.0.0-dev, can you try and explain if the problem is always here?

Neustradamus commented 1 month ago

@hellothere-yan: It is possible to have a comeback from you?

Thanks in advance.

hellothere-yan commented 2 weeks ago

@hellothere-yan: It is possible to have a comeback from you?

Thanks in advance.

The 1.5.0.0-dev has the same error. viewer run for a while before exiting.

Neustradamus commented 2 weeks ago

@hellothere-yan: Can you try 1.5.0.1-dev?