w/ attachment

On 10/13/15 12:22 AM, DRC wrote:
I very strongly suspect that this issue is on the server side, and I
think it's probably due to an issue in libjpeg-turbo that has long since
been fixed.  TigerVNC 1.3.0 is quite old, and perhaps you're using a
binary of it that was statically linked against an older version of
libjpeg-turbo-- if you're using the "official" TigerVNC binary for
1.3.0, then it was probably linked against libjpeg-turbo 1.3.0.  There
have been several fixes to libjpeg-turbo since then that could account
for this error.

My most immediate suggestion would be to either switch to the TurboVNC
2.0 Server or upgrade to a newer build of TigerVNC and see if that
eliminates the issue.  If not, then you can apply the attached patch to
save the JPEG file that is causing the error (it should be called
"error0.jpg".)  Hopefully I can at least verify whether the erroneous
JPEG is exhibiting one of the known bugs in past versions of
libjpeg-turbo or whether this is a new bug.  If none of those diagnostic
techniques produces the desired result, then we may need to get more
creative.


On 10/9/15 8:55 AM, Brett Williams wrote:
There is one application that I use which frequently will crash TurboVNC
viewer.

I've attached an image of the error message.  Because this error message
disconnects the viewer, and a subsequent reconnect immediately has the
same problem, my only workaround is to use a different VNC viewer to
connect and change the state a bit.  Then I can reconnect using TurboVNC.

However, the problem will reoccur a few times a day.

I am unsure how to create a useful test case for this situation.  Is
there some kind of debug informational dump that I could do?  The
application in question is commercial software.

Client:
Mac OS/X 10.9.5
TurboVNC Viewer 2.0 (20150714) (Java Hotspot 1.6.0_65 x86_64)

Server:
CentOS 6.4
tigerVNC 1.3.0-16
diff --git a/java/com/turbovnc/rfb/TightDecoder.java 
b/java/com/turbovnc/rfb/TightDecoder.java
index c32ccdb..b132362 100644
--- a/java/com/turbovnc/rfb/TightDecoder.java
+++ b/java/com/turbovnc/rfb/TightDecoder.java
@@ -27,6 +27,7 @@ import java.awt.image.*;
 import java.util.Arrays;
 import java.awt.*;
 import java.util.zip.*;
+import java.io.*;
 import org.libjpegturbo.turbojpeg.*;
 
 public class TightDecoder extends Decoder {
@@ -423,6 +424,8 @@ public class TightDecoder extends Decoder {
     handler.releaseRawPixels(r);
   }
 
+  static int count = 0;
+
   private void decompressJpegRect(Rect r, InStream is,
                                   CMsgHandler handler) {
     // Read length
@@ -477,6 +480,15 @@ public class TightDecoder extends Decoder {
         handler.releaseRawPixels(r);
         return;
       } catch (java.lang.Exception e) {
+        try {
+          File file = new File("error" + (count++) + ".jpg");
+          FileOutputStream fos = new FileOutputStream(file);
+          fos.write(netbuf, 0, compressedLen);
+          fos.close();
+        } catch (IOException e2) {
+          vlog.error(e2.getMessage());
+          throw new ErrorException(e2.getMessage());
+        }
         throw new ErrorException(e.getMessage());
       } catch (java.lang.UnsatisfiedLinkError e) {
         vlog.info("WARNING: TurboJPEG JNI library is not new enough.");
------------------------------------------------------------------------------
_______________________________________________
TurboVNC-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/turbovnc-users

Reply via email to