locaal-ai / obs-backgroundremoval

An OBS plugin for removing background in portrait images (video), making it easy to replace the background when recording or streaming.
GNU General Public License v2.0
2.96k stars 202 forks source link

After installing obs-backgroundremoval, OBS crashes on launch #586

Open epessoa-i opened 5 months ago

epessoa-i commented 5 months ago

Describe the bug

In my computer the obs-backgroundremoval plugin makes OBS to crash when starting. When running again, OBS offers me to be opened in safe mode, and then it works without the plugin. Uninstalling the plugin lets OBS start correctly. I've first tried on OBS 30.1.2, then downgraded it to 29.1.3, and the problem persisted.

To Reproduce

Just install obs-backgroundremoval and run OBS

Log and Crash Report

Unhandled exception: e06d7363 Date/Time: 2024-06-07, 15:31:43 Fault address: 7FFF0402543C (c:\windows\system32\kernelbase.dll) libobs version: 29.1.3 (64-bit) Windows version: 10.0 build 22631 (release: 23H2; revision: 3593; 64-bit) CPU: 12th Gen Intel(R) Core(TM) i7-1265U

Crashed thread stack trace: kernelbase.dll!0x7fff0402543c vcruntime140.dll!0x7ffebfe36ba7 obs-backgroundremoval.dll!0x7ffe0e6c9ca4 obs-backgroundremoval.dll!0x7ffe0e6ca0d5 obs-backgroundremoval.dll!0x7ffe0e6ca513 obs-backgroundremoval.dll!0x7ffe0e6cb3dd obs-backgroundremoval.dll!0x7ffe0e6c6a73 obs.dll!obs_init_module+0x51 obs.dll!load_all_callback+0xab obs.dll!process_found_module (30.1.2 only) obs.dll!find_modules_in_path (30.1.2 only) obs.dll!obs_find_modules2+0x336 obs.dll!obs_load_all_modules2+0x39 obs64.exe!OBSBasic::OBSInit+0x4b1 obs64.exe!OBSApp::OBSInit+0x3fb obs64.exe!run_program+0xa97 obs64.exe!main+0x71a obs64.exe!WinMain+0x157 obs64.exe!__scrt_common_main_seh+0x106 kernel32.dll!0x7fff04a0257d ntdll.dll!0x7fff0688aa48

Desktop

umireon commented 5 months ago

Please post here the full log and the crash report when your OBS was crashed.

umireon commented 5 months ago

I don't think Windows 10 is supported

epessoa-i commented 5 months ago

Hi umireon, Thanks for your quick answer.

Please post here the full log and the crash report when your OBS was crashed.

As requested, here is the full log file. Crash 2024-06-07 15-31-43.txt

Regarding the Windows version, as previously reported, I'm running Windows 11 23H2 build 22631.3593. The log header shows "Windows version: 10.0" because Windows 11, by design, has Windows 10 flags.

umireon commented 5 months ago

@epessoa-i We need the log in addition to the crash report. Please post here both of the log and the crash report generated at the same time.

epessoa-i commented 5 months ago

I'm sorry. Here you go.

2024-06-07 15-31-41.txt

epessoa-i commented 5 months ago

It should be related to my username: EnriquePessôa

The folder C:\Users\EnriquePessôa\AppData\Roaming\obs-studio\plugin_config\obs-backgroundremoval has not been created. And the plugin still tells the folder does not exist even after I create it.

epessoa-i commented 4 months ago

It's not clear for me why this issue arises in create_config_folder. The modules win-capture, rtmp-services and text-freetype2 are able to create the folder.

Could you change create_config_folder@obs-config-utils.cpp to use util/platform.h, and make it create the folder like the mentioned modules, using either os_mkdirs (below, as text-freetype2 does) or update_info_create (like rtmp-services)?

#include <util/platform.h>
void create_config_folder()
{
    char *config_folder_path = obs_module_config_path(NULL);
    if (config_folder_path) {
        os_mkdirs(config_folder_path);
        bfree(config_folder_path);
    }
}
epessoa-i commented 3 months ago

Hi, @umireon I created a pull request for fixing this Windows issue. Thank you

yugabe commented 2 months ago

@umireon Please accept the PR, my user folder also contains accented characters, thus OBS fails to launch if the plugin is installed. What's worse is Microsoft Entra (Azure AD) automatically creates the user folder this way, so there's no way to change it.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 60 days with no activity.

yugabe commented 1 week ago

Seems this was merged. When can we expect a new release that includes the fix? Thanks @royshil