Cabbage Logo
Back to Cabbage Site

Cabbage crashes when open paren with array

This code crashes Cabbage IDE (in the latest devel build), the open paren is the cause :

<CsoundSynthesizer>
    <CsInstruments>
        gitab[] fillarray 0,1,2
        instr 1
            // NEXT LINE CRASHES DUE TO PAREN
            icrash = 1 +   ( gitab[1]
        endin
    </CsInstruments>
</CsoundSynthesizer>

I couln’t build a CabbageIDE debug in order to provide a stacktrace, sorry…

Thanks I’ll take a look…

The problem is this code causes a segfault in Csound, which in turn brings down Cabbage. There is nothing I can do to stop this. What OS are you on again? I will file a github issue about this on the Csound project page. It shouldn’t cause a segfault…

[edit] issue filed

Yes I didn’t see that it was csound’s fault :sweat_smile:
I run Ubuntu 19.04, --Csound version 6.12 beta (double samples) 2019-01-22

On Windows and MacOS Cabbage includes a very simple version of Csound that runs a few k-cycles just before Cabbage tries to run the instrument. If this process crashes, Cabbage holds off running the instrument. In this way it can prevent Cabbage from crashing. I never got around to adding it to the Linux build. I think mostly because I have always made an assumption that those working on Linux are used to crashes :rofl:

But also because most people working on Linux know best how to deal with crashes and almost instinctively try to get a backtrace, or look into the issue. But perhaps this is one of the reasons why more people don’t make the move to Linux. Because there is an assumption that they KNOW how to use an OS, and can handle low level procedures and operations. Those who can’t find themselves sinking into the abyss, and simply return to Windows or OSX.

You are probably right… we also tend to forget how to do it : I haven’t debugged C code for literally two decades, I’m reluctant… :dizzy_face: