Quantcast

UDO and deact

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

UDO and deact

Steven Yi
Hi All,

I think this is mainly a question for Istvan, but any help would be
appreciated. Last night while working on an instrument I got setfaults
every time the first note stopped.  After debugging last night and
this morning I sort of came to the conclusion that somehow in the
deact call there was an infinite loop going on.  After making some
small tests and searching around in insert.c to figure out the UDO
code a little bit better, I found this bit of code in useropcdset:

    /* link into deact chain */
      lcurip->opcod_deact = parent_ip->opcod_deact;
      lcurip->subins_deact = NULL;
      parent_ip->opcod_deact = (void*) p;
      p->ip = lcurip;


I thought this line was a little suspect:

      lcurip->opcod_deact = parent_ip->opcod_deact;

and commenting it out got yielded in a run without segfaults.
However, I doubt that removing that code is the solution, is it?

The situation that seems to cause all of this is multiple calls to the
same UDO in the same instrument within a loop, such as (pseudo-code):

icounter = 0
loopStart:

ival  myUDO i1, i2, i3

if (icounter < 512) igoto loopStart


Any ideas what is a correct solution?  (Please let me know if you need
a test file and I can put one together).

Thanks,
steven


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Csound-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: UDO and deact

Istvan Varga
I made some changes that hopefully fix this error. I suspect that
subinstruments are also affected, but only looked at UDOs and those
seem to work better now.

Steven Yi wrote:

> I think this is mainly a question for Istvan, but any help would be
> appreciated. Last night while working on an instrument I got setfaults
> every time the first note stopped.
> ...
> The situation that seems to cause all of this is multiple calls to the
> same UDO in the same instrument within a loop, such as (pseudo-code):


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: UDO and deact

Steven Yi
Hi Istvan,

Much thanks for all of this.  Things seem to be working here now.
But... much bigger thanks for these new loop opcodes!  I've been doing
a lot of loops in the instrument code I've been working on and was
considering what would be required to get such a think in csound.
These do save a few lines and help clean up the code that much more.
Thanks!!!

steven


On 8/1/05, Istvan Varga <[hidden email]> wrote:

> I made some changes that hopefully fix this error. I suspect that
> subinstruments are also affected, but only looked at UDOs and those
> seem to work better now.
>
> Steven Yi wrote:
>
> > I think this is mainly a question for Istvan, but any help would be
> > appreciated. Last night while working on an instrument I got setfaults
> > every time the first note stopped.
> > ...
> > The situation that seems to cause all of this is multiple calls to the
> > same UDO in the same instrument within a loop, such as (pseudo-code):
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Csound-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Csound-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel
Loading...