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
When loading a sample from a file, the file descriptor is passed to sf_open_fd without checking whether the file was opened successfully. On Windows, sf_open_fd then passes the file descriptor to _get_osfhandle to get the native file handle for the file descriptor. However, _get_osfhandle has an assertion to check the validity of the provided file descriptor, which is active in debug versions of the CRT (only used by MSVC debug builds, AFAIK) and is triggered when, for example, the sample doesn't exist. To avoid this, I think we should check that QFile::open returns true before calling sf_open_fd.
@Reflexe It looks like, as part of the recording work, you're refactoring SampleBuffer, which is where this function is used. Could you take care of this while you're at it?
The text was updated successfully, but these errors were encountered:
As the author of #4401 which introduced those changes, I should have added more checks before merging.
BTW, any commits which change the SampleBuffer code are very likely to conflict with the recording PR.
When loading a sample from a file, the file descriptor is passed to
sf_open_fd
without checking whether the file was opened successfully. On Windows,sf_open_fd
then passes the file descriptor to_get_osfhandle
to get the native file handle for the file descriptor. However,_get_osfhandle
has an assertion to check the validity of the provided file descriptor, which is active in debug versions of the CRT (only used by MSVC debug builds, AFAIK) and is triggered when, for example, the sample doesn't exist. To avoid this, I think we should check thatQFile::open
returnstrue
before callingsf_open_fd
.@Reflexe It looks like, as part of the recording work, you're refactoring
SampleBuffer
, which is where this function is used. Could you take care of this while you're at it?The text was updated successfully, but these errors were encountered: