vncviewer crashes when maximizing viewwindow

Bug #202123 reported by Jurgis Pralgauskis
6
Affects Status Importance Assigned to Milestone
vnc (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I use Ubuntu 7.10 based Baltix distribution, the same on the other end
I just pressed Maximize (Alt+F10 or so) in viewer and it crashed

VNC Viewer Free Edition 4.1.1 for X - built Sep 10 2007 17:17:04
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Fri Mar 14 13:48:13 2008
 CConn: connected to host ...

Fri Mar 14 13:48:14 2008
 CConnection: Server supports RFB protocol version 3.7
 CConnection: Using RFB protocol version 3.7

Fri Mar 14 13:48:17 2008
 TXImage: Using default colormap and visual, TrueColor, depth 24.
 CConn: Using pixel format depth 6 (8bpp) rgb222
 CConn: Using ZRLE encoding
vncviewer: TXScrollbar.cxx:47: void TXScrollbar::set(int, int, int, bool): Assertion `limit_ > 0 && len_ >= 0 && len_ <= limit_' failed.
Aborted

Revision history for this message
Brian Amberg (ubuntu-brian-amberg) wrote :

The same happens to me when using xmonad. As soon as i push it into tiled layout, it crashes.

VNC Viewer Free Edition 4.1.1 for X - built Apr 16 2008 13:23:14
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Tue Sep 23 13:14:48 2008
 CConn: connected to host localhost port 1111
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8

Tue Sep 23 13:14:52 2008
 TXImage: Using default colormap and visual, TrueColor, depth 24.
 CConn: Using pixel format depth 6 (8bpp) rgb222
 CConn: Using ZRLE encoding
vncviewer: TXScrollbar.cxx:47: void TXScrollbar::set(int, int, int, bool): Assertion `limit_ > 0 && len_
>= 0 && len_ <= limit_' failed.

Daniel T Chen (crimsun)
Changed in vnc:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Brian Amberg (ubuntu-brian-amberg) wrote :

This is the same as bug #281167

This can be fixed by replacing the assertion in TXScrollbar::set with

if (len_ > limit_) len_ = limit_;

such that TXScrollbar::set looks like this

void TXScrollbar::set(int limit_, int start_, int len_, bool vert)
{
  // This assertion fails under certain window managers.
  // assert(limit_ > 0 && len_ >= 0 && len_ <= limit_);

  if (len_ > limit_) len_ = limit_;
  if (start_ < 0) start_ = 0;
  if (start_ > limit_ - len_) start_ = limit_ - len_;

  if (limit[vert] != limit_ || start[vert] != start_ || len[vert] != len_) {
    limit[vert] = limit_;
    start[vert] = start_;
    len[vert] = len_;
    paint();
  }
}

I hope this patch is helpful.

best regards,

Brian Amberg

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.