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 Dev Tools preview #320

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/Ou0MM5qR83RrRaKC

OBS Studio Crash Log URL

https://obsproject.com/logs/nOaEduDrTk24LvUj

Expected Behavior

Right-clicking in the DevTools preview should be sent and handled by the browser source gracefully.

Current Behavior

Right-clicking in the DevTools preview 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. Right-click in the preview

OBS should crash at this point.

Anything else we should know?

No response

WizardCM commented 2 years ago

I've moved this to the obs-browser repo, but I can confirm this crash occurs in OBS 27.1.3.

WizardCM commented 2 years ago

With debug symbols:

Thread 1EE0: CrBrowserMain (Crashed)
Stack            EIP              Arg0             Arg1             Arg2             Arg3             Address
000000CF8889E7D0 00007FFA85599C93 000000CF00000000 000000CF8889E888 000000CF00000000 0000026DE5AE33C0 libcef.dll!content::EmbeddedWorkerInstance::SendStartWorker+0x25
000000CF8889E830 00007FFA8553C700 0000026D934EAF10 0000026DF8470CC0 0000026D936E0F30 0000000000000000 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
000000CF8889ED50 00007FFA855901BF 0000EC91A154C70E 0000026D9BD2BD10 000000CF8889EFB0 00007FFA8688555E 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
000000CF8889EEE0 00007FFA85590099 0000000000000018 0000000000000000 F07DD833AA8DF06D 00007FFA89F4C10B 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> > > >::e+0x81
000000CF8889EF80 00007FFA85366E06 0000000000000000 0000026DF8471440 0000000000000058 0000026DF8470000 libcef.dll!base::internal::BindState<base::RepeatingCallback<void (int, int)>,int,int>::Create<const base::RepeatingCallback<void (int, int)> &,int,int>+0x4e
000000CF8889F030 00007FFA852232C7 0000026D9BD91EE0 0000026D9BD8F280 0000EC91A154D80E 000000CF8889F300 libcef.dll!content::protocol::cbor::internals::WriteTokenStartTmpl<std::__1::vector<unsigned char,std::__1::allocator<unsigned char> > >+0x4cb
000000CF8889F1D0 00007FFA8521447B 0000026D9BD91EC0 00007FFBB4A747B1 000000CF8889F320 0000026DF8380000 libcef.dll!content::protocol::Network::DispatcherImpl::setExtraHTTPHeaders+0x69
000000CF8889F290 00007FFA8523DAFE 000000CF8889F848 0000026D93375EC0 00007FFA8A3FC1D8 00007FFA867927A2 libcef.dll!content::AccessibilityTreeFormatterWin::AddMSAAProperties+0x746
000000CF8889F350 00007FFA8534FAF7 000000CF8889F3E0 00007FFBB4A70000 0000000000000048 000000CF8889F4D8 libcef.dll!std::__1::vector<std::__1::pair<int,blink::WebTouchPoint>,std::__1::allocator<std::__1::pair<int,blink::WebTouchPoint> > >::__swap_out_circular_buffer+0xad
000000CF8889F3D0 00007FFA853B2F65 000000CF8889F598 496E6F69737365D7 0000000000000009 000000CF8889F580 libcef.dll!content::SavePackage::OnMHTMLGenerated+0xd3
000000CF8889F430 00007FFA851E9918 000000CF8889F848 00007FFA8A1175D0 0000026D937AA760 00007FFBB4A747B1 libcef.dll!download::DownloadContentFromMimeType+0x5b6
000000CF8889F480 00007FFA8534F999 0000000000000000 00007FFBB4A75BA1 0000026D934EADD0 0000000000000028 libcef.dll!std::__1::__split_buffer<std::__1::pair<int,blink::WebTouchPoint>,std::__1::allocator<std::__1::pair<int,blink::WebTouchPoint> > &>::emplace_back<const int &,blink::WebTouchPoint>+0x135
000000CF8889F550 00007FFA8534F65D 00007FFA8A3FC1D8 00007FFA853497F1 0000000000000000 0000000000000000 libcef.dll!std::__1::vector<std::__1::pair<int,blink::WebTouchPoint>,std::__1::allocator<std::__1::pair<int,blink::WebTouchPoint> > >::emplace<const int &,blink::WebTouchPoint>+0x7f
000000CF8889F600 00007FFA853262B9 0000000000000000 00007FFA86853A6C 0000000000000001 0000000000000000 libcef.dll!content::devtools_instrumentation::HandleCertificateError+0x12e
000000CF8889F660 00007FFA8684FA9E 0000000000000113 0000000000000000 FFFFFFFFFFFFFFFF 00007FFBB3FEEB26 libcef.dll!net::QuicStreamFactory::QuicStreamFactory+0x244
000000CF8889F740 00007FFA86860676 0000000000003DFF 0000000400000000 FFFFFFFFFFFFFC3D 0000EC91A154D02E libcef.dll!net::GetDirectoryListingEntry+0x619
000000CF8889F9F0 00007FFA8686029C 00007FFBB3FEA370 0000000000000000 0000026DFFEE1060 00007FFA89F4C10B libcef.dll!net::GetDirectoryListingEntry+0x23f
000000CF8889FA70 00007FFA86815964 0000000000000000 0000000000000000 0000000000000008 000000CF8889FC30 libcef.dll!net::X509Certificate::VerifyHostname+0xa8
000000CF8889FB30 00007FFA8681516E 0000026D82825D60 00007FFA86813DB9 0000000000000000 00007FFA8687C334 libcef.dll!net::X509Certificate::Persist+0xb2
000000CF8889FB80 00007FFA86860FC6 0000000000000000 0000000000000000 00007FFA8AED52D0 00007FFA86813DB9 libcef.dll!net::URLRequestFileJob::IsRedirectResponse+0x18a
000000CF8889FBD0 00007FFA8683582E 0000000000000000 00007F3137373368 000000CF8889FD40 0000000000000000 libcef.dll!net::CookieMonster::DeleteAnyEquivalentCookie+0x2d4
000000CF8889FC80 00007FFA867A4A18 0000026D82825D60 0000000000000000 0000000000000000 0000000000000000 libcef.dll!base::GetCanonicalEncodingNameByAliasName+0x28
000000CF8889FCE0 00007FFA83D3B1DE 0000000000080001 0000026D82A651F0 0000000000000000 0000000000000000 obs-browser.dll!BrowserManagerThread+0xe
000000CF8889FD10 00007FFA83D3861B 0000026D00000000 0000000000000000 0000000000000000 0000000000000000 obs-browser.dll!std::thread::_Invoke<std::tuple<void (__cdecl*)(void)>,0>+0xb
000000CF8889FD40 00007FFA83D8A27A 0000000000000000 0000000000000000 0000000000000000 0000000000000000 obs-browser.dll!thread_start<unsigned int (__cdecl*)(void *),1>+0x5a
000000CF8889FD70 00007FFBB2AB7034 0000000000000000 0000000000000000 0000000000000000 0000000000000000 kernel32.dll!0x7ffbb2ab7034
000000CF8889FDA0 00007FFBB4AA2651 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!0x7ffbb4aa2651
RytoEX commented 2 years ago

Are either this or #321 reproducible with cefclient for CEF 3770 with the appropriate flags?

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