<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-family:arial,sans-serif;font-size:13px">On minor thing - you probably have to protect all of the libpd() calls with<br>
</span><span style="font-family:arial,sans-serif;font-size:13px">a lock to keep separate threads from getting to it simultaneously.  (It's<br></span><span style="font-family:arial,sans-serif;font-size:13px">not sufficient to just use the "THREAD_LOCK" mechanism in Pd - that would<br>
</span><span style="font-family:arial,sans-serif;font-size:13px">protect Pd OK but not the libpd code.</span></blockquote><div><br></div><div>I don't understand what you mean by protect libpd calls with a lock. Isn't it what I'm doing with libpd_lock() ?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-08 12:39 GMT+02:00 Miller Puckette <span dir="ltr"><<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On minor thing - you probably have to protect all of the libpd() calls with<br>
a lock to keep separate threads from getting to it simultaneously.  (It's<br>
not sufficient to just use the "THREAD_LOCK" mechanism in Pd - that would<br>
protect Pd OK but not the libpd code.<br>
<br>
cheers<br>
Miller<br>
<div><div class="h5"><br>
On Tue, Jul 08, 2014 at 11:56:36AM +0200, Paul-Arthur Sauvageot via Pd-dev wrote:<br>
> ><br>
> > from your host? from juce?<br>
> > fgmsdr<br>
> > IOhannes<br>
><br>
><br>
> I tried with different hosts and the problem is the same.<br>
> I don't think it comes from JUCE neither. The things is if I remove the<br>
> pd_setinstance() calls, it doesn't crash (But the sound is ugly, as it was<br>
> before the multi instance update, which is logic). The weird thing being<br>
> that it doesn't crash in the VST functions, but it has something to do with<br>
> those pd_setinstance() calls which are only made on the VST functions...<br>
><br>
><br>
> 2014-07-08 11:43 GMT+02:00 IOhannes m zmoelnig <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>>:<br>
><br>
> > -----BEGIN PGP SIGNED MESSAGE-----<br>
> > Hash: SHA256<br>
> ><br>
> > On 2014-07-08 10:54, Paul-Arthur Sauvageot via Pd-dev wrote:<br>
> > > Hello,<br>
> > ><br>
> > > I'm currently trying to make a VST that uses libpd and the pd<br>
> > > update allowing multi instances (via pd_instance). But it's not<br>
> > > working,<br>
> ><br>
> > i would be very surprised if - at this moment - the multi-instance<br>
> > code *would* be working.<br>
> > afaict, we are making *small* steps towards this goal.<br>
> ><br>
> ><br>
> > > According to my logs and my debugger, it never crashes in the VST<br>
> > > functions, it seems to crash on some pthread functions like<br>
> > > pthread_kill but I never use these functions...<br>
> > ><br>
> > > Does someone has any idea of where it could come from ?<br>
> ><br>
> > from your host? from juce?<br>
> ><br>
> > fgmsdr<br>
> > IOhannes<br>
> ><br>
> > -----BEGIN PGP SIGNATURE-----<br>
> > Version: GnuPG v1<br>
> > Comment: Using GnuPG with Icedove - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
> ><br>
> > iQIcBAEBCAAGBQJTu70fAAoJELZQGcR/ejb4KdAP/iLrhMFWQ4ZSff8+AX1YnHo/<br>
> > DO7N/fgkh2AfUiJiqZfLQqZT7DQYIweyOBk0p+vtpFeNZR76D4xuNDOAiC0V5/Nf<br>
> > XWJq/nq40Rg5SL/Gej9fpI0/ahVTovTpnmZt4CgAfKqwb2GVWoqDUBjiZ/hIxffi<br>
> > hH1szv5AeXdDAJp67PxGk/b0zv9m+pi0tS0CB2j5Fh3RlTqTefV6ZKI0cZAv6jth<br>
> > +qQA9OJzEHK4bpNoCMQbtJqr8XbREhD/mG+1yLopnm5fvkUyravVTqqaPczZuqUq<br>
> > YJ7EH4z5FGjeRjDI5k0MRkdu093Iv7w/iWf0HNRQPL8AM4Hm4XdntYI8B1lkYVFg<br>
> > lmxqKjuV9JKaPLzY7ztlxqPxFO7oKy2BQe4Z73F8aBi8w79dGEx+p2CclzC8oLnX<br>
> > arIPCIlA9Ybaie4GCwbMi2REO4/XK/CxgP3YV97FdU3wjE83mBOPcx1RYAWY+XVV<br>
> > 0T3hioln+R95eaBr4EoO6X1vtxhw2IFhEju4AzGmhwQx3Wo3eFfH2Bkf6Crwkl+o<br>
> > 10tWXKfaUZS5lPbkAb04ardPvF8GAs/HXnZBeJGvXSf4TICc6OZILMNFM4yM2rcg<br>
> > uX2lPZqU3bOnrFpyIxR7J/UgV3DsMbfd7nTmUJaY0q6DGoYaiiwAzEyN2hTOGvYx<br>
> > iwiZ9lpCKTQZCpXtt679<br>
> > =R/3q<br>
> > -----END PGP SIGNATURE-----<br>
> ><br>
><br>
><br>
><br>
> --<br>
> SAUVAGEOT Paul-Arthur.<br>
> Développeur C \ C++ \ C#.<br>
<br>
</div></div>> _______________________________________________<br>
> Pd-dev mailing list<br>
> <a href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a><br>
> <a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">SAUVAGEOT Paul-Arthur.<div>Développeur C \ C++ \ C#.</div></div>
</div>