Comment 12 for bug 269083

Revision history for this message
Joakim Andersson (jocke) wrote : Re: gnome-power-manager crashed with SIGSEGV in g_closure_invoke()

After some more hours of debugging we have pinpointed the problem to a (most probable) memory corruption, memory seemingly owned by glib... (Queue enthusiastic wahoo's.)

As to why or where this is happening, we haven't got a clue (yet?).

More detailed explanation:
The GpmEngine pointer (mostly named "engine" in gpm-engine.c) is, accordingly to GDB, correctly sent to g_signal_connect (from gpm_engine_init in gpm-engine.c). However, when gpm_cell_array_charge_low_cb is called from glib's event handler, the engine pointer is a different one. When running Hardy's version of g-p-m in Intrepid, this doesn't happen.

We managed to get Intrepid's version working using a very very very very /.../ very very very fugly hack... That is, we saved the pointer generated in gpm_engine_new (like everything else, in gpm-engine.c) to a global (static) variable, and then restored it inside gpm_cell_array_charge_low_cb. Ta-da, no segfault when charge-low should be emitted! (eh... wahoo?) Like I said, this is fugly, but at least we've demonstrated the problem.

Unless this is fixed before Intrepid's release, I suggest a revert to Hardy's version is made. We can't have g-p-m crashing on all amd64 laptops out there...