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

Current buglist and the corresponding bugfixes

Should you have problems with the JavaViewer, here's the place to look for help or report issues
Post Reply
buggybunny
8
8
Posts: 9
Joined: 2007-05-08 14:41

Current buglist and the corresponding bugfixes

Post by buggybunny »

Hey folks,

if possible, it would be convenient if some admin could make this thread sticky scince i will post my updates here.

For the time being, all of these bugfixes refer to the java vnc filetransfer utility.

Fixed Bugs:

  • Description:

    When one tries to create a new folder but hits "cancel" a new folder is created anyway with the name "null".

    Reason:

    This case simply was not considered.

    Solution:

    Adjustment of FTPFrame -> doNewFolder():

    Code: Select all

    		
    	private void doNewFolder() {
    		
    		String name = JOptionPane.showInputDialog(null,"Enter new directory name", "Create New Directory", JOptionPane.QUESTION_MESSAGE);
    //BUGFIX START
    		// if name is null, the user hit the "cancel"-button. in that case -> do not create folder
    		if(name == null) {
    			return;
    		}
    //BUGFIX END
    		if(selectedTable.equals("remote")) {
    			name = remoteLocation.getText()+name;
    			viewer.rfb.createRemoteDirectory(name);
    		}
    		else {
    			name = localLocation.getText()+name;
    			File f = new File(name);
    			f.mkdir();
    			refreshLocalLocation();
    			historyComboBox.insertItemAt(new String("Created Local Directory: " + name),0);
    			historyComboBox.setSelectedIndex(0);
    		}
    	}
    Status: fixed
  • Description:

    Certain Files are shown as directories and thus can not be transferred.


    Cause:

    This was a funny one. The reason for this bug was, that all file attributes were checked, except for one: the attribute "ready for archiving".

    Solution:

    RFBProto -> readFTPMsgDirectoryListContent()

    Code: Select all

    		if (dwFileAttributes == 268435456
    			|| dwFileAttributes == 369098752
    			|| dwFileAttributes == 285212672 
    			|| dwFileAttributes == 271056896
    			|| dwFileAttributes == 824705024
    			||	dwFileAttributes == 807927808
    			|| dwFileAttributes == 371720192
    			|| dwFileAttributes == 369623040
    //BUGFIX START: ADDED
    			|| dwFileAttributes == 805306368)
    //BUGFIX END
    Status: fixed
  • Description:

    Transferring files to a directory with a very long path lets the inner windows overlap and makes the whole window unusable.

    Cause:

    The whole JFrame is of fixed size. However, the subcomponents like JPanels etc are not. Obviously, this has to go wrong.....:wink:

    Solution:

    Adjustment of FTPFrame -> getJContentPane()

    Code: Select all

    
            private javax.swing.JPanel getJContentPane() {
    		if (jContentPane == null) {
    			jContentPane = new javax.swing.JPanel();
    			jContentPane.setLayout(new java.awt.BorderLayout());
    			jContentPane.add(getTopPanel(), java.awt.BorderLayout.NORTH);
    			jContentPane.add(getStatusPanel(), java.awt.BorderLayout.SOUTH);
    			jContentPane.add(getRemotePanel(), java.awt.BorderLayout.EAST);			
    			jContentPane.add(getLocalPanel(), java.awt.BorderLayout.WEST);
    			jContentPane.add(getButtonPanel(), java.awt.BorderLayout.CENTER);			
    			// BUGFIX START
    			localPanel.setMaximumSize(new Dimension(325,398));
    			localPanel.setMinimumSize(new Dimension(325,398));
    			localPanel.setPreferredSize(new Dimension(325,398));
    			remotePanel.setMaximumSize(new Dimension(325,398));
    			remotePanel.setMinimumSize(new Dimension(325,398));
    			remotePanel.setPreferredSize(new Dimension(325,398));
    			// BUGFIX END
    		}
    		return jContentPane;
    }
    Status: fixed
  • Description:

    Directory entries are not sorted. This really is a pain in the ass if you imagine a directory with thousand or more entries and you are looking for one specific file / subdirectory.......

    Cause:

    Well, there was simply no sorting mechanism implemented:

    FTPFrame --> printRemoteDirectory(ArrayList a) looked like that:

    Code: Select all

    	public void printRemoteDirectory(ArrayList a) {
    
    		ArrayList files = new ArrayList();
    		ArrayList dirs = new ArrayList();
    		
    		
    		
    		for (int i = 0; i < a.size(); i++) {
    			remoteList.addElement(a.get(i));
    		}
    		remoteFileTable.setListData(remoteList);
    	}
    

    Solution:

    FTPFrame --> replace printRemoteDirectory(ArrayList a) with:

    Code: Select all

    	public void printRemoteDirectory(ArrayList a) {
    
    		ArrayList files = new ArrayList();
    		ArrayList dirs = new ArrayList();
    		
    		for (Iterator i = a.iterator(); i.hasNext();) {
    			String name = (String) i.next();
    
    			if(name.equals("[..]")) {
    				remoteList.add(name);
    			}
    			// blank before '[' is mandatory!
    			else if(name.startsWith(" [") && name.endsWith("]")) {
    				dirs.add(name.substring(2, name.length() - 1));
    			}
    			else {
    				files.add(name);
    			}		
    		}
    		Collections.sort(dirs);
    		Collections.sort(files);
    
    		for (Iterator i = dirs.iterator(); i.hasNext();) {
    			String dirname = (String) i.next();
    			// blank before '[' is mandatory!
    			remoteList.add(" [" + dirname + "]");
    		}
    		for (Iterator i = files.iterator(); i.hasNext();) {
    			String filename = (String) i.next();
    			remoteList.add(filename);
    		}
    		remoteFileTable.setListData(remoteList);
    	}
    	
    Status: fixed
  • Description:

    Directory contents are "double" displayed right after the initialization.

    Cause:

    I simply don't know.

    Solution:

    Was fixed as a side effect of the other adjustments i made.

    Status: fixed
  • Description:

    When creating directories and receiving files the layers or div tags gets resized and the action buttons (Receive, Send, Close etc..) becomes less and less visible > invisible. Then the only thing to do is to disconnect the Remote Session and restart it and then bring up the file transfer window again


    Cause:

    I have no idea.

    Solution:

    Adding a "this.repaint()" to actionPerformed(ActionEvent evt) in FTPFrame:

    Code: Select all

    		else if (evt.getSource() == sendButton) {
    			doSend();
    			this.repaint();
    		}
    
    Status: Seems to be fixed (error didn't occur in my recent tests)
    This is a weird behaviour and i am not sure why this happens. I am still not able to reproduce this behaviour. Sometimes the exact same transfers worked and sometimes they just didn't.

    For now, i consider this fixed unless we see that error again.....
Bugs i am currently working on:

So far, nothing....


New features i am currently working on:
  • SSL
  • Transfer of directories
  • Bringing structure to the application:

    So far:

    - everything is in the default package
    - huge classes having more than 1000 lines of code

Some remarks:

1.)

