[Cs-dev] number of arguments to ftgen
Date | 2009-02-10 14:25 |
From | Oeyvind Brandtsegg |
Subject | [Cs-dev] number of arguments to ftgen |
Attachments | simplest.csd simplest1.csd None None |
I wonder if there is a limitation on the number of arguments to an ftgen call ? One of my students got into trouble when trying to render the attached file (simplest.csd), but if I just delete some lines of the ftable data, it runs fine (simplest1.csd). I wonder if there is a limit of 100 arguments or so ? Oeyvind |
Date | 2009-02-11 20:34 |
From | Anthony Kozar |
Subject | Re: [Cs-dev] number of arguments to ftgen |
Oeyvind, Both of your attached CSDs worked for me with Csound 5.10. There is a limit to the number of opcode arguments, but from looking at the code I think it is around 1000. I did notice that one of your files had just over 256 arguments, and another had just under that (256 being a popular number for programmers ...) *shrug* Are you still having this problem? Which version of Csound was your student using? Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ Oeyvind Brandtsegg wrote on 2/10/09 9:25 AM: > I wonder if there is a limitation on the number of arguments to an ftgen call > ? > > One of my students got into trouble when trying to render the attached > file (simplest.csd), > but if I just delete some lines of the ftable data, it runs fine > (simplest1.csd). > I wonder if there is a limit of 100 arguments or so ? ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2009-02-12 08:05 |
From | Oeyvind Brandtsegg |
Subject | Re: [Cs-dev] number of arguments to ftgen |
The student was using 5.09 on OSX, but also tried 5.10 and 5.07. I tried it with 5.10, and also with my compiled version here (not updated from CVS for a while). He said to me toady that "it sometimes work, sometimes not", which is even more puzzling. Maybe it has to do with GEN08 then ? I suggested he use gen02 or gen23 to input the values, and then use gen30 to "interpolate" the data, this worked for him. Still the issue with gen08 seems strange. Oeyvind 2009/2/11 Anthony Kozar |
Date | 2009-02-12 21:57 |
From | Anthony Kozar |
Subject | Re: [Cs-dev] number of arguments to ftgen |
What does Csound do when it misbehaves? Print out an error message? Segfault? Just produce incorrect results? What platform is this on? I was testing on Mac OS X. Perhaps there is an issue with line endings or \ on one of the other platforms. Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ Oeyvind Brandtsegg wrote on 2/12/09 3:05 AM: > The student was using 5.09 on OSX, > but also tried 5.10 and 5.07. > > I tried it with 5.10, > and also with my compiled version here (not updated from CVS for a while). > > He said to me toady that "it sometimes work, sometimes not", which is > even more puzzling. > Maybe it has to do with GEN08 then ? > > I suggested he use gen02 or gen23 to input the values, and then use > gen30 to "interpolate" the data, > this worked for him. > Still the issue with gen08 seems strange. > > Oeyvind > > 2009/2/11 Anthony Kozar |
Date | 2009-02-13 08:18 |
From | Oeyvind Brandtsegg |
Subject | Re: [Cs-dev] number of arguments to ftgen |
On windows it segfaults, I don't recall the exact error message on OSX, but it exits immediately, like a segfault at the table load time. I don't think it's to do with line endings (line continuation), because the original script did not use these. We tried with the line continuation to be able to better count the number of arguments allowed before crashing. best Oeyvind 2009/2/12 Anthony Kozar |
Date | 2009-02-14 20:41 |
From | Anthony Kozar |
Subject | Re: [Cs-dev] number of arguments to ftgen |
Attachments | simplest.csd None None |
OK, there is definitely a problem here but it doesn't always show up after a certain number of arguments or line length. I experimented with adding more arguments to the ftgen statement and with just two to eight more it segfaults but with ten more I get strange behavior where kr or ksmps is overwritten with the value for 0dbfs. Very strangely, this also happens if I comment out the extra lines! I tried running GDB, but I really do not know how to use it yet. So I am going to have to hand this one off to someone else. Here is the end of the output from GDB that I got when I ran the attached CSD: LINE 20: groups: giDkk ftgen 0 0 4096 8 0 32 102 32 234 32 366 32 502 32 620 32 708 32 748 32 664 32 540 32 358 32 200 32 54 32 0 32 -6 32 0 32 100 32 206 32 302 32 382 32 442 32 480 32 446 32 392 32 320 32 238 32 156 32 86 32 40 32 64 32 84 32 62 32 38 32 10 32 -24 32 -60 32 -116 32 -158 32 -198 32 -238 32 -300 32 -350 32 -382 32 -412 32 -440 32 -420 32 -364 32 -306 32 -226 32 -140 32 -190 32 -232 32 -268 32 -220 32 -334 32 -360 32 -380 32 -460 32 -398 32 -366 32 -334 32 -280 32 -232 32 -162 32 -72 32 34 32 160 32 140 32 160 32 180 32 150 32 110 32 90 32 40 32 0 32 -20 32 -10 32 10 32 20 32 0 32 -50 32 -94 32 -146 32 -184 32 -240 32 -268 32 -330 32 -370 32 -386 32 -400 32 -382 32 -340 32 -284 32 -250 32 -240 32 -230 32 -220 32 -230 32 -240 32 -250 32 -260 32 -250 32 -240 32 -264 32 -300 32 -340 32 -370 32 -380 32 -364 32 -290 32 -210 32 -150 32 -120 32 -100 32 -64 32 -50 32 -20 32 20 32 130 32 380 32 574 32 850 32 920 32 850 32 574 32 380 32 130 32 20 32 0 32 0 32 0 32 0 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x33320004 0x000f3060 in strsav_string () Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ Oeyvind Brandtsegg wrote on 2/13/09 3:18 AM: > On windows it segfaults, > I don't recall the exact error message on OSX, but it exits > immediately, like a segfault at the table load time. > I don't think it's to do with line endings (line continuation), > because the original script did not use these. We tried with the line > continuation to be able to better count the number of arguments > allowed before crashing. |
Date | 2009-02-14 22:02 |
From | Pinball |
Subject | Re: [Cs-dev] number of arguments to ftgen |
Anthony Kozar-2 wrote: > > OK, there is definitely a problem here but it doesn't always show up after > a > certain number of arguments or line length. I experimented with adding > more > arguments to the ftgen statement and with just two to eight more it > segfaults but with ten more I get strange behavior where kr or ksmps is > overwritten with the value for 0dbfs. Very strangely, this also happens > if > I comment out the extra lines! > > I tried running GDB, but I really do not know how to use it yet. So I am > going to have to hand this one off to someone else. Here is the end of > the > output from GDB that I got when I ran the attached CSD: > > LINE 20: > groups: giDkk ftgen 0 0 4096 8 0 32 102 32 234 32 366 32 502 32 620 32 > 708 32 748 32 664 32 540 32 358 32 200 32 54 32 0 32 -6 32 0 32 100 32 206 > 32 302 32 382 32 442 32 480 32 446 32 392 32 320 32 238 32 156 32 86 32 40 > 32 64 32 84 32 62 32 38 32 10 32 -24 32 -60 32 -116 32 -158 32 -198 32 > -238 > 32 -300 32 -350 32 -382 32 -412 32 -440 32 -420 32 -364 32 -306 32 -226 32 > -140 32 -190 32 -232 32 -268 32 -220 32 -334 32 -360 32 -380 32 -460 32 > -398 > 32 -366 32 -334 32 -280 32 -232 32 -162 32 -72 32 34 32 160 32 140 32 160 > 32 > 180 32 150 32 110 32 90 32 40 32 0 32 -20 32 -10 32 10 32 20 32 0 32 -50 > 32 > -94 32 -146 32 -184 32 -240 32 -268 32 -330 32 -370 32 -386 32 -400 32 > -382 > 32 -340 32 -284 32 -250 32 -240 32 -230 32 -220 32 -230 32 -240 32 -250 32 > -260 32 -250 32 -240 32 -264 32 -300 32 -340 32 -370 32 -380 32 -364 32 > -290 > 32 -210 32 -150 32 -120 32 -100 32 -64 32 -50 32 -20 32 20 32 130 32 380 > 32 > 574 32 850 32 920 32 850 32 574 32 380 32 130 32 20 32 0 32 0 32 0 32 0 > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x33320004 > 0x000f3060 in strsav_string () > > strsav_string is in namedins.c Edit the function. Add several printf. Display the content of s, n, h, ssp and so on. "s = %s\n" "h = %d\n" ... Add a printf before each comment... // here /* now find entry in database */ //here /* not found, so need to allocate a new entry */ ... so that you can see where it stops. -- View this message in context: http://www.nabble.com/number-of-arguments-to-ftgen-tp21934801p22017319.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2009-02-15 18:54 |
From | Oeyvind Brandtsegg |
Subject | Re: [Cs-dev] number of arguments to ftgen |
Yes, I can confirm that the overwriting of kr or ksmps happened on the student computer as well. I was not able to reproduce that same (kr) error on winXP. Oeyvind 2009/2/14 Anthony Kozar |