farbot icon indicating copy to clipboard operation
farbot copied to clipboard

fifo crashes if pos >= MAX_THREADS

Open mikelange49 opened this issue 2 years ago • 1 comments

Hi Fabian. Thanks for all your great work !

I created an issue with tracktion_engine's "EngineInPlugin " that crashes Reaper on Windows after several [Alt+Tab]s. https://github.com/Tracktion/tracktion_engine/issues/115

It crashes on Farbot's : https://github.com/hogliux/farbot/blob/489ab870e41de7b7f569540e67263c976a757ea0/include/farbot/detail/fifo.tcc#L35-L40

I found a workaround but I dont' know if it's a good idea : I increase MAX_THREADS to 256 (rather than 64)

Let me know if you have a better solution 😃 Thanks

mikelange49 avatar May 05 '22 08:05 mikelange49

I'm not sure this would actually fix the issue but just delay it a bit? I'm not quite sure what the actual cause of the problem is though. Is Reaper creating a new audio processing thread every time you switch window without re-initialising the plugin and that's causing the problem?

drowaudio avatar May 05 '22 08:05 drowaudio

As @drowaudio points out, this will only delay the issue. Unfortunately, the design of the fifo, requires you to specify some maximum number of threads so there is no easy way to fix this.

hogliux avatar Mar 03 '23 17:03 hogliux