[sigc] SEGV: Deleting a connected instance in another connected instance's signal handler
- From: rsteinke w-link net
- To: libsigc-list gnome org
- Subject: [sigc] SEGV: Deleting a connected instance in another connected instance's signal handler
- Date: Sat, 18 Oct 2003 12:52:28 -0700
I've got a case where two different instances of two different classes
(call them M and C) connect to the same signal. M connects first, then C.
At some later time, C deletes M during C's callback from the signal.
That callback finishes successfully. The next time the signal is called,
I get a SEGV in emit_ (in particular, in Signal1<R,P1,Marsh>::emit_).
Some checking shows that it's inside the loop over SignalConnectionNode* i.
It's gotten through the loop once, successfully emitting the callback to C.
On the second iteration, it gets a bad value for s (sometimes 0, sometimes
something obviously bad like 0x11, sometimes a valid looking pointer with
and invalid s->proxy_) and seg faults. I've checked using 1.2.5, 1.2.4, and
1.2.1, so it isn't affected by the 'delete in its own callback' fix from
1.2.3. If I don't delete M, I don't get the SEGV.
Ron Steinke
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]