crash in gnome-applet-alarm-clock-0.3.1-1.fc12: raise

Bug #610632 reported by Christoph Wickert
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Alarm Clock Applet
Fix Released
High
Johannes H. Jensen
Fedora
Fix Released
Medium
alarm-clock-applet (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=615699

architecture: i686
Attached file: backtrace
cmdline: alarm-clock-applet
comment: Produce every time that I do it.
component: gnome-applet-alarm-clock
crash_function: raise
executable: /usr/bin/alarm-clock-applet
global_uuid: 56c5c6b2a18bcab58c465dbef4803dcc98c5d39b
kernel: 2.6.32.16-141.fc12.i686.PAE
package: gnome-applet-alarm-clock-0.3.1-1.fc12
rating: 4
reason: Process /usr/bin/alarm-clock-applet was killed by signal 6 (SIGABRT)
release: Fedora release 12 (Constantine)

How to reproduce
-----
1.Open the applet
2.Right click the applet then select Preference
3.Check the box of "Start automatically at login"

And here is a dump that I got running the applet in command line with the same
actions as above.

** (alarm-clock-applet:2125): DEBUG: Preferences: Autostart get_state for file (nil)
** (alarm-clock-applet:2125): DEBUG: AlarmAction: toggle autostart to 1
** (alarm-clock-applet:2125): DEBUG: AlarmAction: set autostart to 1!
** (alarm-clock-applet:2125): DEBUG: Preferences: Autostart get_state for file (nil)
** (alarm-clock-applet:2125): DEBUG: Preferences: Autostart ENABLE!

** (alarm-clock-applet:2125): WARNING **: Preferences: Could not copy '/usr/share/applications/alarm-clock-applet.desktop' to user config dir: Error opening file '/home/chanueting/.config/autostart/alarm-clock-applet.desktop': No such file or directory

(alarm-clock-applet:2125): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: No such file or directory

** (alarm-clock-applet:2125): WARNING **: Preferences: Error when enabling autostart-file '/home/chanueting/.config/autostart/alarm-clock-applet.desktop': \xf0\xc5\u0008 \xb0SI
Segmentation fault (core dumped)

Related branches

Revision history for this message
In , chanueting (chanueting-redhat-bugs) wrote :

abrt 1.1.1 detected a crash.

architecture: i686
Attached file: backtrace
cmdline: alarm-clock-applet
comment: Produce every time that I do it.
component: gnome-applet-alarm-clock
crash_function: raise
executable: /usr/bin/alarm-clock-applet
global_uuid: 56c5c6b2a18bcab58c465dbef4803dcc98c5d39b
kernel: 2.6.32.16-141.fc12.i686.PAE
package: gnome-applet-alarm-clock-0.3.1-1.fc12
rating: 4
reason: Process /usr/bin/alarm-clock-applet was killed by signal 6 (SIGABRT)
release: Fedora release 12 (Constantine)

How to reproduce
-----
1.Open the applet
2.Right click the applet then select Preference
3.Check the box of "Start automatically at login"

Revision history for this message
In , chanueting (chanueting-redhat-bugs) wrote :

Created attachment 432658
File: backtrace

Revision history for this message
In , chanueting (chanueting-redhat-bugs) wrote :

Created attachment 432659
alarm-clock-applet dump that I run the applet in command line

And here is a dump that I got running the applet in command line with the same actions as above.

Revision history for this message
Christoph Wickert (cwickert) wrote :
Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

Thanks for your bug report. I forwarded it to the developer of the program at https://bugs.launchpad.net/fedora/+bug/610632

If you have a launchpad account, you can also subscribe to that bug in get notified about any updates. Otherwise I will get back to you when I have more questions or the bug is resolved.

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

Sorry, but I do have one question: is /usr/share/applications/alarm-clock-applet.desktop in place and readable? On my system the file is available and alarm-clock does not crash.

Revision history for this message
Christoph Wickert (cwickert) wrote :

I think I found the root of the problem: alarm-clock assumes that ~/.config/autostart is available. If not, it crashes when trying to drop the launcher there.

Revision history for this message
In , chanueting (chanueting-redhat-bugs) wrote :

Created attachment 435736
Recent dump shows that the autostart successfully

May be the recent packages update solved this bug, I cannot reproduce it anymore.

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

I don't think it's really fixed, but now ~/.config/autostart exists. Can you please test somthing for me?

1. Disable the autostart in gnome-applet-alarm-clock
2. mv cd ~/.config/autostart ~/.config/autostart.back
3. Enable autostart in gnome-applet-alarm-clock. I guess it' going to crash now.
4. Is there ~/.config/autostart now and is the a launcher for alarm-clock inside?
5. After the tests, move ~/.config/autostart.back to ~/.config/autostart

Thanks!

Revision history for this message
In , chanueting (chanueting-redhat-bugs) wrote :

Created attachment 435826
Dump of failing to have autostart enabled

I am afraid you are right, and here is a dump in command-line showing the result. However, I have no idea to get the crash report from abrt. Could you mind showing me a way if you think the abrt report is helpful as well.

Revision history for this message
DimStar (dominique-launchpad-net) wrote :

Same issue is reproducible in openSUSE package.

The issue is, as stated by Christoph the assumption that ~/.config/autostart exists. In case it does not, the copy operation for the .desktop file fails and the error condition is not cleared after that. Thus, when removing and re-enabling autostart, there is already an error condition in memory and GError is not allowed to be overwritten.

Johannes H. Jensen (joh)
Changed in alarm-clock:
assignee: nobody → Johannes H. Jensen (joh)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Johannes H. Jensen (joh) wrote :

This should now be fixed in rev 193 and will be included in the next release. Please test :-)

