Startup race: Help Browser panel stays blank
Hello,
First of all, this message was written with the help of AI to find an issue, where the help browser panel stays blank at startup with latest dev version. I do not know if it the best way to solve it.
Environment
- SuperCollider version: Latest Dev including this commit #7500
- Operating system: MacOS 27
- Other details (Qt version, audio driver, etc.): Qt 6.8 & 6.11.2
Steps to reproduce
1. Start the IDE.
2. The Help Browser panel stays blank indefinitely - waiting longer doesn't help, since the call is skipped once, never retried.
Problem
File: editors/sc-ide/widgets/help_browser.hpp, HelpBrowserDocklet::onInterpreterStart()
void onInterpreterStart() {
if (isVisible() && mHelpBrowser->url().isEmpty())
mHelpBrowser->goHome();
}Connected to ScProcess::started. With the interpreter set to auto-start,
this signal can fire before the main window has finished
showing/restoring its dock layout - isVisible() then reads false,
goHome() is silently skipped, and nothing ever retries it. The Help
Browser panel stays blank indefinitely until the user manually navigates
somewhere (Cmd-D, clicking Home, etc).
Possible Fix
void onInterpreterStart() {
QTimer::singleShot(0, this, [this]() {
if (isVisible() && mHelpBrowser->url().isEmpty())
mHelpBrowser->goHome();
});
}Defer the check to the next event loop iteration, giving pending show/layout events a chance to land first.
Source: supercollider/supercollider