obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
776 stars 220 forks source link

Brower Source DevTools crashes OBS by right-clicking in OBS Interact window #321

Closed AlcaDesign closed 2 years ago

AlcaDesign commented 2 years ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

27.1.3

OBS Studio Log URL

https://obsproject.com/logs/BH6gsGU_iZuzyw0u

OBS Studio Crash Log URL

https://obsproject.com/logs/6Wv4ZSjf-JFdaLks

Expected Behavior

Right-clicking in the interact view should be sent and handled by the browser source gracefully.

Current Behavior

Right-clicking in the interact view crashes OBS.

Steps to Reproduce

  1. Set OBS launch option --remote-debugging-port=9222
  2. Launch OBS
  3. Create an empty scene
  4. Create a default browser source and OK it
  5. Open localhost:9222 in a browser
  6. Select "OBS | Browser Source"
  7. In OBS, open the interact view for the browser source
  8. Right-click in the interact view

OBS should crash at this point.

Anything else we should know?

Related to #320

mihawk90 commented 2 years ago

Just for reference: Seems to be a Windows-only (possibly Mac?) issue. Can not replicate it on Linux (Fedora).

WizardCM commented 2 years ago

With debug symbols:

Thread C3E4: CrBrowserMain (Crashed)
Stack            EIP              Arg0             Arg1             Arg2             Arg3             Address
000000698D14EB50 00007FFA85599C93 000000698D14F401 000001E4CF135A50 000000698D14EC38 00007FFA8682C4C1 libcef.dll!content::EmbeddedWorkerInstance::SendStartWorker+0x25
000000698D14EBB0 00007FFA8553C700 0000000000000001 00007FFA83D6E565 000001E4AE620000 000001E400000000 libcef.dll!base::internal::Invoker<base::internal::BindState<void (content::OldRenderFrameAudioOutputStreamFactory::*)(base::TimeTicks, mojo::InterfaceRequest<media::mojom::AudioOutputStreamProvider>, base::OnceCallback<void (media::OutputDeviceStatus, const media::+0x8
000000698D14F0D0 00007FFA855901BF 000000698D14F310 0000000000000000 00000000FFFFFFFF 000000698D14F2C8 libcef.dll!std::__1::vector<std::__1::pair<content::BrowserUIThreadTaskQueue::QueueType,scoped_refptr<base::SingleThreadTaskRunner> >,std::__1::allocator<std::__1::pair<content::BrowserUIThreadTaskQueue::QueueType,scoped_refptr<base::SingleThreadTaskRunner> > > >::_+0x2d
000000698D14F260 00007FFA89BA2BF3 000000698D14F438 00000004CAAD9A7F 000000698D14F440 0000000000000000 libcef.dll!ots::OpenTypeVDMX::Parse+0x257
000000698D14F380 00007FFA8679B71C 00007FFA867CFF61 00007FFA86790000 000000698D14F558 00007FFA83D53F38 libcef.dll!x25519_sc_reduce+0xc87
000000698D14F460 00007FFA84969413 000000698D14F558 00007FFA83D5D375 000001E49E963C70 000001E49EFAA7E0 libcef.dll!`anonymous namespace'::browser_host_send_mouse_click_event+0xa6
000000698D14F4E0 00007FFA83D5431E 0000000000000002 0000000000000000 00007FFA83DAA470 00007FFA84967164 obs-browser.dll!CefBrowserHostCToCpp::SendMouseClickEvent+0x5e
000000698D14F520 00007FFA83D37030 000000698D14F7F8 000001E4CDDAF680 0000000000000000 00007FFA867F1B48 obs-browser.dll!std::_Func_impl_no_alloc<<lambda_e40c96b46c48d4f4c4d7d4f036b97427>,void,scoped_refptr<CefBrowser> >::_Do_call+0xb0
000000698D14F5A0 00007FFA83D36AB9 000001E49E963C70 000000698D14F5D0 000000698D14F5F0 000001E4A10BF401 obs-browser.dll!std::_Func_impl_no_alloc<<lambda_614fd0be68fae7da0201723173939823>,void>::_Do_call+0x49
000000698D14F5D0 00007FFA83D62B0F 000001E4CDDB3C70 00007FFA868561E5 0000000000000001 0000000000000000 obs-browser.dll!`anonymous namespace'::task_execute+0x3f
000000698D14F610 00007FFA8684FA9E 0000000000000113 0000000000000000 FFFFFFFFFFFFFFFF 00007FFBB3FEEB26 libcef.dll!net::QuicStreamFactory::QuicStreamFactory+0x244
000000698D14F6F0 00007FFA86860676 0000000000003DFF 00007FFBB3FEA4B3 0000000000000000 000001E49C534970 libcef.dll!net::GetDirectoryListingEntry+0x619
000000698D14F9A0 00007FFA8686029C 00007FFBB3FEA370 0000000000000000 000001E4A10D1060 00007FFA89F4C10B libcef.dll!net::GetDirectoryListingEntry+0x23f
000000698D14FA20 00007FFA86815964 0000000000000000 0000000000000000 0000000000000008 000000698D14FBE0 libcef.dll!net::X509Certificate::VerifyHostname+0xa8
000000698D14FAE0 00007FFA8681516E 000001E4B7F29C20 00007FFA86813DB9 0000000000000000 00007FFA8687C334 libcef.dll!net::X509Certificate::Persist+0xb2
000000698D14FB30 00007FFA86860FC6 0000000000000000 0000000000000000 00007FFA8AED52D0 00007FFA86813DB9 libcef.dll!net::URLRequestFileJob::IsRedirectResponse+0x18a
000000698D14FB80 00007FFA8683582E 0000000000000000 00007F3137373368 000000698D14FCF0 0000000000000000 libcef.dll!net::CookieMonster::DeleteAnyEquivalentCookie+0x2d4
000000698D14FC30 00007FFA867A4A18 000001E4B7F29C20 0000000000000000 0000000000000000 0000000000000000 libcef.dll!base::GetCanonicalEncodingNameByAliasName+0x28
000000698D14FC90 00007FFA83D3B1DE 0000000000080001 000001E4B831B500 0000000000000000 0000000000000000 obs-browser.dll!BrowserManagerThread+0xe
000000698D14FCC0 00007FFA83D3861B 000001E400000000 0000000000000000 0000000000000000 0000000000000000 obs-browser.dll!std::thread::_Invoke<std::tuple<void (__cdecl*)(void)>,0>+0xb
000000698D14FCF0 00007FFA83D8A27A 0000000000000000 0000000000000000 0000000000000000 0000000000000000 obs-browser.dll!thread_start<unsigned int (__cdecl*)(void *),1>+0x5a
000000698D14FD20 00007FFBB2AB7034 0000000000000000 0000000000000000 0000000000000000 0000000000000000 kernel32.dll!0x7ffbb2ab7034
000000698D14FD50 00007FFBB4AA2651 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!0x7ffbb4aa2651
WizardCM commented 2 years ago

This is reproducible in cefclient 3770 (75) with cefclient.exe --off-screen-rendering-enabled --remote-debugging-port=9123, but not in cefclient 4430 (90) and 4606 (94), and therefore I'll revisit this bug when we update CEF in OBS on Windows.

WizardCM commented 2 years ago

Confirmed this issue is fixed when updating CEF in OBS to CEF 4638 (Chromium 95). I will close this issue once we merge #323