occ-ai/obs-backgroundremoval

After installing obs-backgroundremoval, OBS crashes on launch

Opened this issue · 7 comments

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

  • Dell Latitude 5430
  • Processor: 12th Gen Intel(R) Core(TM) i7-1265U 1.80 GHz, 64.0 GB RAM
  • Graphics card: Intel(R) Iris(R) Xe Graphics
  • OS: Windows 11 23H2 build 22631.3593
  • Browser: Chrome 125
  • Plugin Version: 1.1.13
  • OBS Version: 29.1.3, and also on 30.1.2

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

I don't think Windows 10 is supported

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.

@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.

I'm sorry. Here you go.

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

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.

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);
	}
}