CCSM segfaults if no settings found

Bug #1092651 reported by Robert M
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Robert M
0.9.8
Won't Fix
Undecided
Unassigned
compiz (Ubuntu)
Fix Released
Medium
Robert M

Bug Description

I've been trying to get compiz working on Debian, and since I installed from source, no settings were put into GConf. When I tried to start CCSM, it printed out an error that it could not read settings from the backend. It then proceeded to segfault.

Anyway, it turns out that the GConf backend was just not checking for errors, it was assuming that the data was good. Since there were no settings, that was not the case. I've attached a patch to fix this issue.

Just a comment as well: #define TRUE ~0 is very annoying, since that will convert to -1 as a signed integer, which could easily be mistaken for an error condition.

Tags: patch

Related branches

Revision history for this message
Robert M (osfan6313) wrote :
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Hi Robert.

Thanks for the patch. I've uploaded a new branch and proposed it for merging with your patch included, and some coding style things cleaned up. I also removed the check for mouseButtonModifier = 0 - as that is a non-error case.

It passes tests, but I do not have the time to manual-test it. Can you check if it remains true to your original patch?

Changed in compiz:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Robert M (osfan6313)
milestone: none → 0.9.9.0
Revision history for this message
Robert M (osfan6313) wrote :

Sure, I should be able to check in a few days.

Revision history for this message
Robert M (osfan6313) wrote :

One minor change: the test for mouseButtonModifier needs to be there, as getGnomeMouseButton modifier could potentially fail if there is no setting found for that. To change that, I've fixed getGnomeMouseButton to return -1 on error, not sure if that's the best to return but since 0 is apparently a valid value it's the only other error that makes sense.

Patch attached.

Changed in compiz (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Robert M (osfan6313)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch.compiz0.9.8.6" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in compiz:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz at revision 3539, scheduled for release in Compiz 0.9.9.0

Changed in compiz (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.9~daily13.01.14-0ubuntu1

---------------
compiz (1:0.9.9~daily13.01.14-0ubuntu1) raring; urgency=low

  [ sampo555 ]
  * compiz crashed with SIGSEGV in DodgeAnim::applyDodgeTransform() (LP:
    #1048840)
  * compiz crashing if window un-/minimize animation is "Random" (LP:
    #1098185)

  [ Daniel van Vugt ]
  * Several leaks in new GLProgram from compileProgram() from
    GLScreen::getProgram() from GLWindowAutoProgram::getProgram() (LP:
    #1097644)

  [ Sam Spilsbury ]
  * Several leaks in ccsIntegratedSettingListAppend() ... from
    ccsGNOMEIntegrationBackendGetIntegratedSetting() from readSetting
    (gsettings.c:375) (LP: #1097661)

  [ MC Return ]
  * Thumbnail Window Previews: Flickering of background/glow and window
    title text (LP: #1098758)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 3561
 -- Automatic PS uploader <email address hidden> Mon, 14 Jan 2013 04:03:09 +0000

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
Changed in compiz:
status: Fix Committed → Fix Released
Revision history for this message
Robert M (osfan6313) wrote :

Note: this is still at least partially broken in the newest version of compiz, as getGnomeMouseButton could still potentially fail(see my comment #4)

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.