obsproject / obsproject/obs-browser

QCefWidget misses CEF main frame after being hidden once

Open
#375 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
904
Forks
267
Avg merge
1d 23h
Merged PRs (30d)
2

Description

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

28.0.0-beta2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/FVEWXEztE0yVkLau

OBS Studio Crash Log URL

None available

Expected Behavior

QCefWidget (nested in a QDialog) can set the URL and be shown properly after being closed.

Current Behavior

QCefWidget can set the initial URL and navigate to a different URL. After being hidden once, setting the URL for a new display causes a full OBS crash.

Steps to Reproduce
  1. Build Own3dPro plugin for OBS 28 https://github.com/StefanEnsmann/own3dpro-obs-plugin/tree/obs28
  2. Open the Theme Selector
  3. Close Theme Selector
  4. Re-open Theme Selector
Anything else we should know?
  • The Qt6 version is built against the dependencies from obs-deps
  • In our codebase there is no significant change that could affect this window apart from the new targeting of Qt6
  • We run into a nullpointer in browser-panel.cpp:430 coming up from CEF
  • The current main version of this plugin is working as expected with OBS 27.2.4, even when compiling with the new build pipeline that supports Qt6 targeting. All changes to this project up until this point can be seen here

  • The original developer of this plugin is not available to work at it at the moment, so we need to fix it up ourselves
  • Our suspicion is that something has changed in the internal resource handling of either the obs-browser plugin or CEF itself that causes the main frame to be missing with our current implementation

tl;dr: We are creating a QDialog that contains a QCefWidget. Hiding this dialog and then re-setting the QCefWidget URL causes a crash in OBS 28, while it works in OBS 27.2.4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the QCefWidget lifecycle and browser-panel.cpp:430, then reproduce the crash by opening, closing, and reopening the Theme Selector in OBS 28. Compare the behavior with OBS 27.2.4 and inspect the linked OBS log and CEF-related call path. Done means resetting the URL after the dialog is hidden no longer crashes OBS and the widget displays correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.