QCefWidget misses CEF main frame after being hidden once #375
Labels
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser#375
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Anything else we should know?
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
Please provide either the crash log or a stack trace from VS. It'll help determine whether the crash is in our own code, or deep within CEF.
Thanks for the prompt response. This is the VS stack trace to the point where the nullpointer is coming up. The exception then occurs one step out when trying to call
->LoadURL(...)Interesting - that crash is within the CEF wrapper's code, rather than in ours directly.
I will look into this when I can, before 28's final release. That code hasn't changed on our side since it was introduced. Interestingly, we don't protect against an invalid
GetMainFrame()result in most places, only in theSendBrowserProcessMessagemacro.In the meantime, what happens if you try showing the widget first (so swap lines 70 and 71 in
source/ui/ui-browser.cpp) before trying to set the URL?As a note:
Thanks a lot for your support. I swapped the lines and the result is the same. The window opens during the debugging step, but on the setURL afterwards it still crashes with _retval = 0x000....
You beat me to the comment from the source code, was just about to post it here as well