Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Christof Ressi
ah, now I see! class_new() returns a null pointer if the precision doesn't match. In pddplink_setup() they try to access members of the class instance, that's why you get a segfault. Just add a null pointer check and you're done. > Gesendet: Mittwoch, 11. Dezember 2019 um 02:07 Uhr > Von:

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
I could get this from linux, at least is something: ~ Program received signal SIGSEGV, Segmentation fault. 0x76170e93 in pddplink_setup () at pddp/pddplink.c:353 353 sys_vgui("source {%s/pddplink.tcl}\n", dirsym->s_name); ~~~ But no worries is just an edge

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Christof Ressi
We must find out where exactly the segfault happens. You can either look up how to set breakpoints and step through the code, or use good 'ol printf debugging :-) > Gesendet: Mittwoch, 11. Dezember 2019 um 00:31 Uhr > Von: "Lucas Cordiviola" > An: "pd-dev@lists.iem.at" , "Christof Ressi" > >

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
This is the backtrace with Msys2: ~~ Program received signal SIGSEGV, Segmentation fault. 0x6eb469f5 in pddplink_setup ()    from /d/00-lucarda-external-dep/out64single-new-cyc/lucdep/liblucdep.dll (gdb) bt #0  0x6eb469f5 in pddplink_setup ()    from

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
Thx :) Mensaje telepatico asistido por maquinas. On 12/10/19 7:59 PM, Christof Ressi wrote: >> How do I install gdb in msys2? > pacman -S gdb > > Execute in MinGW32 shell and MINGW64 shell accordingly > >> How do I use it? > gdb --args pd [arguments] >> run // actually run the program > ...

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
I mean this works fine on linux and windows single-precision but this single-precision lib crashes Pd-double in win and linux. ? Mensaje telepatico asistido por maquinas. On 12/10/19 7:50 PM, Lucas Cordiviola wrote: Ok. So why do I get a segfault on linux and a crash on windows

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
I get the segfault on linux (it also crashes Pd-double) ~~~ Program received signal SIGSEGV, Segmentation fault. 0x76170e93 in pddplink_setup ()    from /home/lucarda/Desktop/luclibdep/00-lucarda-external-dep/out64single/lucdep/liblucdep.so ~~~ :) Mensaje

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Christof Ressi
> How do I install gdb in msys2? pacman -S gdb Execute in MinGW32 shell and MINGW64 shell accordingly > How do I use it? gdb --args pd [arguments] > run // actually run the program ... wait for crash ... > bt // get the backtrace press Enter repeatedly to see more lines Christof > Gesendet:

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Christof Ressi
pretty complicated for many people, I guess. Maybe there's a way to automate this? One idea: add a macro for setup functions: #ifdef DOUBLEBUILD #define SETUP(setup) ... // mangle "setup" based on PD_FLOATSIZE #else #define SETUP(setup) setup #endif add another macro: #if

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
Ok. So why do I get a segfault on linux and a crash on windows ~~~ void pddplink_setup(void) { t_symbol *dirsym; pddplink_class = class_new(gensym("pddplink"), (t_newmethod)pddplink_new, (t_method)pddplink_free, sizeof(t_pddplink), CLASS_NOINLET |

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Christof Ressi
> Is this: "A_FLOAT" forbidden?   I'm not sure what you mean exactly, but A_FLOAT is an atom type, so it's 100% unrelated to single/double precision.   Gesendet: Dienstag, 10. Dezember 2019 um 23:37 Uhr Von: "Lucas Cordiviola" An: "pd-dev@lists.iem.at" Betreff: Re: [PD-dev] Double precision

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
Is this: "A_FLOAT" forbidden? ~ void pddplink_setup(void) { t_symbol *dirsym; pddplink_class = class_new(gensym("pddplink"), (t_newmethod)pddplink_new, (t_method)pddplink_free, sizeof(t_pddplink), CLASS_NOINLET | CLASS_PATCHABLE, A_GIMME, 0); class_addanything(pddplink_class,

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
On 12/10/2019 6:32 PM, IOhannes m zmölnig wrote: > On 12/10/19 9:45 PM, Lucas Cordiviola wrote: >> But I'm creating a single binary external with a collection of authors >> [zexy] [cyclone] [ggee] [pddplink] ... > what's the purpose of this? > and what's the license? Currently I share Pd-Albums

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
@christof How do I build Pd with debug symbols? How do I install gdb in msys2? How do I use it? or can I send you the .dll lib and test patch do you get the backtrace? -- Mensaje telepatico asistido por maquinas. On 12/10/19 6:48 PM, Christof Ressi wrote: >>> # pkgs including both single-

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread IOhannes m zmölnig
On 12/10/19 10:48 PM, Christof Ressi wrote: > > I'm also interested in how this works. The following solution popped up in my > head: compile the object twice, one time with -DPD_FLOATSIZE=32 and another > time with -DPD_FLOATSIZE=64, with different setup functions based on > -DPD_FLOATSIZE,

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Christof Ressi
> > # pkgs including both single- and double-precision externals > > a single external binary (say: "foo.dll") can hold both single-precision > > and double-precision variants of the [foo] object. I'm also interested in how this works. The following solution popped up in my head: compile the

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread IOhannes m zmölnig
On 12/10/19 9:45 PM, Lucas Cordiviola wrote: > But I'm creating a single binary external with a collection of authors > [zexy] [cyclone] [ggee] [pddplink] ... what's the purpose of this? and what's the license? > > I create a setup for the lib and is working *OK* in Pd-w64-32 but it > crashed

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
On 12/10/2019 4:54 PM, IOhannes m zmölnig wrote: > # avoiding crashes > an external that has been compiled with single-precision will not > register objectclasses in a double-precision Pd - so the doubl-precision > Pd will not know about those new objects and not crash while using them. > same

Re: [PD-dev] Double precision externals extensions.

2019-12-10 Thread IOhannes m zmölnig
On 12/10/19 7:22 PM, Lucas Cordiviola wrote: > Could we have special extension for double-precision external? > > Something like foo.m_amd64dp ? > > This way we can have external pkgs including both single and double > externals. > > Also instruct Pd to *not* try to load the not current

[PD-dev] Double precision externals extensions.

2019-12-10 Thread Lucas Cordiviola
Could we have special extension for double-precision external? Something like foo.m_amd64dp ? This way we can have external pkgs including both single and double externals. Also instruct Pd to *not* try to load the not current precision and avoid crashes. -- Mensaje telepatico asistido