Changed in alarm-clock:
status: Confirmed → Fix Committed
milestone: none → 0.3.2
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gnome-applet-alarm-clock-0.3.1-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/gnome-applet-alarm-clock-0.3.1-2.fc13

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gnome-applet-alarm-clock-0.3.1-2.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/gnome-applet-alarm-clock-0.3.1-2.fc12

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gnome-applet-alarm-clock-0.3.1-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gnome-applet-alarm-clock-0.3.1-2.fc14

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gnome-applet-alarm-clock-0.3.1-2.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update gnome-applet-alarm-clock'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gnome-applet-alarm-clock-0.3.1-2.fc13

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gnome-applet-alarm-clock-0.3.1-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gnome-applet-alarm-clock-0.3.1-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gnome-applet-alarm-clock-0.3.1-2.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

@Johannes - Thanks, but I find that the reported problems actually still occur in the trunk bzr branch lp:alarm-clock rev 194: Both the segfault, and the failure to create the ~/config/autostart directory when trying to *disable* autostart still occur (the trunk code only tries to create it when *enabling* autostart (which it already is by default) so its still effectively impossible for alarm-clock-applet to create the dir).

I am attaching a branch for your review with two additional revs (195 and 196) which fix the problems.

196:
  Fix disabling autostart: create ~/config/autostart directory for disable
  as well as for enable (LP: #610632).
195:
  Fix segfaults: clear 'err' after each g_error_free().

Changed in alarm-clock:
status: Fix Committed → Confirmed
Revision history for this message
Johannes H. Jensen (joh) wrote :

@Kamal - Great, thank you for the patch! Out of curiosity, how exactly is autostart enabled when there is no ~/.config/autostart? When it's enabled in the global /etc/xdg/autostart?

Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

@Johannes - Yes, that's exactly correct. If there's no ~/.config/autostart/alarm-clock-applet.desktop file (which there won't be initially) then it looks for /etc/xdg/autostart/alarm-clock-applet.desktop (which there will be initially). Hence, the default condition at install is that autostart is *enabled*, and unless somebody else comes along and creates our ~/.config/autostart dir for us, it cannot ever be disabled (without my rev 196 fix).

Revision history for this message
Johannes H. Jensen (joh) wrote :

Yes, now I was able to confirm the bug. Merged your branch into trunk rev 196, thanks!

Changed in alarm-clock:
status: Confirmed → Fix Committed
Changed in alarm-clock-applet (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Johannes H. Jensen (joh)
Changed in alarm-clock:
milestone: 0.3.2 → none
status: Fix Committed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

The fix should have landed in oneiric by now. Thanks, closing.

Changed in alarm-clock-applet (Ubuntu):
status: Triaged → Fix Released
Changed in fedora:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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