Cabbage Logo
Back to Cabbage Site

Strangeness in the output console when the performance ends

Exactly what’s the error you have? You have a log of the problem?

P.S.: what does Cabbage when you click on the STOP button? I cannot find where is the code that makes the Csound performance stop after you click that button…

vcpkg is not installing libsndfile. It works fine for me at home, but my not on my work PC. Strange. I will look into it again tomorrow.

Csound stops because I suspend processing(see below), but it is not released. It’s get destroyed before a compile (if it’s a valid object). I don’t destroy the node when a user hits stop because I wish to maintain the graph connections. I can take a look tomorrow and see how destroying Csound when a user hits stop works. I’ll just have to keep a record of the node connections so the patch remains in tact.

Yes, I wanted to try that…

UPDATE: It’s definitely not a Cabbage problem.

I just made a csd that goes in crash in both CsoundQT and from command line too… (segmentation violation)

Nice work. Now we can bring it to the attention of the Csound devs. Great.

[edit] I see you already have! You move fast.

Yes, I just sent a mail to the [Csnd-dev] list. I hope this can be solved soon… :slight_smile:

I might revert that code back to how it was in this case.

Yes, you should. Now I’m sure that those added lines are useless regards this matter. It could be nice if Cabbage could “intercept” a segmentation violation caused by Csound (during its performance) so that in these cases it doesn’t have to exit forcefully.

I wish that was possible, but I can’t intercept segmentation faults like this. When they happen Cabbage get taken down. I can’t do anything about it. As I mentioned before, the only workaround would be to launch Csound in its own separate process that runs alongside Cabbage. This will lead to other issues. I’m open to suggestion in how to get this to work, but I don’t think there is an easy way, as audio data has to be passed between Csound and Cabbage.

I’m a bit rusty on the matter, but do you think is it possible in C++ to catch a segfault exception?

I think it is possible catch it, but even if you do I don’t think it can save the host from crashing. See this post:


I guess it might still be worth a try?

Btw, I should also mention that CabbageLite is a pretty useful tool for testing stuff. It doesn’t have the same overhead as the Cabbage IDE so it can often be easier to debug issues there.

Yes, I think that what they say in that post generally speaking is right… If you allow your code to continue the execution there could be other memory leaks problems, because the Csound code that goes in segfault break its normal execution and then maybe it cannot do anymore all its deallocation stuff. So, maybe Cabbage could continue to work, but then the ram potentially would grow bigger at each rerun of the csd.

So it kind of leaves us stuck in limbo? Doesn’t seem to be much that can be done about it, apart from helping the Csound devs catch the underlying issues :wink:

Ideally, the best thing would be, as you said before, to run Csound in a separate process, so that the operating system could free all the ram allocated by the offending process without taking down Cabbage too. This would prevent future Csound bugs from affecting Cabbage too, but if it’s a task too complex to achieve, just forget it… :smiley:

I wanted to use Csound 6.10 (that on Windows doesn’t crash) with Cabbage, but then Cabbage complains with some errors I don’t remember now… Maybe it needs some features from later versions?

Anyway I hope the Csound devs can find the problem soon. It’s very frustrating to me having to relaunch Cabbage each time I replay for the 2nd time my csd file.

I think you just need to build against 6.10 as there were some changes to the API since then.

The truth is I don’t know how complex it would be. I do know that we would need to pipe data between Csound and Cabbage, and that would be slow, which is a no-no for audio. On the other hand, lots of plugin hosts are launching plugins in sandboxes these days for this very reason. I think that would be the best solution. But I just don’t know how to go about it. I’ll check the JUCE list and see if anyone there has anything to say about it.

Reaper (a very nice daw) has an option to make the user select if you want to run the vst plugins in native mode or in firewall mode (bridged). So, if you think your plugin is stable, you can go in native-mode to achieve max performance, otherwise, the bridged options is slower but safer. Reaper is a very flexible and efficient software, I have to say…

I agree. Reaper is about the best DAW our there. Bitwig does this too, and Renoise has some it for years. If we could do something similar in Cabbage it would be great.

John fixed the bug! I tested, it works!! No more crashes in the 2nd run! :slight_smile:

Nice work! I hope it makes it into the upcoming release…