The code looks good - unfortunately, in these cases I'm usually suspicious that
somewhere else in the code something is causing memory corruption. If you
can get to a linux machine you can try the wonderful 'valgrind' program that
is very god for tracking down bad memory references in C code.
cheers
Miller
On Fri, Aug 23, 2013 at 12:24:14PM +0200, Orm Finnendahl wrote:
Hi,
trying to compile an external for Windows XP I get a very strange
error: pd crashes when calling outlet_float on an external outlet
(even if it isn't connected). The very same code runs well on both OSX
and Linux (same pd version, but has been running there for several
years). Bypassing the outlet_floats by sending to dedicated receivers
in the patch makes everything work as expected without any problems
(which makes it even stranger as it is a pretty involved external with
internal dynamic loading and connection of abstractions communicating
with internal in- and outlets with proxies using outlet_float and such
internally without any issues).
This is my first attempt with supporting Windows and my setup might be
screwed up, so I thought I'd ask on the list whether someone has an
idea how to further investigate into the problem. I'm compiling on a
virtual machine with XP and latest MinGW. I'm linking against a pd.dll
of pd-0.43-44 using all header files from that version as well. The
test is done with a pd of the same version.
Unfortunately I don't know anything about getting a debugger to work
on Windows. (I remember it was already painful to get it working with
inspection and breakpoints on my linux machine).
Below are the relevant code snippets of the external.
Any ideas?
--
Orm
--
code snippets:
# typedef:
typedef struct _quograph
{
t_object x_ob;
t_outlet *x_o0;
t_float x_currtime;
...
} t_quograph;
# instantiation/binding:
static void *quograph_new(t_symbol *s)
{
...
x-x_o0 = outlet_new(x-x_ob, s_list);
...
}
# calling example:
outlet_float(x-x_o0, x-x_currtime);
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -
http://lists.puredata.info/listinfo/pd-list
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -
http://lists.puredata.info/listinfo/pd-list