Cabbage Logo
Back to Cabbage Site

Isolated problem, but no clue what to do to fix

It seems I keep running up against this problem of having my plugin run the first time, only to crash on the second…

So, in commenting things out to isolate the offending code, I’ve been able to isolate where it occurs. The attached archive is my project, and if you open the FMLab.csd file, and run it, it will run multiple times without issue. The problem occurs when you uncomment lines 77-80 in the file “guihelper.orc”, it will run fine the first time, but upon the second run, it crashes Cabbage. I also tried to uncomment other lines after this, and it still crashes, any code past line 76 in “guihelper.orc” will crash Cabbage.

What I don’t understand is that this instr is only trying to access the value of it’s associated widget.

Archive.zip (17.1 KB)

I wonder has it something to do with that include file not been found on the second compile. Can you use an absolute full path to the include file to see if that helps?

Well, doesn’t seem to have any effect replacing the relative paths with absolute. It still crashes on the second run.

1 Like

I get an error when i try this:

error: syntax error, unexpected T_IDENTB  (token "printsk") from file guihelper.orc (3)
 from file /Users/rwalsh/Downloads/Archive/FMLab/FMLab.csd (1)
 line 66:
>>>        printsk <<<
Parsing failed due to invalid input!
Stopping on parser failure
cannot compile orchestra

So, it appears to be choking on a Csound opcode call. I’ll try to comment them out and see what happens. I’ll get back with you…

Ok, this makes no sense, I commented all of the ‘printsk’ calls in that instr, and it is no longer crashing.

I’ve often wondered about the two opcodes ‘printsk’ and ‘printks’. They appear to do the same thing, but one requires a time offset for operation. Other than that, I can’t see what is going on. Is ‘printsk’ a part of the core Csound opcodes?

I’ve replaced the ‘printsk’ calls with ‘printks’, and everything seems to work on the second run and all subsequent…

I’m curious, but what system are you using to run my program? I’m just curious why you get this error, while mine is crashing.

I’m just using Cabbage. No special tools.

I’m referring to the underlying os. Each system seems to respond differently to certain errors, and it seems that on my Mac, I’ve cornered the market on fatal crashes and how to cause them.

Also, should I avoid using ‘printsk’? I use it over ‘printks’, but I can change!

Apologies I’m testing on macOS. I’ve never used printsk so I can’t comment on that one. I find myself using printf more and more because I can use the output of a cabbageGet to trigger printing.

I’m going to assume you’re using a later version than 10.13.6. That’s the latest version I can run on my machine.

Yes, I’m on Big Sur now and Csound 6.16. What version of Csound are you using?

I believe it’s 6.16. I just use your installer.

Strange. I’ve had various problems down through the years with the Csound message buffer, but thankfully you seem to have found a fix.

well, more a workaround…

Progress is good!

If you don’t mind my asking, what is the issue revolving around? Is it how cabbage communicates with csound?

With printing? I never got to the bottom of it tbh. And I have noticed that in a while.