Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on launch on sway/wayland #1300

Closed
MayeulC opened this issue Aug 25, 2020 · 4 comments
Closed

Crash on launch on sway/wayland #1300

MayeulC opened this issue Aug 25, 2020 · 4 comments
Labels
area: ui Related to the graphical user interface (Qt) bug Behaving differently as it should behave lang: c++ Done in C++ code

Comments

@MayeulC
Copy link
Contributor

MayeulC commented Aug 25, 2020

Platform: Arclinux, Mesa drivers. Sway 1.5, Qt 5.15, SDL 2.0.12

% ./run
INFO [py] launching openage v0.4.1-258-g1cd3f679
INFO [py] compiled by GNU 10.2.0
INFO [py] running in DEVMODE
INFO [py] No converted assets have been found
INFO launching engine with Path(Union(Directory(/home/user/openage/cfg).root @ (b'cfg',), Directory(/home/user/openage/assets).root @ (b'assets',)):) and fps limit 0
INFO SDL audio subsystems initialized
INFO Using audio device: default [freq=48000, format=32784, channels=2, samples=4096]
INFO Initialized SDL video subsystems.
INFO Compiled with Qt 5.15.0 and run with Qt 5.15.0
WARN QWindow::fromWinId(): platform plugin does not support foreign windows.

SIGSEGV

FATAL: terminate has been called

current stack:

Traceback (most recent call last):
  File ?, in __libc_start_main+0xf2 [0x7f2e12414152]
  File ?, in ? [0x55dfecad2752]
  File ?, in ? [0x55dfecad25a4]
  File ?, in PyModule_ExecDef+0x78 [0x7f2e12f13418]
  File ?, in ? [0x55dfecad1c15]
  File ?, in ? [0x55dfecad1249]
  File ?, in ? [0x55dfecad0f90]
  File ?, in _PyEval_EvalFrameDefault+0x4cb7 [0x7f2e12e66097]
  File ?, in _PyFunction_Vectorcall+0x108 [0x7f2e12e72138]
  File ?, in _PyEval_EvalFrameDefault+0x4be4 [0x7f2e12e65fc4]
  File ?, in _PyObject_MakeTpCall+0x464 [0x7f2e12e6abf4]
  File ?, in PyCFunction_Call+0x7e [0x7f2e12e780ce]
  File ?, in ? [0x7f2dea03edae]
  File ?, in ? [0x7f2dea03e3dc]
  File ?, in openage::run_game(openage::main_arguments const&)+0x16f [0x7f2e12a7feff]
  File ?, in openage::Engine::Engine(openage::util::Path const&, int, bool, char const*)+0x1137 [0x7f2e12a71b27]
  File ?, in openage::gui::GUI::GUI(SDL_Window*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, openage::gui::EngineQMLInfo*)+0x92 [0x7f2e12b64192]
  File ?, in qtsdl::GuiRenderer::GuiRenderer(SDL_Window*)+0x24 [0x7f2e12b696a4]
  File ?, in qtsdl::GuiRendererImpl::GuiRendererImpl(SDL_Window*)+0x56 [0x7f2e12b6d6e6]
  File ?, in qtsdl::GuiRenderingSetupRoutines::GuiRenderingSetupRoutines(SDL_Window*)+0x43 [0x7f2e12b6e043]
  File ?, in qtsdl::GuiUniqueRenderingContext::GuiUniqueRenderingContext(SDL_Window*)+0x100 [0x7f2e12b6a4f0]
  File ?, in QWindow::setSurfaceType(QSurface::SurfaceType) [0x7f2e10d39680]
  File ?, in ? [0x7f2e124296a0]
  File ?, in ? [0x7f2e12b79441]
  File ?, in ? [0x7f2e127b7e07]
  File ?, in ? [0x7f2e127b7d9a]
  File ?, in openage::error::terminate_handler()+0xf5 [0x7f2e12b79635]

handing over to the system...

terminate called without an active exception
zsh: abort (core dumped)  ./run

