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
Obs should not crash on start recording, no matter what the user decided to put in the filename formatting.
Current Behavior
os_generate_formatted_filename crops the generated filename to 255 bytes, before returning it. However, unicode characters can be more than one byte, as such, this cropping can turn the last character of the filename into an invalid character if the cropping happens in its middle.
This then causes a crash when said filename is attempted to be used.
Steps to Reproduce
Change filename formatting to %CCYY-%MM-%DD %hh-%mm-%ss foobar (there's 100 zero-width spaces between the foo and the bar, so, copy-paste)
Press "Start Recording"
Notice crash
...
N.B.: the error doesn't appear in the log itself :
terminate called after throwing an instance of 'nlohmann::detail::type_error'
what(): [json.exception.type_error.316] incomplete UTF-8 string; last byte: 0xE2
Aborted (core dumped)
Anything else we should know?
Honestly, the impact of this is probably rather minimal, it only surfaced because Call of Duty are weirdos and put something like 70 zero-width spaces in their window title for no reason whatsoever.
The text was updated successfully, but these errors were encountered:
Slightly related, and possibly worthy to include in a fix : said 255 bytes crop happens after applying the extension, and as such will often create an extension-less file, which crashes the muxer.
Operating System Info
Ubuntu 22.04
Other OS
No response
OBS Studio Version
30.2.2
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/SZyGPxeg4afmKJdo
OBS Studio Crash Log URL
No response
Expected Behavior
Obs should not crash on start recording, no matter what the user decided to put in the filename formatting.
Current Behavior
os_generate_formatted_filename
crops the generated filename to 255 bytes, before returning it. However, unicode characters can be more than one byte, as such, this cropping can turn the last character of the filename into an invalid character if the cropping happens in its middle.This then causes a crash when said filename is attempted to be used.
Steps to Reproduce
%CCYY-%MM-%DD %hh-%mm-%ss foobar
(there's 100 zero-width spaces between the foo and the bar, so, copy-paste)...
N.B.: the error doesn't appear in the log itself :
Anything else we should know?
Honestly, the impact of this is probably rather minimal, it only surfaced because Call of Duty are weirdos and put something like 70 zero-width spaces in their window title for no reason whatsoever.
The text was updated successfully, but these errors were encountered: