Crash (0xc0000409) on Start when a window title is very long (512 CJK characters) and a Window condition is used
Hi, thanks for the great plugin!
Describe the bug:
OBS crashes immediately after pressing "Start" in Advanced Scene Switcher when a macro uses the "Window" condition and there is a window open with a very long title containing CJK (Chinese) characters.
In my case a Chrome tab showing a long Threads/X post put the whole post text into the window title. The title was 512 characters long, all Chinese. As soon as I closed that tab, the crash stopped. With the tab open, it crashed every time.
Steps to reproduce:
1. Open a browser tab whose window title is very long (about 512 Chinese characters).
2. Create a macro with a "Window" condition (check title, no regex) and any action (I used "Scene item visibility").
3. Press "Start" on the General tab.
4. OBS closes within a few seconds.
Pausing all macros with the Window condition also stops the crash.
Crash info (Windows Event Viewer):
- Faulting application: obs64.exe 33.0.1.0 (also happened on 32.0.2)
- Faulting module: advanced-scene-switcher-lib.dll
- Exception code: 0xc0000409
- Fault offset: 0x000000000034c801 (same offset every time)
The OBS log ends right after "[adv-ss] started". OBS does not write a crash report.
I am not a developer, but exception 0xc0000409 at the same offset every time makes me suspect a fixed-size buffer that is too small when the window title is converted to UTF-8. Each Chinese character becomes 3 bytes.
Environment:
- Advanced Scene Switcher 1.37.2 (latest)
- OBS 33.0.1 (also 32.0.2)
- Windows 10 Home 22H2 (19045), 64-bit
Thank you!
Hi, thanks for the great plugin!
Describe the bug:
OBS crashes immediately after pressing "Start" in Advanced Scene Switcher when a macro uses the "Window" condition and there is a window open with a very long title containing CJK (Chinese) characters.
In my case a Chrome tab showing a long Threads/X post put the whole post text into the window title. The title was 512 characters long, all Chinese. As soon as I closed that tab, the crash stopped. With the tab open, it crashed every time.
Steps to reproduce:
1. Open a browser tab whose window title is very long (about 512 Chinese characters).
2. Create a macro with a "Window" condition (check title, no regex) and any action (I used "Scene item visibility").
3. Press "Start" on the General tab.
4. OBS closes within a few seconds.
Pausing all macros with the Window condition also stops the crash.
Crash info (Windows Event Viewer):
- Faulting application: obs64.exe 33.0.1.0 (also happened on 32.0.2)
- Faulting module: advanced-scene-switcher-lib.dll
- Exception code: 0xc0000409
- Fault offset: 0x000000000034c801 (same offset every time)
The OBS log ends right after "[adv-ss] started". OBS does not write a crash report.
I am not a developer, but exception 0xc0000409 at the same offset every time makes me suspect a fixed-size buffer that is too small when the window title is converted to UTF-8. Each Chinese character becomes 3 bytes.
Environment:
- Advanced Scene Switcher 1.37.2 (latest)
- OBS 33.0.1 (also 32.0.2)
- Windows 10 Home 22H2 (19045), 64-bit
Thank you!