gEDA-dev: Another autosave crash....
Ales Hvezda
ahvezda at seul.org
Mon Sep 4 12:52:03 EDT 2006
Hi Patrick,
[snip]
>I may be wrong but I do not think a mutex will help in any way.
Yes, you are correct. A mutex will not help here. I didn't
realize that in gtk+ the whole GSource mechanism is implemented via the
main loop and not a thread.
[snip]
>Could people would have experienced this bug please try adding the
>following lines to s_toplevel_delete(), recompile and let us know if
>it solved the issue or not?
>
> if (toplevel->auto_save_timeout != 0) {
> gboolean ret;
> ret = g_source_remove (toplevel->auto_save_timeout);
> g_assert (ret);
> }
This hopefully fixes the bug, however, on my machine the
above g_assert was failing. This is because I had the component insert
dialog box open as well on close, and the autosave callback was being
registered for the preview window (something we really do not want).
I have refactored/moved the init of the autosave callback to the only
place we want it (in x_window_setup(). I am still seeing a jump based
on a uninitalized variable from valgrind in the above if statement that
I do not understand yet. However, I have commited these changes to CVS
now. Please verify.
I hope all these changes greatly improve the stability of gschem.
Thanks for the bug fix Patrick!
-Ales
More information about the geda-dev
mailing list