Hi everybody, I have a strange bug only on Linux. When I create a t_symbol with @ inside it and try to add it to a binbuf PD crashes .
dummy code that crashes:
t_gotfn mpreset = zgetfn(&y->g_pd, s_preset); SETSYMBOL(av, gensym("@zaza")); binbuf_add(b, 1, av); mpreset(y, b); (it seems to crash here)
dummy code that works:
t_gotfn mpreset = zgetfn(&y->g_pd, s_preset); SETSYMBOL(av, gensym("zaza")); binbuf_add(b, 1, av); mpreset(y, b);
I don't know if it's a linking problem or if I do something wrong in the code. Any help will be welcome !
Here the link of the full project : https://github.com/CICM/CicmWrapper In the CreamLibrary folder, you can use the codeblock project "c.library" if you want to try it. And the bug is in the function "preset_store" of the file "c.preset.cpp" in the chocolate subfolder.
Cheers
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2014-05-13 20:31, Pierre Guillot wrote:
mpreset(y, b);
mpreset()?
this is not a function exported by Pd. if it crashes, you might investigate the source of this function.
you might also run pd+external in a debugger (gdb, or ddd if you are a visual type) to see where exactly¹ it crashes.
tip of the day: use "-noprefs -nrt -stderr" (and "-alsa -nosound" if you don't need audio output) when running in the debugger.
fgmad IOhannes
¹ in some cases this might not be very exact; but if you have a sane memory management and no threads, gdb will get you very close to the crashing code line.
Hi, Thanks, I found the error. It's in another part of the code... just have to find the solution now. I'll keep you in touch if it's seems to be a Linux bug but I think that Mac and Windows are more permissives. Cheers
2014-05-14 9:23 GMT+02:00 IOhannes m zmoelnig zmoelnig@iem.at:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2014-05-13 20:31, Pierre Guillot wrote:
mpreset(y, b);
mpreset()?
this is not a function exported by Pd. if it crashes, you might investigate the source of this function.
you might also run pd+external in a debugger (gdb, or ddd if you are a visual type) to see where exactly¹ it crashes.
tip of the day: use "-noprefs -nrt -stderr" (and "-alsa -nosound" if you don't need audio output) when running in the debugger.
fgmad IOhannes
¹ in some cases this might not be very exact; but if you have a sane memory management and no threads, gdb will get you very close to the crashing code line. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/
iQIcBAEBCAAGBQJTcxoFAAoJELZQGcR/ejb4iXoQAIvZdGahUseWC+RtOt2zbR9O MVeuT+WzPfAq2qXniEIWBLj3u3h1JKf7+biUrbcnXZuMnBzdDWsRiSsrzObTOULS 08WUCH2q80X/mTUuDP3qndUVWokONSz4OQtG7H6v0/mDJPfhkhlahZiQBizt3cQS LSwAUHT4uUzjSgjR/CfHA1kJk1W2x1zqraiU5GHRNoco+PsLvRQjyFMemlsGqqBl OjpWt/0BPnvLVzVO2T0xolsyiM6Wu8eLwhWk4e2vJ7/yT1ZMoKwmEh8EBLZbWbN2 VJAl+VVszm5pfs3Kw/3VyZ+CFMnbq+Zj7ctxpi/aEn0vF63Q+s1KvAOhiQ2fhp/D DZnk7Kpd6xXbSrV35sttQ3O3ZrSKACjKbdeQGbNGPXwf9jJ6qZ9VkciBB0kVjo73 6l3gBIuYjbSZ8qF1YGmisHD5zPQE7Vz5LVUfRdCyaBu6JPRSdQWr3kaaiM0r8oHC 59YE7iQiqtZ6kGXuG1aZEQsOsvDlKtgPR3fFRmb/RFqUMCDaFtbdu2iQKpH1a6Aa EMZyVVC02pUl9ObU8OFj2c7DxGiRPMRKylAc9Yyc+Lm69oHhU5j4fNEae+7JIH1k niBMF6Slb9p/20/I36BTNig4qerqdFapbXWNqL2c2BQ0ICQjVI+z3XlQMeyyVUyc JvH06s3Qx1EXY5r5C00E =cvGy -----END PGP SIGNATURE-----
Pd-dev mailing list Pd-dev@lists.iem.at http://lists.puredata.info/listinfo/pd-dev