← Back to team overview

dx-packages team mailing list archive

[Bug 889250] Re: compiz crashes when using static switcher

 

void
StaticSwitchScreen::getWindowPosition (unsigned int index,
                                       int          *x,
                                       int          *y)
{
    int row, column;

    if (index >= windows.size ())
        return;

    column = (int)index % xCount;
    row    = (int)index / xCount;

    *x = column * previewWidth + (column + 1) * previewBorder;
    *x += getRowXOffset (row);

    *y = row * previewHeight + (row + 1) * previewBorder;
}


That's two places for divbyzero in a row; both if xCount is zero. It looks like it's initialized to 0 and then has lots of opportunity to be zero later on. However, compiling the thing is apparently not as easy as typing `cmake .`. Crosses thumbs that I get away with not fixing this.

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to compiz-plugins-main in Ubuntu.
Matching subscriptions: dx-packages
https://bugs.launchpad.net/bugs/889250

Title:
  compiz crashes when using static switcher

Status in compiz-plugins-main package in Ubuntu:
  Confirmed

Bug description:
  Static switcher sometimes crashes (sorry, can't reliably reproduce
  yet), forcing compiz to reload

  This appears in /var/log/syslog:
  Nov 11 14:06:26 godel kernel: [ 9838.704501] compiz[19986] trap divide error ip:7f06d5f6514c sp:7fffcee10160 error:0 in libstaticswitcher.so[7f06d5f57000+1e000]
  Nov 11 14:06:26 godel gnome-session[19907]: WARNING: Application 'compiz.desktop' killed by signal
  Nov 11 14:06:26 godel gnome-session[19907]: WARNING: App 'compiz.desktop' respawning too quickly
  Nov 11 14:06:26 godel gnome-session[19907]: CRITICAL: We failed, but the fail whale is dead. Sorry....

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: compiz-plugins-main-default 1:0.9.6-0ubuntu4
  ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
  Uname: Linux 3.0.0-12-generic x86_64
  ApportVersion: 1.23-0ubuntu4
  Architecture: amd64
  Date: Fri Nov 11 14:37:00 2011
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/tcsh
  SourcePackage: compiz-plugins-main
  UpgradeStatus: Upgraded to oneiric on 2011-10-17 (25 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/compiz-plugins-main/+bug/889250/+subscriptions