Skip to content
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

UnityPlayer crashes when using Japanese paths(User Name) when recording starts on Windows. #43

Closed
narihara-hakase opened this issue Jul 27, 2023 · 3 comments
Labels
bug Something isn't working windows Issues that affect Windows

Comments

@narihara-hakase
Copy link

narihara-hakase commented Jul 27, 2023

About

  1. the UnityPlayer crashes when using Japanese paths(User Name) on Windows.
  2. Similar problems have been reported on the forum and I have the same fix to avoid the Japanese pass, but UnityPlayer crashes when I try to use the recording feature.
  3. a possible cause is that NatCorder.Dll does not support multibyte characters.

How to reproduce the Crush

Create two local users (one is the Japanese name and the other is the English name)
Users with Japanese names will crash when recording starts
Users with English names are normal when recording starts

Crush when the following code is executed

Recorder = new MP4Recorder(256, 144, Framerate, _SampleRate, _ChannelCount, audioBitRate: 96_000);

System Information

CPU : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.20 GHz
RAM : 32GB
OS : Windows 11 Pro(22621.1992)
UnityVersion : 2020.3.48f1
NatCoderVersion : 1.8.8(I tried v1.9.4 and it still crushed.)

Other

.\ai.natml.natcorder@1.8.8\Runtime\RecorderExtensions.cs:57 was rewritten with the following code, new MP4Recorder(...) worked, but it crushed at the start of recording.

        [RuntimeInitializeOnLoadMethod]
        private static void OnInitialize () {
            var editor = Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsEditor;

            const string workingDirectoryPath = @"c:\tmp\";
            Directory.CreateDirectory(workingDirectoryPath);
            foreach (var filePath in Directory.GetFiles(workingDirectoryPath)) { File.Delete(filePath);}

            directory = editor ? Directory.GetCurrentDirectory() : workingDirectoryPath; //Application.persistentDataPath;
        }
@olokobayusuf
Copy link
Contributor

Hey @narihara-hakase , thanks for reporting this. We will be working on this in VideoKit, so I've moved the issue over.

@olokobayusuf olokobayusuf transferred this issue from videokit-ai/natcorder Aug 3, 2023
@olokobayusuf olokobayusuf added bug Something isn't working windows Issues that affect Windows labels Aug 8, 2023
@olokobayusuf
Copy link
Contributor

Minor update on this: the fix won't be in the next update (0.0.14), but it will be in the release right after (0.0.15). The plan is to get 0.0.15 out within 2-4 weeks from now.

@olokobayusuf olokobayusuf added the critical Issues of utmost importance label Aug 8, 2023
@olokobayusuf olokobayusuf removed the critical Issues of utmost importance label Jul 1, 2024
@olokobayusuf
Copy link
Contributor

This should be fixed in the latest versions of VideoKit. Please open a new issue if you can reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Issues that affect Windows
Projects
None yet
Development

No branches or pull requests

2 participants