<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">Miller,<br>     Is it ok to add (potentially) more "#N struct etc." headers to patch files, specifically for templates that are defined in that patch?<br><br>It looks like that header is currently written for orphan scalars, or for scalars whose template might be defined elsewhere (like in a patch or abstraction which hasn't loaded yet).  But I've added some checks in gtemplate_new to prevent [struct] objects from creating when there are circular dependencies and/or undefined array element templates.  In those case, having the "#N struct" headers will ensure that the structs will be able to create when the patch is reloaded.<br><br>This should prevent the user from crashing Pd when manually creating [struct] objects, while the "#N struct" stuff will let Pd create
 all the templates it needs for the patch to load correctly.  (Of course someone could still edit a patch file by hand and cause a circular dependency crash or something, but I'm not sure how to prevent that.)<br><br>That would leave a single reallocation crasher somewhere in template_conformglist.  It happens when you have scalar with array elements in it, and you start mucking around with the [struct] args of either the container or the array element template.  (I can't reproduce it reliably yet.)<br><br>-Jonathan<br></div></body></html>