[PD-dev] Re: [ pure-data-Bugs-1518030 ] subpatch clearing itself crashes Pd

Frank Barknecht fbar at footils.org
Sun Feb 11 16:05:13 CET 2007


Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

> That's not true at all: You can delete objects just fine in almost
> every way possible, you just aren't allowed to initiate this deletion
> from the object to be deleted itself without [delay], because this
> would create a loop and a "chicken-and-egg" problem because the
> message that initiates the suicide happens at the same logical time as
> the suicide. This is a tree that does not end because it is cyclic.

Just to illustrate this attached is a patch which shows how to
correctly commit suicide without hurting anyone else. The [delay] on
the left side is used to avoid the chicken-and-egg bug that was
deliberatly patched into the "bad-suicide" version on the right.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 441 218 450 300 10;
#N canvas 0 0 450 300 good-suicide 0;
#X obj 111 120 bng 15 250 50 0 empty empty kill_me! 17 7 1 10 -262144
-1 -1;
#X obj 111 201 outlet;
#X connect 0 0 1 0;
#X coords 0 -1 1 1 85 60 1 100 100;
#X restore 61 74 pd good-suicide;
#N canvas 0 0 450 300 bad-suicide 0;
#X obj 111 120 bng 15 250 50 0 empty empty kill_Pd! 17 7 1 10 -262144
-1 -1;
#X obj 111 201 outlet;
#X connect 0 0 1 0;
#X coords 0 -1 1 1 85 60 1 100 100;
#X restore 259 75 pd bad-suicide;
#X msg 61 164 \; pd-good-suicide clear;
#X obj 61 142 delay;
#X msg 259 163 \; pd-bad-suicide clear;
#X connect 0 0 3 0;
#X connect 1 0 4 0;
#X connect 3 0 2 0;


More information about the Pd-dev mailing list