Bug 380 - segfault when break window should pop up
Status:
RESOLVED FIXED
Component:
GUI :: gtkmm
Version:
1.4.1
Hardware:
PC Linux
Importance:
P2 major
Target Milestone:
---
Assignee:
Rob Caelers
URL:
Depends on:
Blocks:
Reported:
Apr 22 2004 10:05:09 UTC
by:
rob
Modified:
Jun 24 2004 12:07:43 UTC
| Who | When | What | Removed | Added |
|---|---|---|---|---|
| Rob Caelers | Jun 24 2004 12:07:43 UTC | status | NEW | RESOLVED |
| resolution | FIXED |
Description
rob Apr 22 2004 10:05:09 UTC
When either the timer determines that a break should start, or you click the
coffee icon to initiate a break workrave segfaults.
I see two errors, that are possibly related.
The first is:
(workrave:30112): Bonobo-CRITICAL **: file bonobo-running-context.c: line 427
(bonobo_running_context_auto_exit_unref): assertion `object != NULL' failed
that I get upon startup. When running in gdb a new thread spawns and kicks out
this error. I'm unsure how to get gdb to follow the problem thread:
GUI::init_nls() (this=0x8ef3760) at GUI.cc:436
436 bindtextdomain(PACKAGE, locale_dir);
(gdb) s
437 bind_textdomain_codeset(PACKAGE, "UTF-8");
(gdb) s
438 textdomain(PACKAGE);
(gdb) s
[New Thread 133024688 (LWP 30178)]
s
(workrave:30112): Bonobo-CRITICAL **: file bonobo-running-context.c: line 427
(bonobo_running_context_auto_exit_unref): assertion `object != NULL' failed
regan@shaftoe:bin> gdb workrave
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".
(gdb) r
Starting program: /usr/pkg-Linux-RH9-i686/workrave/bin/workrave
[Thread debugging using libthread_db enabled]
[New Thread -1084896576 (LWP 30799)]
[New Thread 34577328 (LWP 30800)]
(workrave:30799): Bonobo-CRITICAL **: file bonobo-running-context.c: line 427
(bonobo_running_context_auto_exit_unref): assertion `object != NULL' failed
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1084896576 (LWP 30799)]
TimeBar::set_progress(int, int) (this=0x0, value=0, max_value=0)
at TimeBar.cc:264
264 bar_value = value;
(gdb) bt
#0 TimeBar::set_progress(int, int) (this=0x0, value=0, max_value=0)
at TimeBar.cc:264
#1 0x080885c7 in RestBreakWindow::draw_time_bar() (this=0x86cd640)
at RestBreakWindow.cc:156
#2 0x0808857c in RestBreakWindow::start() (this=0x86cd640)
at RestBreakWindow.cc:128
#3 0x0807dc2c in GUI::start_break_window(BreakId, bool) (this=0x85e1760,
break_id=BREAK_ID_REST_BREAK, ignorable=true) at GUI.cc:846
#4 0x080b8433 in BreakControl::break_window_start() (this=0x861e970)
at BreakControl.cc:648
#5 0x080b80cc in BreakControl::goto_stage(BreakControl::BreakStage) (
this=0x861e970, stage=STAGE_TAKING) at BreakControl.cc:298
#6 0x080b8298 in BreakControl::force_start_break() (this=0x861e970)
at BreakControl.cc:445
#7 0x080a19b6 in Core::force_break(BreakId) (this=0x8616f98,
id=BREAK_ID_REST_BREAK) at Core.cc:455
#8 0x0807cccb in GUI::restbreak_now() (this=0x0) at GUI.cc:173
#9 0x08094cf3 in SigC::ObjectSlot0_<void, Menus>::proxy(void*) (s=0x0)
at object_slot.h:52
#10 0x00e54035 in Glib::SignalProxyNormal::slot0_void_callback(_GObject*, void*)
() from /usr/lib/libglibmm-2.0.so.1
#11 0x00c08051 in g_cclosure_marshal_VOID__VOID ()
from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#12 0x00bf5cb0 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#13 0x00c07a7c in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#14 0x00c06c36 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
(gdb)
I figured out that the reason why it segfaults is because the timebar object has
not been created. Simple work-around on RestBreakWindow.cc is:
regan@shaftoe:src> diff app/gtkmm/RestBreakWindow.cc
/tmp/orig/workrave-1.4.1/src/app/gtkmm/RestBreakWindow.cc
156d155
< if (!timebar) create_gui();
But I can not determine the underlying problem where the create_gui() function
had not been called before the draw_time_bar() function is called... possibly
due to the bonobo problem above?
I'm Running Fedora Core 1.
I've tried this on both the thirdparty redhat fc1 rpm, and compiled the source
directly myself.
Thanks,
RobComment 1
Rob Caelers Apr 27 2004 12:11:44 UTC
The bonobo errors are probably caused because workrave cannot find the .server files. They are installed in /usr/local/lib/bonobo/servers/. Gnome might not be looking in this directory... When workrave is running, try: bonobo-activation-run-query "_active == true" | grep Workrave It should output: OAFIID:GNOME_Workrave_Factory OAFIID:GNOME_Workrave_WorkraveControl About the crash: well spotted. I think it is already fixed in CVS. Could you try a nightly build. 1.6.0 will be release real soon (I hope)..