Skip to content

Error and crash when trying to create a folder with trailing spaces #11940

Open

Description

@Penwy

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

31.0.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/SrRBYI9vXmi5CAPL

OBS Studio Crash Log URL

https://obsproject.com/logs/ldmWetyGi2qcBSTy

Expected Behavior

Obs should not crash when attempting to record, even if the formatting string is malformed.

Current Behavior

If the formatting includes creating a folder with trailing spaces in its name, obs errors on the first attempt at recording, and crashes on the second.

Steps to Reproduce

  1. Change filename formatting to include a folder with trailing spaces (for example %CCYY-%MM-%DD /%hh-%mm-%ss)
  2. Press Start recording, get the error shown below.
  3. Press Start recording again, crash.
    ...

Anything else we should know?

error in question :

Image

The crash report and the log do not correspond exactly because whether or not a crash report is generated by the crash is unreliable

Activity

  1. S1NJED commented on Mar 12, 2025

    @S1NJED

    The issue is only on windows 10 and 11 but it work well on ubuntu 24.04, the issue might be caused due to a bad path formatting.

  2. Penwy commented on Mar 12, 2025

    @Penwy
    ContributorAuthor

    As far as I can see it is not an issue with the formatting, but a restriction of fileio, that obs does not sanitise for.
    https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file

    Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions