Plugin GUI: first window per Bitwig launch fails to open (GLX has no framebuffer configs yet) #72
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
bcox/tymbal#72
Loading…
Add table
Add a link
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?
Priority: low. Accepted and lived-with; the workaround is to click the plugin's GUI button a second time, which opens normally. Filed so the analysis is not lost.
Symptom
The very first plugin window opened in a fresh Bitwig (Flatpak) session does not appear. Opening it again works, and every window after the first works for the rest of the session. Once per launch.
What the logs show (TYMBAL_GUI_LOG=1)
On the first
set_parent,glXChooseFBConfigreturns zero configs for both the strict and the relaxed attribute lists, andglXGetFBConfigs(unfiltered) reports 0 total configs on the display -- the X server genuinely has no framebuffer configs at that moment, not "none matching ours".glXQueryVersionsucceeds (1.4) on that same connection, so GLX is present and the GLVND vendor is bound; the configs simply are not there yet. A beat later (the secondset_parent) they are.What was tried and ruled out
set_parent: all three fresh connections in the same call report 0 total. So it is not connection-bound.set_parentaccepts the parent and the ~16ms timer retries the open for ~3s. This still does not catch it, which is the key remaining clue: elapsed time alone does not make the configs appear within the budget. What does make them appear is whatever Bitwig does between the first failed attempt and the user's second click -- most likely a further step in the host's own GL bring-up, not the clock.Leading hypothesis
XWayland (Flatpak Bitwig over XWayland) populates its GLX framebuffer-config list lazily, and the trigger is an action in the host's GL setup rather than wall-clock time, so the first plugin to ask -- before that trigger -- sees an empty list. The plugin-side deferred retry cannot win a race whose finish line is a host action it does not cause.
Options for a real fix (none pursued; low priority)
plugin/gui_window.cc). EGL initialises cleanly on XWayland and does not have the GLX-FBConfig-enumeration lag. Isolated to the context-creation code; the ImGui renderer and everything above are GL-API-agnostic. Durable fix, most likely ends the whole class.Where the code is
The deferred-open machinery (
PluginGui::TryOpenWindow, theopen_pending_/open_attempts_retry on the frame timer) and theTYMBAL_GUI_LOGdiagnostics are inplugin/gui.ccandplugin/gui_window.cc.glXGetFBConfigs's total-count log line is the one to watch on the next attempt.