When i have more time i will update this thread with more information why this bug occured and how i fixed it.

2.)

Is there an official bugtracker available? I didn't find anything like that on this website....
Last edited by buggybunny on 2007-10-23 13:43, edited 9 times in total.
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Re: Current buglist and the corresponding bugfixes

Post by UltraSam »

Thanks !

You modifs have been added to the SVN repository.

I fixed the printRemoteDirectory() function so it takes the uppercase/lowercase strings into account.
The sorting is now also done on the Local file list.

All this will be in the next RC
UltraSam
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Re: Current buglist and the corresponding bugfixes

Post by UltraSam »

These modifications/fixes are available in the 1.0.4 RC6 version
UltraSam
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6831
Joined: 2004-04-23 10:21
Contact:

Re: Current buglist and the corresponding bugfixes

Post by Rudi De Vos »

New features i am currently working on:
SSL
Someone added the SSL functionality a time ago to the old java source tree. It could be a help when you try to add it to the standard java viewer.
see: http://www.uvnc.com/pchelpware/downloadsc/index.html
flyfishr64
8
8
Posts: 18
Joined: 2008-01-24 20:15
Location: Massachusetts

Re: Current buglist and the corresponding bugfixes

Post by flyfishr64 »

Description:

Certain Files are shown as directories and thus can not be transferred.


Cause:

This was a funny one. The reason for this bug was, that all file attributes were checked, except for one: the attribute "ready for archiving".

Solution:
I just submitted a patch to Rudi for this. The fix is to check for the bit in the file attributes that indicate the entry is a directory:

Code: Select all

		// jdp check for FILE_ATTRIBUTE_DIRECTORY attribute bit
		// note that we're looking at a little-endian value in a big-endian world
		if ((dwFileAttributes & 0x10000000) == 0x10000000)
		{
			fileName = " [" + fileName + "]";
			remoteDirsList.add(fileName); // sf@2004
		}
		else
		{
			remoteFilesList.add(" " + fileName); // sf@2004
		}
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Re: Current buglist and the corresponding bugfixes

Post by UltraSam »

Yep.

Thanks for your patches :)

I'm gonna merge all of them in the current source tree this WE.
Last edited by UltraSam on 2008-03-07 10:22, edited 1 time in total.
UltraSam
flyfishr64
8
8
Posts: 18
Joined: 2008-01-24 20:15
Location: Massachusetts

Re: Current buglist and the corresponding bugfixes

