[PD] [msgfile]-bug?

IOhannes m zmoelnig zmoelnig at iem.at
Sun Oct 2 18:23:49 CEST 2005


hi

Roman Haefeli wrote:
> hi IOhannes, hi list
> 
> see attached patch. to intentionally make pd crash, just add a few symbols and remove a few. after 7-10 actions or so, pd crashes.

first my rant of the day:
i would highly appreciate if people would say which symbols they are
entering to make it crash (even better would be a bugreport-patch that
says "1st click here, 2nd click here, 3rd click here to crash")
people tend to write "type some symbols and sometimes it will crash and
sometimes not"; so what am i (as possible bugfixer) expected to do ??
guess which symbols people typed ?
end of the rant

nevertheless it was quite easy to make the patch you sent crash, so it
was not that hard to find out what was going on.

the problem turned out to be with most of msgfile's functions being
"non-reentrant" (the output things while still running in a
message-method; now the output is fed back to the object and modifies
via a 2nd message the data of the object; the 1st method continues to
execute and crashes since it assumes things of the data that aren't
valid any more)
anyhow, the CVS-version should be fixed now (i just commited it, so be
patient if you check out as anonymous)


a note on your patch:
i think it is not very clever to send a "delete"-message every time
something is omitted on the 1st outlet (you do so by triggering an [f]
(hopefully set to something valid by the 2nd outlet of [msgfile]) with
the 1st outlet.) (but it could well be, that you only do so, because it
proved to delay/circumvent/... the reentrance problem a bit)
and "find" changes the current position to the first matching line.
[delete( (without argument) deletes the current line (not specifying the
line# is more efficient, as you don't have to seek for the line; but i
know this only because i just read the code...)


mfg.asd.
IOhannes
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: statesaver2.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20051002/29ccfde0/attachment.txt>


More information about the Pd-list mailing list