I have the following environment variables set (it doesn't crash at the same place when I unset them):

SDL_VIDEODRIVER=wayland
QT_QPA_PLATFORM=wayland-egl

The log is slightly different when only the SDL environment variable is set, otherwise it is as above with both or only the QT one:

INFO [py] launching openage v0.4.1-258-g1cd3f679
INFO [py] compiled by GNU 10.2.0
INFO [py] running in DEVMODE
INFO [py] No converted assets have been found
INFO launching engine with Path(Union(Directory(/home/user/openage/cfg).root @ (b'cfg',), Directory(/home/user/openage/assets).root @ (b'assets',)):) and fps limit 0
INFO SDL audio subsystems initialized
INFO Using audio device: default [freq=48000, format=32784, channels=2, samples=4096]
INFO Initialized SDL video subsystems.
INFO Compiled with Qt 5.15.0 and run with Qt 5.15.0
WARN QGLXContext: No GLXContext given
INFO Falling back to separate render context for GUI
WARN QGLXContext: No GLXContext given

SIGSEGV

FATAL: terminate has been called

uncaught exception

std::exception of type qtsdl::CtxExtractionException: adding GUI to the main rendering context failed

current stack:

Traceback (most recent call last):
  File ?, in __libc_start_main+0xf2 [0x7f86d75b8152]
  File ?, in ? [0x56361f8d1752]
  File ?, in ? [0x56361f8d15a4]
  File ?, in PyModule_ExecDef+0x78 [0x7f86d80b7418]
  File ?, in ? [0x56361f8d0c15]
  File ?, in ? [0x56361f8d0249]
  File ?, in ? [0x56361f8cff90]
  File ?, in _PyEval_EvalFrameDefault+0x4cb7 [0x7f86d800a097]
  File ?, in _PyFunction_Vectorcall+0x108 [0x7f86d8016138]
  File ?, in _PyEval_EvalFrameDefault+0x4be4 [0x7f86d8009fc4]
  File ?, in _PyObject_MakeTpCall+0x464 [0x7f86d800ebf4]
  File ?, in PyCFunction_Call+0x7e [0x7f86d801c0ce]
  File ?, in ? [0x7f86af1e2dae]
  File ?, in ? [0x7f86af1e23dc]
  File ?, in openage::run_game(openage::main_arguments const&)+0x16f [0x7f86d7c23eff]
  File ?, in openage::Engine::Engine(openage::util::Path const&, int, bool, char const*)+0x1137 [0x7f86d7c15b27]
  File ?, in openage::gui::GUI::GUI(SDL_Window*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, openage::gui::EngineQMLInfo*)+0x92 [0x7f86d7d08192]
  File ?, in qtsdl::GuiRenderer::GuiRenderer(SDL_Window*)+0x24 [0x7f86d7d0d6a4]
  File ?, in qtsdl::GuiRendererImpl::GuiRendererImpl(SDL_Window*)+0x56 [0x7f86d7d116e6]
  File ?, in ? [0x7f86d7bd9f01]
  File ?, in qtsdl::GuiSeparateRenderingContext::GuiSeparateRenderingContext(SDL_Window*)+0x27f [0x7f86d7d0e7cf]
  File ?, in ? [0x7f86d6916812]
  File ?, in ? [0x7f86d6915f7a]
  File ?, in ? [0x7f86d6915914]
  File ?, in XQueryExtension+0x37 [0x7f86d5135387]
  File ?, in ? [0x7f86d75cd6a0]
  File ?, in ? [0x7f86d7d1d441]
  File ?, in ? [0x7f86d795be07]
  File ?, in ? [0x7f86d795bd9a]
  File ?, in openage::error::terminate_handler()+0xf5 [0x7f86d7d1d635]

handing over to the system...
@heinezen heinezen added bug Behaving differently as it should behave lang: c++ Done in C++ code area: ui Related to the graphical user interface (Qt) labels Aug 26, 2020
@TheJJ
Copy link
Member

TheJJ commented Aug 28, 2020

I think our rendering context extraction relies on X11, so we'd need a wayland path there to not use GLX, but whatever wayland provides us for that. This context then has to be shared by sdl and our Qt GUI. Feel free to implement :)

@okias okias mentioned this issue Dec 30, 2020
@okias
Copy link
Contributor

okias commented Dec 30, 2020

Wayland provides EGL (also EGL can be these days used on X11 well).

okias added a commit to okias/openage that referenced this issue Dec 31, 2020
Using KDE Runtime and SDK (it's only SDK with Qt libraries).

Currently, just cloning directory and opening it in GNOME Builder +
pressing "Build" button will generate installable and runable OpenAge!

This also can be used to generate nightly builds for Linux.

Unrelated issues to Flatpak itself:
 - SFTtech#1351 (master isn't able use
 older data generated by 0.4.1)
 - SFTtech#1350 (converting assets
 don't work on master branch at the moment)
 - SFTtech#1279 (0.4.1, Generate map
 crashes app)

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Dec 31, 2020
Using KDE Runtime and SDK (it's only SDK with Qt libraries).

Currently, just cloning directory and opening it in GNOME Builder +
pressing "Build" button will generate installable and runable OpenAge!

This also can be used to generate nightly builds for Linux.

Unrelated issues to Flatpak itself:
 - SFTtech#1353 (master, converting assets
 don't work on master branch at the moment)
 - SFTtech#1279 (0.4.1, Generate map
 crashes app)

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Dec 31, 2020
Using KDE Runtime and SDK (it's only SDK with Qt libraries).

Currently, just cloning directory and opening it in GNOME Builder +
pressing "Build" button will generate installable and runable OpenAge!

This also can be used to generate nightly builds for Linux.

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Jan 1, 2021
Flatpak uses KDE Runtime and SDK (since it has Qt libs).

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Jan 1, 2021
Flatpak uses KDE Runtime and SDK (since it has Qt libs).

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Jan 1, 2021
Flatpak uses KDE Runtime and SDK (since it has Qt libs).

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Jan 1, 2021
Flatpak uses KDE Runtime and SDK (since it has Qt libs).

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Jan 1, 2021
Flatpak uses KDE Runtime and SDK (since it has Qt libs).

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Jan 2, 2021
Flatpak uses KDE Runtime and SDK (since it has Qt libs).

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
okias added a commit to okias/openage that referenced this issue Jan 2, 2021
Flatpak uses KDE Runtime and SDK (since it has Qt libs).

Wayland has to be disabled due to SFTtech#1300

There is currently enabled too many permission, when game starts working
properly, it needs to be tightened to required minimum.

Cleanup phase should be implemented in future (for headers and other
stuff which remains after libraries).

Depend on: SFTtech#1348
Closes: SFTtech#1050

Signed-off-by: David Heidelberg <david@ixit.cz>
@TobiasFPJS
Copy link

Wayland also provides x11 compatibility.
Wayland is still betaware (although it is my daily driver, sway).
I personnally suggest not bothering, as anybody who is running wayland, also has quick access to an x11 powered UI.
Come time to launch in a year or two, and we can talk about fixing wayland support.
I am just somebody who has made a single contribution, so I am not in a position to make decisions, those are just my two cents.

@heinezen
Copy link
Member

heinezen commented Sep 8, 2023

The Qt-to-SDL handshake for the rendering was removed in #1497 which should resolve all Wayland issues.

@heinezen heinezen closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui Related to the graphical user interface (Qt) bug Behaving differently as it should behave lang: c++ Done in C++ code
Projects
None yet
Development

No branches or pull requests

5 participants