[PD] canvas_makefilename() returns error
Jonathan Wilkes via Pd-list
pd-list at lists.iem.at
Mon Jun 30 06:56:39 CEST 2014
It's hard to say without seeing the code.
Does x->x_canvas actually point to a canvas? The error seems to be telling you it isn't.
(Consistency check errors come from the bug() function. Generally they occur when an argument, struct, or struct field is checked for existence and fails that check.)
-Jonathan
On Sunday, June 29, 2014 9:25 PM, Jaime E Oliver <jaime.oliver2 at gmail.com> wrote:
Yes,
in the main struct x_canvas is created as:
t_canvas *x_canvas;
So, I think that is not the problem.
J
On Jun 29, 2014, at 8:00 PM, Jonathan Wilkes <jancsika at yahoo.com> wrote:
Well, it expects a t_canvas *, so if you send it something else it will trigger the error.
>
>
>-Jonathan
>
>
>
>
>On Sunday, June 29, 2014 8:47 PM, Jaime E Oliver via Pd-list <pd-list at lists.iem.at> wrote:
>
>
>
>Hi all,
>
>I am trying to use the canvas_makefilename() function in g_canvas.c
>
>I am calling it like this:
>
>static void lilypond_write(t_lilypond *x, t_symbol *s) {
> char buf[MAXPDSTRING];
> canvas_makefilename(x->x_canvas, s->s_name, buf, MAXPDSTRING);
>}
>
>but when I send the object a message such as [write test.txt( or similar, I get:
>
>error: consistency check failed: canvas_getenv
>Bus error: 10
>
>The method is set up like this:
> class_addmethod(lilypond_class, (t_method)lilypond_write, gensym("write"), A_SYMBOL, 0);
>
>Anybody has any
suggestion?
>
>best,
>
>J
>
>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?
>_______________________________________________
>Pd-list at lists.iem.at mailing list
>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140629/2ee33b2e/attachment.html>
More information about the Pd-list
mailing list