You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your operating system and version: macOS High Sierra 10.13.6
Steps to reproduce (for bugs)
It is necessary to build two example UGens to reproduce the problem. Source for this: UGenTests.zip. After building the two UGens and moving the relevant files to the Extensions folder try the following 3 cases:
Now this does work if you start the synth right away. If you wait for a minute or so it fails again (garbage collection of allocated memory???)
Error message (for bugs)
For the first case, the server quits unexpectedly posting this in the SC console:
RESULT = 0
server 'localhost' disconnected shared memory interface
Expected Behavior
I would expect, given that I've done the memory allocating and free'ing in the UGen code correctly, that the Test UGen should not crash the server when ran.
Current Behavior
Clearly something goes wrong with allocating memory using the C++ style wrapper. It could very well be that I am misunderstanding something and hence, the error is entirely my fault. However, I cannot figure out myself what I might have done wrong. As far as I can tell I have followed the appropriate steps translating the old C way of doing this to the new C++ way.
The text was updated successfully, but these errors were encountered:
Ah I see! Good catch. That indeed seems to be the problem: Looking at its definition, set_calc_function() doesn't only set the calculation function, it also computes the first sample using the specified function. Hence, if you do this as the very first thing in your constructor before defining / initialising your state variables then things will go wrong understandably. Replacing the next() call with set_calc_function() solved it.
So actually there are some errors in the example files:
Environment
Steps to reproduce (for bugs)
It is necessary to build two example UGens to reproduce the problem. Source for this:
UGenTests.zip. After building the two UGens and moving the relevant files to the Extensions folder try the following 3 cases:
Now free the synth and try
Now this does work if you start the synth right away. If you wait for a minute or so it fails again (garbage collection of allocated memory???)
Error message (for bugs)
For the first case, the server quits unexpectedly posting this in the SC console:
Expected Behavior
I would expect, given that I've done the memory allocating and free'ing in the UGen code correctly, that the
Test
UGen should not crash the server when ran.Current Behavior
Clearly something goes wrong with allocating memory using the C++ style wrapper. It could very well be that I am misunderstanding something and hence, the error is entirely my fault. However, I cannot figure out myself what I might have done wrong. As far as I can tell I have followed the appropriate steps translating the old C way of doing this to the new C++ way.
The text was updated successfully, but these errors were encountered: