-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Many FP exceptions thrown all the time compared to original version #78
Comments
Hello!
Looks like a great project!
Cool! As you can probably tell, this fork isn't very mature yet. I've also had to make a few breaking changes to support some newer JSFX features unfortunately.
Thanks for bringing this to my attention. I've managed to see some of the FPEs you mention on my M1 (running MacOS though, so they are sent as SIGILL instead of SIGFPE) when explicitly enabling them. I don't have access to an AArch64 linux box at the moment though. Do you see a big difference in number of exceptions raised between the jpcima version and this fork?
Reproduced, thanks. The issue with protosynth was a bug in protosynth itself (division by zero in part of the init code).
The pitch shifter also had an issue where a division by zero could occur when running it with no audio (haven't been able to reproduce what's happening when moving the semitones slider). Note that this would be triggered every time AFAIK, floating point division by zero should be safe to ignore in the context of JSFX, since NaN and infinities get flushed to zero by EEL after each operation. That said, I agree that YSFX should not allow those exceptions to bubble up, so I will look into silencing them and restoring the exception env and fp exception flags when handing control back. I'll report back when I make some progress on this. I'm pretty new to this type of multi-platform development, so I would really appreciate some feedback on this once I have a working prototype.
I would expect a small performance penalty due to more channels being exposed by default and more sliders being available, but nothing quite so extreme. My guess is I'm not able to reproduce yet what you are seeing here. Which plugins are you comparing performance with? Are they also the ones that issue many SIGFPEs? |
If that can be useful here is what I implemented in ossia after seeing this from a few hours of stackoverflow-ing, as this is I believe a generally useful feature to have anyways. Note that this does both disabling FPE and forcing flush to zero / disabling denormals. Feel free to reuse! It passes on CI on mac (x64 & arm), window (x64), linux (x64 & arm), and freebsd (ossia/score#1663) https://github.com/ossia/libossia/blob/master/src/ossia/detail/disable_fpe.cpp
I'll try to make a proper reproduced and gather some numbers in the next few days, keeping you posted. Great work with the new features in any case ! especially support for the EEL preprocessor was becoming quite critical for many effects. |
Thank you! Very helpful! I'll have a closer look at it next time I have a solid chunk of time to work on this.
Much appreciated! |
Check latest release
I'm on git head
Describe the bug
I'm developing https://ossia.io which uses ysfx. So far I've been using jpcima's version, but I am looking into upgrading to this fork. But here SIGFPE is raised very often. Also from quick tests, the performance seems worse in AArch64 - I can chain only a few plug-ins while I can chain dozens with the jpcima version.
To Reproduce
This is how I'm loading YSFX plug-ins:
I also get some very regularly with Saike_Pitch_Shift, when playing with the semitones slider.
Expected behavior
No SIGFPE when loading plug-ins or playing with them.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: