Cabbage Logo
Back to Cabbage Site

Fmod 1.09.02 crash on mac

Hey Rory. First, I have to say that I’m a real noob concerning Csound. And I would like to say thank you for your work, it seems great! I watched a few of your videos and I’m very impressed.

I was trying to make a first small plugin for Fmod Studio, but when I tried to add it to an event timeline, Fmod crashed.
I’m on Mac, using Fmod Studio 1.09.023 with Cabbage 1.1.07.

My Cabbage code is:

form caption("Saw") size(400, 300), colour(58, 110, 182), pluginID("def1")
keyboard bounds(8, 158, 381, 95)
rslider bounds(28, 12, 50, 50), channel("Release"), range(0, 1, , 1, 0.1), text("Release")
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
sr = 48000
ksmps = 64
nchnls = 2
0dbfs = 1

;instrument will be triggered by keyboard widget
instr 1

iSlider chnget "Release"
kEnv madsr 0.01, 0.2, 0, iSlider
aOut vco2 p5, p4 
outs aOut*kEnv, aOut*kEnv
endin

</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
</CsScore>
</CsoundSynthesizer>

I’ll try on my mac later but you should probably remove the keyboard widget, and also the CsOption relating to MIDI. The FMOD plugin will load an orchestra as soon as the timeline reaches it, so in this instance you are better off starting an instrument explicitly in your orchestra. For example, try the code below. It will trigger your synth to play each time the sound plugin is triggered in FMOD.

form caption("Saw") size(400, 300), colour(58, 110, 182), pluginID("def1")
rslider bounds(28, 12, 50, 50), channel("Release"), range(0, 1, , 1, 0.1), text("Release")
<CsoundSynthesizer>
<CsOptions>
-n -d 
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
sr = 48000
ksmps = 64
nchnls = 2
0dbfs = 1

;instrument will be triggered by keyboard widget
instr 1
iSlider chnget "Release"
kEnv madsr 0.01, 0.2, 0, iSlider
aOut vco2 p5, p4 
outs aOut*kEnv, aOut*kEnv
endin

</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
i1 0 3600 200 1
</CsScore>
</CsoundSynthesizer>

p.s. I just tried this code on Windows and it works fine. Your code doesn’t play anything, which is expected, but it doesn’t crash FMOD for me either?

I tested this on OSX too and it worked Ok for me. Same as before, your code doesn’t produce any sound, but it didn’t crash FMOD either.

No crash with my code? Weird. I’m on OSX 10.12.03 if it has something to do with it.
I’ll try your code soon. Thanks for the answer!

Ok, so I tested your code, and as soon as I select the plugin sound in Fmod, Fmod crashes. But it simply quits, no log nor crash message, so I don’t know how to give you more feedback than this.

Thanks for testing. I just read on the FMOD page that there are some incompatibilities with between 1.08 and 1.09. I’m not sure if that’s the issue here, but I definitely built this interface using FMOD 1.08. I wonder if you could try one of the 1.08 versions and see if that helps at all? I can’t recall off hand which version I tested with yesterday. I won’t be able to get to my Mac until I return to work on Monday. But let’s see if we can’t identify the problem before then.

Hey Rory.
I just tried with Fmod 1.08.16 and I had the same crash.

Thanks for checking. The latest FMOD API has a feature for logging messages which will prove useful here. We need to see what is happening. I’ll try to update the CsoundFMOD plugin early this week. Until then I’m not really sure what else we can try out. Cabbage works Ok right?

Thanks.
Cabbage seems to work right. No crash, the sound is playing and the csd and dylib are exported.

I updated the source for this plugin. I will try to prepare a new version of OSX tomorrow.

Can you try the dylib I posted to here:


Simply replace the one that is contained in the Cabbage .app folder with this one. To view the contents of the Cabbage .app folder right click on the Cabbage app and hit show contents. You’ll see the old dylib in there. Just swap it out with the latest one. Please let me know if this works. Fingers crossed.

Hey Rory. Sorry for the delay.

I just tried to replace the dylib as you said on Fmod 1.09.03 version and had the same crash :confused:

Hmm. I’m not really sure how to proceed with this. Can you try removing all plugins from the FMOD plugins folder, apart from the Csound one? I wonder if there is some kind of strange conflict. Do you only have the one version of Csound installed?

Can you try simply placing that new dylib into the plugins folder and renaming it to match the .csd file. No need to use Cabbage to export it this time. I just want to make absolutely certain it’s the right dylib in there. It sounds like something more sinister is at play…

Same result. The don’t have any other plugins in the folder. Just in Fmod I have those

I wonder if I done everything right but it seems simple. Have I forgot something important?

  • Dl Cabbage and Install (replace dylib)
  • Fmod studio 1.09.03
  • Make a patch in Cabbage (I actually copied yours in this topic with no addition)
  • Export it as Fmod plugin
  • Open Fmod, made an event, added the plugin folder in the preferences, added the plugin sound on the timeline of the event
  • Crash with no message

Does FMOD produce a crash log? That might hold the key? Or any kind of crash information that OSX might provide us could be useful.

That’s it. According to FMOD, one should see a crash report when FMOD crashes. I can’t say I have ever seen something like that?

There is no crash report neither from Fmod nor Apple. This is why I really don’t have any clue about this. Would you know a way to get log from anywhere to have informations about this crash?

Not if OSX or FMOD doesn’t provide it. Do you have any experience with Xcode? The only real way to know what is going on here is for you to debug the issue locally on your machine. But it could be a little tricky depending on your level of development experience?