On Fri, 7 Jul 2006, geiger wrote:
I think the case should be investigated. A segmentation fault in Pd is a bug and should be avoided.
Yes, and Pd already has several mechanisms for avoiding segfaults, so there is precedent. In particular, it has t_gfxstub and t_gpointer, which are two kinds of weak pointers. (there is also t_gstub, which is a kind of reference-counting pointer, but I'm not sure about categorizing it as a "segfault prevention device").
BTW, I have this problem with t_gpointers ... I want to do this,
[gemhead] | [t b a] | | [list] | [list trim] | [square]
Which a stub in which I'd insert a [until] so as to bang the [list] repeatedly. Note that this would all happen before the control is returned to [gemhead] (and I'm not destroying the gemwin either), so the gemstate message would still be valid. However, [list] wants to copy A_POINTER args as t_gpointer structs, whereas all A_POINTERs in GEM/GF/PDP are fake, so i get "consistency errors" and I suppose crashes would be possible too. How should I deal with this?
BTW someone had an alternate way of doing this using other objects, but I don't recall how.
I need this because of [GEMglVertex3f] or whatever the name is.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada