Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

BUG: "server:port" drop-down listing for UltraVNC Viewer improperly replaces/duplicates entries

Post Reply
User avatar
MerlinYoda
Posts: 4
Joined: 2022-09-30 19:20

BUG: "server:port" drop-down listing for UltraVNC Viewer improperly replaces/duplicates entries

Post by MerlinYoda »

While entering various VNC servers to connect to into the viewer, the entries in the options.vnc file under the user's profile for the first 32 differing entries populate without issue. The index starts with "A" and proceeds though "Z" and then continues on to use "[", "\", "]", "^", "_" and "`"; every new character used is inserted at the beginning of the index parameter's value as would be expected with a stack-like listing. However, once the 33rd server is entered the program inserts an "a" (lower-case) at the beginning of the index parameter's value but the value for the "A" (upper-case) parameter is overwritten rather than a new "a" (lower-case) parameter being created. As a result, the new entry ends up replacing the older entry in the list as well as being at the very top of the list. If you continue connecting to other servers that are not already listed then the replacement/duplication continues (presumably up until the index reaches "z" (lower-case) but I didn't go that far with it).

I've observed this behavior in both the 1.3.8.1 version (latest release version on the website) and the 1.3.8.2 version (latest release version available whatsoever at this time). I don't know if this was an issue in prior versions that used the options.vnc configuration file as well as well because I had been using a version of the viewer which stored this information in the registry until somewhat recently and I had never observed this behavior in those versions. Something about using the registry may have prevented this behavior from surfacing but configuration files are the more appropriate place to store such information because they are much easier to duplicate and migrate so I would not suggest going back to using the registry as a means of fixing this issue.

Without looking at the code but knowing some of the quirks of developing software to work under various environments, my guess is that whatever API is being used read from and write to the options.vnc file functions a lot like (or actually is) the native Windows API used to read and edit INI files which is case-insensitive when it comes to the parameter names. Unlike other operating system environments like Linux-based ones where things like this would tend to be case-sensitive, Windows is famously case-insensitive with so many things, especially with very fundamental things like its handling of configuration files which has been around in some form since before even Windows 95 (i.e. prior to the existence of the Windows Registry).
User avatar
MerlinYoda
Posts: 4
Joined: 2022-09-30 19:20

Re: BUG: "server:port" drop-down listing for UltraVNC Viewer improperly replaces/duplicates entries

Post by MerlinYoda »

On a related note, I've also recently observed that the entry for "[" and anything that happens to be after that entry in the connection section of the options.vnc file does not display in the drop-down listing either.
Ludovic
Super-Mod
Super-Mod
Posts: 45
Joined: 2021-12-28 18:55

Re: BUG: "server:port" drop-down listing for UltraVNC Viewer improperly replaces/duplicates entries

Post by Ludovic »

Thanks MerlinYoda, solved in 1.4.3.0 with your patch.
- viewtopic.php?t=37804
Post Reply