<div dir="ltr">I<font face="arial, helvetica, sans-serif" color="#000000"> investigated and here is what I found:</font><div><font face="arial, helvetica, sans-serif" color="#000000">At initialization, pd_init() calls conf_init<span class="gmail-s1" style="">() </span>(m_pd.c l.311) <span class="gmail-s1" style=""> that calls </span>x_qlist_setup()  (m_conf.c l.91) that calls text_template_init<span class="gmail-s1" style="">() (x_text.c l.1970) etc. that ends by </span><span class="gmail-s1" style="">calling template_new() that binds a template to the the symbol "pd-text" (g_template.c l.154). This binding is only valid at initialization and is not duplicated when using new pdinstances that why it crashes. I guess there is the same problem with the symbols "pd-float" and "pd-float-array" with garray_init(). I'll try to find a solution now. </span></font></div>























</div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-02 12:07 GMT+01:00 Pierre Guillot <span dir="ltr"><<a href="mailto:guillotpierre6@gmail.com" target="_blank">guillotpierre6@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>I created a issue on the libPd repository (<a href="https://github.com/libpd/libpd/issues/196" target="_blank">https://github.com/libpd/<wbr>libpd/issues/196</a>) but perhaps it's more related to Pd itself. </div><div><br></div><div>When I load a patch with [text define], it crashes (x_text.c line 280) because x->x_scalar is NULL (because in scalar_new(), the function template_findbyname(<wbr>templatesym) returns NULL). So it seems that the function can't find a template linked with the symbol "pd-text". </div><div><br></div><div>I can't figure out why it works in Pd but not in libPd. Perhaps, libPd don't call a method to bind a template to this symbol at startup? Or perhaps it's related to the fact that I use PDINSTANCE and PDTHREADS? I can't figure out the solution so any idea is welcomed!</div><div><br></div><div>Cheers,</div><div>Pierre</div></div>
</blockquote></div><br></div>