Post by flyfishr64 »

We have connected to Remote machine using Java Viewer with Restricted colors 64 .After Connection is established we have seleted Full colors in Restricted colors drop down and observed that the viewer is Flashing continuously.

Anyone else see this? Is there a fix? I've seen this happen when you enable screen recording as well, even in 64 color mode.
lsorato
Posts: 1
Joined: 2008-07-01 16:49

Re: Current buglist and the corresponding bugfixes

Post by lsorato »

hi,
i have installed 1.0.4 rc16 for using filetrasfer via javaviewer but only recycler and system volume information are known as directory.
i have a windows 2003 sp.2 stand-alone server with problem and another windows 2003 sp.1 in domain without problem.
where problem?
thanks for advance.
Last edited by lsorato on 2008-07-02 10:15, edited 1 time in total.
pedig
Posts: 3
Joined: 2009-04-16 13:22
Location: Switzerland - Glarus

Re: Current buglist and the corresponding bugfixes

Post by pedig »

flyfishr64 wrote:We have connected to Remote machine using Java Viewer with Restricted colors 64 .After Connection is established we have seleted Full colors in Restricted colors drop down and observed that the viewer is Flashing continuously.
I have an other effect. If I change the Options after connection established, the screen on the viewer freezes but the manipulations take effect on the remote machine. That meens that mouse and keyboard are processed but the screen won't be updated.

I saw this on UltraVNC 1.0.5.6.
thepigs
Posts: 1
Joined: 2010-10-08 22:14

BUG + patch for colour mode change

Post by thepigs »

Hi,
If you change the Java viewer from Full colour to 8bit colour and back again, updates stop working. This is because viewer.options.oldEightBitColors doesn't get updated in this case so fullUpdateNeeded always gets set to true.
The following patch fixes it.

Matt

Code: Select all

--- VncCanvas.java	2007-05-19 07:00:29.000000000 +1000
+++ Copy of VncCanvas.java	2010-10-09 09:27:06.203125000 +1100
@@ -202,9 +202,9 @@
 	
 	public void setPixelFormat() throws IOException {
 		// sf@2005 - Adding more color modes
+		viewer.options.oldEightBitColors = viewer.options.eightBitColors;
 		if (viewer.options.eightBitColors > 0)
 		{
-			viewer.options.oldEightBitColors = viewer.options.eightBitColors;
 			switch (viewer.options.eightBitColors)
 			{
 				case 1: // 256
@@ -475,12 +475,7 @@
 					// Before requesting framebuffer update, check if the pixel
 					// format should be changed. If it should, request full update
 					// instead of an incremental one.
-					if ((viewer.options.eightBitColors > 0) && (bytesPixel != 1)
-						||
-						(viewer.options.eightBitColors == 0) && (bytesPixel == 1)
-						||
-						(viewer.options.eightBitColors != viewer.options.oldEightBitColors)
-						)
+					if (viewer.options.eightBitColors != viewer.options.oldEightBitColors)
 					{
 						setPixelFormat();
 						fullUpdateNeeded = true;

pvachon
Posts: 2
Joined: 2011-01-21 17:13

Java Viewer bug report

Post by pvachon »

Hi

I've installed and configured UltraVNC 1.0.9.5 to use new MS Logon. It's working very well using UltraVNC viewer but not with the Java Viewer.

The Java Viewer was supposed to support MS Logon since 2004!
[topic=850][/topic]

So I looked in the Java Viewer source and found out that MS Logon is enabled only when the server minor version number is 4. The server's version for 1.0.9.5 is 3.8. So I changed the line 416 in VncViewer.java file from:

Code: Select all

if (rfb.serverMinor == 4) 
to:

Code: Select all

if (rfb.serverMinor >= 4) 
Once compiled, the Java Viewer works with MS Logon authentication.

[mod=494,1295647032]moved from MS Logon to JavaViewer[/mod]
Last edited by pvachon on 2011-01-21 21:57, edited 1 time in total.
pvachon
Posts: 2
Joined: 2011-01-21 17:13

JavaViewer with MS Logon bug report

Post by pvachon »

Hi

I've installed and configured UltraVNC 1.0.9.5 to use new MS Logon. It's working very well using UltraVNC viewer but not with the Java Viewer.

The Java Viewer was supposed to support MS Logon since 2004!
[topic=850][/topic]

So I looked in the Java Viewer source and found out that MS Logon is enabled only when the server minor version number is 4. The server's version for 1.0.9.5 is 3.8. So I changed the line 416 in VncViewer.java file from:

Code: Select all

if (rfb.serverMinor == 4) 
to:

Code: Select all

if (rfb.serverMinor >= 4) 
Once compiled, the Java Viewer works with MS Logon authentication.
Post Reply