<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>Well, it expects a t_canvas *, so if you send it something else it will trigger the error.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>-Jonathan<br></span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica
 Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Sunday, June 29, 2014 8:47 PM, Jaime E Oliver via Pd-list <pd-list@lists.iem.at> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container">Hi all, <br><br>I am trying to use the canvas_makefilename() function in g_canvas.c<br><br>I am calling it like this: <br><br>static void lilypond_write(t_lilypond *x, t_symbol *s) {<br>    char buf[MAXPDSTRING];<br>    canvas_makefilename(x->x_canvas, s->s_name, buf, MAXPDSTRING);<br>}<br><br>but when I send the object a message such as [write test.txt( or similar, I get:<br><br>error: consistency check failed: canvas_getenv<br>Bus error: 10<br><br>The method is set up like this:<br>    class_addmethod(lilypond_class, (t_method)lilypond_write, gensym("write"), A_SYMBOL, 0);<br><br>Anybody has any suggestion?<br><br>best,<br><br>J<br><br>PS Sorry
 for pestering everyone with this, but there is little documentation on some of the functions in Pd. Perhaps this thread belong in the Pd-Dev list?<br>_______________________________________________<br><a ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br><br><br></div>  </div> </div>  </div> </div></body></html>