compiz crashes when using static switcher

Bug #889250 reported by Ryan on 2011-11-11
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
compiz-plugins-main (Ubuntu)
Undecided
Unassigned

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)

Ryan (ryanmail03) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz-plugins-main (Ubuntu):
status: New → Confirmed
wdoekes (walter+ubuntu) wrote :

Also on Ubuntu 14.04. This has never happened to me before, as fas as I'm aware, and now twice in a row:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

Versions:
compiz 1:0.9.11.3+14.04.20150313-0ubuntu1
compiz-plugins 1:0.9.11.3+14.04.20150313-0ubuntu1
gnome-session 3.9.90-0ubuntu12.1

Log:

Oct 20 09:31:57 walter-laptop kernel: [ 3194.670620] traps: compiz[2844] trap divide error ip:7fa42242f8de sp:7ffe62e4e6
f0 error:0 in libstaticswitcher.so[7fa422422000+20000]
Oct 20 09:32:05 walter-laptop gnome-session[2708]: WARNING: Application 'compiz.desktop' killed by signal 8
Oct 20 09:32:05 walter-laptop gnome-session[2708]: WARNING: App 'compiz.desktop' respawning too quickly
Oct 20 09:32:05 walter-laptop gnome-session[2708]: CRITICAL: We failed, but the fail whale is dead. Sorry....

Oct 20 09:50:20 walter-laptop kernel: [ 4297.934327] traps: compiz[6100] trap divide error ip:7f60420008de sp:7ffd526a9ad0 error:0 in libstaticswitcher.so[7f6041ff3000+20000]
Oct 20 09:50:20 walter-laptop gnome-session[5931]: WARNING: Application 'compiz.desktop' killed by signal 8
Oct 20 09:50:20 walter-laptop gnome-session[5931]: WARNING: App 'compiz.desktop' respawning too quickly
Oct 20 09:50:20 walter-laptop gnome-session[5931]: CRITICAL: We failed, but the fail whale is dead. Sorry....

# # 7fa42242f8de−7fa422422000 = d8de
# addr2line -Cfe /usr/lib/compiz/libstaticswitcher.so 0xd8de
StaticSwitchScreen::getWindowPosition(unsigned int, int*, int*)
??:?

wdoekes (walter+ubuntu) wrote :

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.

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

Other bug subscribers