<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Miller and Pascal,</div><div class=""><br class=""></div><div class="">I’m getting the same crash using the latest libpd and pd 0.46-7 (the printout for clock_unset() is exactly as it should be).</div><div class=""><br class=""></div><div class="">Pascal, have you managed to find out what causes the crash?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Yuri</div><div class=""><br class=""></div><pre style="font-family: courier, 'courier new', monospace; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 0px; line-height: 19.6px; widows: 1; background-color: rgb(255, 255, 255);" class=""></pre><br class=""><blockquote type="cite" class=""><pre style="font-family: courier, 'courier new', monospace; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 0px; line-height: 19.6px; widows: 1; background-color: rgb(255, 255, 255);" class="">Hi Pascal -

You might not have up-to-date Pd sources (needed for multi-instance
to work) - for instance, here's the latest:</pre><pre style="font-family: courier, 'courier new', monospace; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 0px; line-height: 19.6px; widows: 1; background-color: rgb(255, 255, 255);" class="">void clock_unset(t_clock *x)
{
    if (x->c_settime >= 0)
    {
        if (x == pd_this->pd_clock_setlist)
            pd_this->pd_clock_setlist = x->c_next;
        else
        {
            t_clock *x2 = pd_this->pd_clock_setlist;
            while (x2->c_next != x) x2 = x2->c_next;
            x2->c_next = x->c_next;
        }
        x->c_settime = -1;
    }
}

(from either 0.46 or mater branches in git) - I don't know why you'd have an
old Pd as part of libpd but the line printout below doesn't look roght.

cheers
Miller

On Thu, Jun 11, 2015 at 03:42:59PM +0200, Pascal wrote:
> Anyone? Am I the only one who is having these clock_unset crashes ?

> Pascal



> > On 01 Jun 2015, at 11:12, Pascal <pascal.douill...@<a href="http://gmail.com" class="">gmail.com</a>> wrote:
> > 
> > I have a iOS project developed with XCode that uses libpd to load a Pure 
> > Data patch. My project uses a mix of [osc~] and [phasor~] with modulated 
> > parameters (pitch, volume, etc). My app is in 64-bit as now required. I am 
> > using the latest version of Pure Data and libpd.
> > 
> > The Pure Data patch runs fine in Pure Data but it crashes in XCode. I have 
> > an [osc~] that has its pitch modulated by an envelope. When I change the 
> > value of the length of the envelope (= modulation rate) on a device, it 
> > randomly crashes during testing but always on the same line of libpd code. 
> > I thought it had to do with how fast the parameter was changed but no, it 
> > also happens when the parameter is slowly changed.
> > 
> > Here is below a (reduced) patch where the problem occurs. I have recently 
> > catched up with Pure Data. Any suggestions or corrections are welcome.
> > 
> > modulatedOscillator.pd 
> > (<a rel="nofollow" href="http://forum.pdpatchrepo.info/uploads/files/upload-9c1506d8-30a2-4af3-8927-b4f97c73474e.pd" style="color: rgb(160, 30, 30);" class="">http://forum.pdpatchrepo.info/uploads/files/upload-9c1506d8-30a2-4af3-8927-b4f97c73474e.pd</a>
> >  
> > <<a rel="nofollow" href="http://forum.pdpatchrepo.info/uploads/files/upload-9c1506d8-30a2-4af3-8927-b4f97c73474e.pd" style="color: rgb(160, 30, 30);" class="">http://forum.pdpatchrepo.info/uploads/files/upload-9c1506d8-30a2-4af3-8927-b4f97c73474e.pd</a>>)
> > 
> > Here is a screenshot of the crash in XCode with the code sequence and the 
> > line of clock_unset that crashes.
> > 
> >  
> > <<a rel="nofollow" href="https://cloud.githubusercontent.com/assets/10989820/7903859/79938d6a-07e9-11e5-97d6-28fb59664a6e.png" style="color: rgb(160, 30, 30);" class="">https://cloud.githubusercontent.com/assets/10989820/7903859/79938d6a-07e9-11e5-97d6-28fb59664a6e.png</a>>
> > I have done some printing and it crashes in this function:
> > 
> > void clock_unset(t_clock *x){
> > if (x->c_settime >= 0){
> > if (x == clock_setlist) clock_setlist = x->c_next;
> > else{
> > t_clock *x2 = clock_setlist;
> > while (x2->c_next != x) x2 = x2->c_next;
> > x2->c_next = x->c_next;
> > }
> > x->c_settime = -1;
> > }
> > }
> > 
> > On this line :
> > 
> > while (x2->c_next != x) x2 = x2->c_next;
> > 
> > With a printed value of : x2->c_next==NULL
> > 
> > Someone replied to me about the issue on Stack Overflow:
> > "it seems that the clock that is being unset is not found in the list of 
> > currently maintained clocks. however, this is probably one of the most 
> > often used functions in Pd and afaict you only use bog standard built-in 
> > objects, which should make the patch pretty failsafe. i'm guessing that 
> > your problem is related to the new multi-instance features of Pd and you 
> > simply hit a bug."
> > 
> > Could it be a bug? Thanks in advance.
> > 


> _______________________________________________
> <a href="mailto:Pd-list@lists.iem.at" class="">Pd-list@lists.iem.at</a> mailing list
> UNSUBSCRIBE and account-management -> 
> <a rel="nofollow" href="http://lists.puredata.info/listinfo/pd-list" style="color: rgb(160, 30, 30);" class="">http://lists.puredata.info/listinfo/pd-list</a></pre></blockquote><div class=""><br class=""></div></body></html>