[Announce RFC: Final Comment Period] Catch RTAlloc exceptions in UGens/Graphs to prevent memory leaks

Hello everybody!

A new RFC has been opened here:

Please visit the above link for discussion.

Summary: when RTAlloc throws an exception (e.g. alloc failed), no UGens currently catch it and it is caught by the audio backend object. Consequences are interruption of the current processing cycle at that point, repeated UGen constructor calls, loss of references to allocated memory… Since the issue affects lots of UGens it would be beneficial to agree on how to design the fix before applying it to so many places.

4 Likes

yaaassss fantastic @elgiano !!!

This RFC is entering its Final Comment Period!

In 14 days, discussion will end and the proposal will either be accepted, rejected or withdrawn. Please see https://github.com/supercollider/rfcs#discussing-an-rfc for information on how to participate in the discussion, and https://github.com/supercollider/rfcs#finalizing-an-rfc for information on what Final Comment Period means.

Summary so far: RTAlloc shouldn’t throw an exception at all but return NULL consistently for all failed exit paths. This requires some adjustments in sclang, scynths and the introduction of new macros for server plugins.

1 Like