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

Segmentation Fault with Ubuntu 24.10 #35

Open
theo-dep opened this issue Feb 23, 2025 · 0 comments
Open

Segmentation Fault with Ubuntu 24.10 #35

theo-dep opened this issue Feb 23, 2025 · 0 comments

Comments

@theo-dep
Copy link

theo-dep commented Feb 23, 2025

Hey,
Related to #6, Wayland is the default display since 21.04.
GLFW must be updated with the wayland support (and bigg compiled with GLFW_EXPOSE_NATIVE_WAYLAND).
bigg::Application::run must be created with

    bgfx::PlatformData platformData;
#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
    if (GLFW_PLATFORM_WAYLAND == glfwGetPlatform()) {
	platformData.nwh = glfwGetWaylandWindow(mWindow);
	platformData.ndt = glfwGetWaylandDisplay();
    } else {
	platformData.nwh = (void*)(uintptr_t)glfwGetX11Window(mWindow);
	platformData.ndt = glfwGetX11Display();
    }
#elif BX_PLATFORM_OSX
    platformData.nwh = glfwGetCocoaWindow(mWindow);
#elif BX_PLATFORM_WINDOWS
    platformData.nwh = glfwGetWin32Window(mWindow);
#endif // BX_PLATFORM_
    bgfx::setPlatformData( platformData );

But BGFX is too outdated I think, wayland support cames with bgfx::PlatformData::type.

Stacktrace :

		glXMakeCurrent( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh, m_context);

libX11.so.6!require_socket() (/build/libx11-aL6a2q/libx11-1.8.7/src/xcb_io.c:70)
libX11.so.6!_XFlush(Display * dpy) (/build/libx11-aL6a2q/libx11-1.8.7/src/xcb_io.c:606)
libX11.so.6!_XGetRequest(Display * dpy, CARD8 type, size_t len) (/build/libx11-aL6a2q/libx11-1.8.7/src/XlibInt.c:1787)
libX11.so.6!XQueryExtension(Display * dpy, Display * dpy@entry, const char * name, const char * name@entry, int * major_opcode, int * major_opcode@entry, int * first_event, int * first_event@entry, int * first_error, int * first_error@entry) (/build/libx11-aL6a2q/libx11-1.8.7/src/QuExt.c:49)
libGLX.so.0!InitDisplayInfoEntry(Display * dpy) (/usr/src/libglvnd-1.7.0-1build1/src/GLX/libglxmapping.c:639)
libGLX.so.0!__glXLookupDisplay(Display * dpy, Display * dpy@entry) (/usr/src/libglvnd-1.7.0-1build1/src/GLX/libglxmapping.c:755)
libGLX.so.0!CommonMakeCurrent(Display * dpy, GLXDrawable draw, GLXDrawable read, GLXContext context, char callerOpcode) (/usr/src/libglvnd-1.7.0-1build1/src/GLX/libglx.c:1018)
bgfx::gl::GlContext::create(struct bgfx::gl::GlContext * const this, uint32_t _width, uint32_t _height) (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/glcontext_glx.cpp:185)
bgfx::gl::RendererContextGL::setRenderContextSize(struct bgfx::gl::RendererContextGL * const this, uint32_t _width, uint32_t _height, uint32_t _flags) (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/renderer_gl.cpp:2933)
bgfx::gl::RendererContextGL::init(struct bgfx::gl::RendererContextGL * const this) (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/renderer_gl.cpp:1461)
bgfx::gl::rendererCreate() (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/renderer_gl.cpp:3536)
bgfx::rendererCreate(enum bgfx::RendererType::Enum _type) (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/bgfx.cpp:1970)
bgfx::Context::rendererExecCommands(struct bgfx::Context * const this, class bgfx::CommandBuffer & _cmdbuf) (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/bgfx.cpp:2019)
bgfx::Context::renderFrame(struct bgfx::Context * const this, int32_t _msecs) (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/bgfx.cpp:1672)
bgfx::renderFrame() (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/bgfx.cpp:1035)
bgfx::Context::renderThread() (/home/theo/Dev/bigg/deps/bgfx.cmake/bgfx/src/bgfx_p.h:2256)
bx::Thread::entry(class bx::Thread * const this) (/home/theo/Dev/bigg/deps/bgfx.cmake/bx/src/thread.cpp:255)
bx::ThreadInternal::threadFunc(void * _arg) (/home/theo/Dev/bigg/deps/bgfx.cmake/bx/src/thread.cpp:71)
libc.so.6!start_thread(void * arg) (pthread_create.c:447)
libc.so.6!__GI___clone3() (clone3.S:78)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant