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

Enable input control crashing OBS #356

Open
MakiMakoTaco opened this issue Jul 13, 2023 · 14 comments
Open

Enable input control crashing OBS #356

MakiMakoTaco opened this issue Jul 13, 2023 · 14 comments

Comments

@MakiMakoTaco
Copy link

Describe the bug
Under the configuration options Enable Input Control is ticked and whatever I do, I can't uncheck it including deleting and re-installing/installing a different version. I think this being checked also lags my PC for a bit when OBS is opening but that's not a huge issue and could just be my PC. OBS also crashes when I just try and add an input overlay, I don't know if this is because of Input Control being checked but it happens anyways.

io-client also seems to crash on open too

To Reproduce
Steps to reproduce the behaviour:

  • Uncheck Enable Input Control and click OK
  • Open up the configuration menu and click OK
  • Add an Input Overlay
  • Open OBS (for the lag),

Expected behaviour
OBS to not crash

Screenshots
If applicable, add screenshots to help explain your problem.

Additional information:

Additional context
I'm not completely sure if it is a crash but OBS doesn't respond and I've left it for about half an hour with OBS still not responding. The one time I somehow got an input display visual without OBS crashing I couldn't resize the display, it originally showed the resize cursor and I dragged it but nothing happened and then I couldn't interact with the display after, and it didn't seem to actually work.

@univrsal
Copy link
Owner

Do you have a crash log? Are there any filters for the input control setting?

@agilob
Copy link

agilob commented Apr 21, 2024

To reproduce on my machine each time, follow the clicks:

  • Tools
  • input-overlay settings
  • Enable Input Control
  • OK

image

info: User added filter 'Advanced Mask' (advanced_masks_filter_v2) to source 'Video Capture Device (V4L2)'
warning: Creating a popup with a parent, QWidgetWindow(0x5aec24772e40, name="OBSBasicWindow") which does not match the current topmost grabbing popup, QWidgetWindow(0x5aec27ac2f30, name="QMenuClassWindow") With some shell surface protocols, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly. Please fix the transient parent of the popup.
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  12
  Current serial number in output stream:  12
terminate called without an active exception
[1]    178500 IOT instruction (core dumped)  obs

Versions installed:

obs-plugin-input-overlay 5.0.5-1
obs-studio 30.1.1-1

Arch Linux, installed it from AUR

@univrsal
Copy link
Owner

I need a crash log. Run gdb obs -ex run, answer no if it asks to download some debug symbols, make it crash, run bt in the gdb shell and paste the result here

@agilob
Copy link

agilob commented Apr 23, 2024

qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
[New Thread 0x7fff0b5656c0 (LWP 40576)]
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  12
  Current serial number in output stream:  12
warning: QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread

Thread 1 "obs" received signal SIGSEGV, Segmentation fault.
0x00007ffff36be3bf in ?? () from /usr/lib/libQt6Core.so.6
(gdb) bt
#0  0x00007ffff36be3bf in ??? () at /usr/lib/libQt6Core.so.6
#1  0x00007ffff1d0e0ee in ??? () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff1d6c21e in ??? () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff1d0c712 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff3983df4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/libQt6Core.so.6
#5  0x00007ffff3745c7e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#6  0x00007ffff37416e8 in QCoreApplication::exec() () at /usr/lib/libQt6Core.so.6
#7  0x00005555555e0fc1 in main ()

@univrsal
Copy link
Owner

Can you also upload a log file of obs studio? Also which AUR package are you using, there seem to be three different ones.

@agilob
Copy link

agilob commented Apr 24, 2024

obs-studio from extra (not aur) https://archlinux.org/packages/extra/x86_64/obs-studio/

obs-plugin-input-overlay 5.0.5-1 from aur https://aur.archlinux.org/packages/obs-plugin-input-overlay

Ok, maybe new issue now. Somehow my obs completely broke and couldn't after in "Normal Mode" after a few more crashes. I was forced to uninstall, remove .config/obs-studio and .local/share/obs and install all again. input overlay is still crashing as before, but I see different traces now. obs.log is with gdb, obs.log is without gdb

obs.log

obs2.log

@univrsal
Copy link
Owner

I can't seem to reproduce the issue but I just saw that you're on wayland so that means you won't be able to use the plugin (and input filters) anyways. The only thing that (probably) should work is the gamepad hook.

@MakiMakoTaco
Copy link
Author

I can redownload and do anything you need for info but all I remember is that Enable Input Control was originally turned off, I turned it on when looking around at things. That's when it then first crashed, I tried unchecking it after reloading OBS and it would just crash everytime I tried to confirm it and leave the checkbox ticked including uninstalling and reinstalling. I think I went into the files and tried manually turning it off too which changed nothing.

And then as I mentioned in the original message doing anything in OBS it would either lag (including moving the mouse) or if I tried doing anything related to input display it would crash

@univrsal
Copy link
Owner

univrsal commented May 4, 2024

Yeah, I didn't mean your original bug report. The issue @agilob reported is unrelated to yours and it's not an issue that can easily be fixed. I don't have a Windows installation around right now but when I get some time I'll try reproducing your bug report and then I'll see if the bug still exists and what the cause is.

@MakiMakoTaco
Copy link
Author

Ok no worries, thanks

@escapetheory
Copy link

I am having the exact issue that MakiMakoTaco describes. No amount of clean plugin installs (using the .exe and manually extracting the files) fixes the issue and OBS just crashes if I try and untick this option. :(

@univrsal
Copy link
Owner

univrsal commented Dec 3, 2024

I still need a crash log. OBS should give it to you after the crash.

@the-paid-actor
Copy link

Same situation with me. But to be precise OBS doesn't crash, it just hangs, and then I have to kill it through windows. That's why there is no crash log for OBS. After reopening OBS, mouse freezes for a couple seconds and OBS behaves weird, and the checkbox cannot be unticked without OBS hanging. Only solved after deleting the input-overlay lines on obs appdata global.ini.

As far as I can see "input control" is just a regex over open window names to enable overlay to work only under whichever window I specify right? I took a quick look at the code and I can't find anything obvious of why there would be a problem... maybe something with the mutexes there? If I have time I will try to debug it on my machine (I'm a software dev)

@misklikk
Copy link

misklikk commented Dec 30, 2024

Bumping this. Experiencing the same thing as @the-paid-actor described with plugin version 5.0.6 on Windows.

Used all available install methods for it (had a portable OBS instance that I tried it with, then proceeded to do the same for an instance installed into Progam Files). Bit of a bummer, as I was specifically looking towards using the action history in a 2 PC setup (both of which need the Websocket server, resp. Input Control working).

My OBS logs don't even show the crash, as I had to close it when it became unresponsive (Event Viewer was no help either, just a generic App Hang there). However, each time this happened, this was what the logs looked like:

01:44:45.058: [input-overlay] Loading v5.0.6-HEAD (c99a526) build time 2024.10.24 17:23
01:44:45.058: DEPRECATION: obs_frontend_get_global_config is deprecated. Read from global or user configuration explicitly instead.
01:44:45.058: Skipping module '../../obs-plugins/64bit/libcef.dll', not an OBS plugin
01:44:45.058: [input-overlay] Initializing SDL2 for gamepad input (compile-time: 2.30.4, run-time:  2.30.4)
01:44:45.059: Skipping module '../../obs-plugins/64bit/libEGL.dll', not an OBS plugin
01:44:45.059: Skipping module '../../obs-plugins/64bit/libGLESv2.dll', not an OBS plugin
01:44:45.060: [input-overlay] Websocket server listening on ws://0.0.0.0:16899
01:44:45.060: [input-overlay] Starting websocket server on localhost:16899
01:44:45.060: [input-overlay] couldn't open C:\Users\[myactualusername]\AppData\Roaming\obs-studio/plugin_config/input-overlay/filters.json
01:44:45.060: [input-overlay] Couldn't load filters.json from plugin config, trying legacy location
01:44:45.061: [input-overlay] couldn't open C:\Users\[myactualusername]\input-overlay\filters.json
01:44:45.061: [input-overlay] Couldn't load filters.json from legacy location

Don't know if this is helpful, but it seems as if filters.json is simply not created. There is also no folder called input-overlay in any of the two mentioned locations.

Trying with 5.0.2 now to see if it works there and if upgrading with an already created filters.json does the trick.

Edit: no issues with 5.0.2

Troubleshooting:

5.0.2 created filters.json in C:\Users\[myactualusername]\input-overlay\ (must've been the location that's now called legacy). Sure enough, it was just an empty JSON array ([ ]). I then upgraded to 5.0.6 and the weird stutter at startup was gone and I could actually go ahead and enable Input Control and save it without OBS hanging again. Only problem was that apps added to the filter in the UI wouldn't actually get saved in C:\Users\[myactualusername]\input-overlay\filters.json. The filters would just be gone when restarting OBS, too.

Workaround:

So I manually created C:\Users\[myactualusername]\AppData\Roaming\obs-studio\plugin_config\input-overlay\filters.json (I just copied the input-overlay folder into plugin-config from my user profile). And lo and behold, it actually works.

I'm no dev, but it's probably just that the plugin safely assumes filters.json is where it should be (didn't test an incremental upgrade path or anything to see if I'd get an existing filters.json moved to the new location at some point) without actually checking it beyond startup. So all subsequent calls to the file fail, because there is no fallback to create a new file on startup if none could be found.

Reproduction:

Simply delete all variants of filters.json you might have, restart OBS and watch it burn after enabling Input Control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants