Chromium cannot open sdl2 opengl window with SDL_CreateWindow under emscripten
Affected version
gnome-shell 3.38.4
Linux terop-pc 5.11.0-25-generic #27 (closed)-Ubuntu SMP Fri Jul 9 23:06:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
XOrg
Bug summary
Launching chromium via panel in ubuntu desktop somehow breaks the browser's ability to open opengl canvas items. Chromium browser crashes when sdl2 SDL_CreateWindow is trying to open a window to existing opengl canvas item. We've traced it to somehow to gnome's panel, i.e. launching the browser via "chromium" -command or from gnome panel causes the problem, but if we launch browser via script like this, the bug disappears: #!/bin/sh /snap/chromium/1691/usr/lib/chromium-browser/chrome --password-store --flag-switches-begin --ignore-gpu-blocklist --flag-switches-end --origin-trial-disabled-features=SecurePaymentConfirmation
(this script can be found from chrome://version )
This means that normal chromium launching somehow causes opengl canvases from a web page to not be able to launch properly. Given that window creation inside sdl2 breaks, we expect some problems with linux opengl/window creation/opengl es/gnome's panel/gnome shell etc..
Steps to reproduce
- open chromium normally (92.0 or 93.0 version of chromium)
- open url http://meshpage.org
- wait until page has loaded
What happened
Browser closes unexpectedly. (after difficult fetching of call stacks:) Crashes at SDL_CreateWindow inside emscripten, i.e. window creation fails.
Note that the web page has code that creates 3d engine via sdl2 under emscripten. It creates the window at the first page at https://meshpage.org/
What did you expect to happen
Somehow the different ways of launching browser changes how opengl canvas items work under emscripten. This started to happen after ubuntu automatically upgraded gnome.
=> expect the web page to work correctly without crashing the browser.
(same chromium version works in windows and firefox can open the web page properly, but it's only ubuntu/gnome's xorg desktop where the bug happens.)