Crash if no notification used

Bug #570462 reported by Guillaume Mazoyer
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libnotify (Ubuntu)
Fix Released
Low
Martin Pitt
Lucid
Fix Released
Undecided
Guillaume Mazoyer
Maverick
Fix Released
Low
Martin Pitt

Bug Description

Initializing libnotify and then uninitializing it without showing any notifications causes a crash.

Using libnotify 0.4.5 and Ubuntu 10.04 Lucid Lynx.

In attachment a simple C code to reproduce the bug.
Compiled using :

gcc `pkg-config --cflags --libs gtk+-2.0` test_notify.c -o notify -l notify

Revision history for this message
Guillaume Mazoyer (respawneral) wrote :
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in libnotify (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is due to the change on https://bugzilla.gnome.org/show_bug.cgi?id=610880

Revision history for this message
Martin Pitt (pitti) wrote :

Hm, I don't get a crash, just

process:20813): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

but the test program exits cleanly.

Changed in libnotify (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I don't see anything else in notify_uninit() which would crash. All variables are properly zeroed at the beginning, and the code behaves well if they are NULL. So I take it you mean this assertion?

I fixed the assertion upstream in http://git.gnome.org/browse/libnotify/commit/?id=1a103f1eee373882a7ed5e2225fcd23bb10ecbc8

Please let me know if it actually crashes for you; in that case, please run it through gdb and capture a stack trace. Thanks!

Changed in libnotify (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Guillaume Mazoyer (respawneral) wrote :

My mistake, actually it does not crash. The test program does exit properly.
I was thinking of a crash because the assertion made the binding I used crash.

Thank you for the fix.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, thanks for confirming.

Revision history for this message
Guillaume Mazoyer (respawneral) wrote :

Considering the fact that it makes the java-gnome binding crash. I created a patch for the package in Lucid.
Can someone check it and get the current package fixed with it?

Revision history for this message
Martin Pitt (pitti) wrote :

Milestoning Maverick task, since we are SRUing this into lucid. I'll apply this patch manually to the maverick package if it doesn't trickle down through upstream and Debian by beta.

Changed in libnotify (Ubuntu Maverick):
milestone: none → ubuntu-10.10-beta
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted libnotify into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in libnotify (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Martin Pitt (pitti)
Changed in libnotify (Ubuntu Lucid):
assignee: nobody → Martin Pitt (pitti)
assignee: Martin Pitt (pitti) → Guillaume Mazoyer (respawneral)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libnotify - 0.5.0-2ubuntu1

---------------
libnotify (0.5.0-2ubuntu1) maverick; urgency=low

  * Add 00git-null-proxy-unref.patch: Fix assertion when uniniting without any
    notifications. Patch committed upstream and backported to maverick.
    (LP: #570462)
 -- Martin Pitt <email address hidden> Mon, 12 Jul 2010 15:31:14 +0200

Changed in libnotify (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Guillaume Mazoyer (respawneral) wrote :

Package from lucid-proposed works fine for me now. Thank you for commiting the patch.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libnotify - 0.4.5-1ubuntu4

---------------
libnotify (0.4.5-1ubuntu4) lucid-proposed; urgency=low

  [ Ted Gould ]
  * debian/patches/04_no_error_msg.patch: Remove reporting
    of proxy_call error messages as they don't always exist and
    have been removed upstream in 0.5.0. (LP: #537208)

  [ Guillaume Mazoyer ]
  * debian/patches/04_assertion-on-exit.patch: Fix an assertion when a process
    would init and uninit libnotify without send a notification (LP: #570462).
 -- Ted Gould <email address hidden> Wed, 07 Jul 2010 11:57:03 -0500

Changed in libnotify (Ubuntu Lucid):
status: Fix Committed → Fix Released
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.