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

SegFault when launching pre-compiled binary, GLXWindow::create #44

Open
bassmadrigal opened this issue Dec 26, 2024 · 10 comments
Open

SegFault when launching pre-compiled binary, GLXWindow::create #44

bassmadrigal opened this issue Dec 26, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@bassmadrigal
Copy link

Describe the issue
Stuntrally crashes after loading the initial menu asking for graphics settings. Whether I do windowed or fullscreen, with varying resolutions, it will always segfault.

The Ogre.log mirrors the output on the terminal minus the log not containing the following segfault error:

stuntrally3.sh: line 21: 5865 Segmentation fault "$BINPATH/stuntrally3" $*

If I run gdb on the binary and backtrace, I get the following output:

Thread 1 "stuntrally3" received signal SIGSEGV, Segmentation fault.
0x00007fffe80ff521 in Ogre::GLXWindow::create(Ogre::PixelFormatGpu, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) () from lib/RenderSystem_GL3Plus.so.3.0
(gdb) bt
#0  0x00007fffe80ff521 in Ogre::GLXWindow::create(Ogre::PixelFormatGpu, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) () from lib/RenderSystem_GL3Plus.so.3.0
#1  0x00007fffe8100921 in Ogre::GLXWindow::GLXWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::PixelFormatGpu, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, Ogre::GLXGLSupport*) () from lib/RenderSystem_GL3Plus.so.3.0
#2  0x00007fffe80f2093 in Ogre::GLXGLSupport::newWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) ()
   from lib/RenderSystem_GL3Plus.so.3.0
#3  0x00007fffe81138f4 in Ogre::GL3PlusRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*)
    () from lib/RenderSystem_GL3Plus.so.3.0
#4  0x00007ffff77feb06 in Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) ()
   from lib/libOgreMain.so.3.0
#5  0x0000555555738d84 in GraphicsSystem::initialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#6  0x00005555557455b6 in MainEntryPoints::mainAppSingleThreaded(int, char const**) ()
#7  0x00005555555f0250 in main ()

How to Reproduce
I simply downloaded the pre-compiled StuntRally-3.2-Linux.txz from the releases section, uncompressed it, went into the folder and ran sh stuntrally3.sh, hit "accept" and it would crash.

It happens with 3.1 as well.

Desktop (please complete the following information):

  • OS: Slackware Linux 15.0
  • Game Version: 3.2 precompiled official release from GitHub page

Note, I attempted to compile from source to try and get debug symbols, but that fails... I'm still researching before I attempt to create an issue for it.

@bassmadrigal bassmadrigal added the bug Something isn't working label Dec 26, 2024
@cryham
Copy link
Member

cryham commented Dec 26, 2024

Okay, yes, it'd be good to build from sources and debug this.
I don't have a clue why it would crash so early and if it does inside GLXWindow I don't think it's my build's fault.

@cryham cryham changed the title SegFault when launching pre-compiled binary SegFault when launching pre-compiled binary, GLXWindow::create Dec 26, 2024
@bassmadrigal
Copy link
Author

bassmadrigal commented Dec 27, 2024

Okay, yes, it'd be good to build from sources and debug this.

New issue started for my compilation error (#45).

@bassmadrigal
Copy link
Author

After rebuilding bullet without double precision, I was able to build a debug version of stuntrally3 and it still segfaults. The Ogre.log does have a new error in it:

OGRE EXCEPTION(5:ItemIdentityException): Can not find codec for 'png' image format.
formats are: dds ktx oitd pkm. in Codec::getCodec at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreCodec.cpp (line 67)

Here's the entire Ogre.log and here's the backtrace:

Thread 1 "stuntrally3" received signal SIGSEGV, Segmentation fault.
0x00007fffec076741 in Ogre::GLXWindow::create (this=0x19e2180, depthStencilFormat=Ogre::PFG_UNKNOWN, miscParams=0x7fffffffce60) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp:422
422                 attr.colormap = XCreateColormap( xDisplay, DefaultRootWindow( xDisplay ), visualInfo->visual,
(gdb) bt
#0  0x00007fffec076741 in Ogre::GLXWindow::create (this=0x19e2180, depthStencilFormat=Ogre::PFG_UNKNOWN, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp:422
#1  0x00007fffec074d5b in Ogre::GLXWindow::GLXWindow (this=0x19e2180, title="Stunt Rally 3", width=1680, height=1050, fullscreenMode=false, depthStencilFormat=Ogre::PFG_UNKNOWN, miscParams=0x7fffffffce60, glsupport=0xb87550)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp:85
#2  0x00007fffec069736 in Ogre::GLXGLSupport::newWindow (this=0xb87550, name="Stunt Rally 3", width=1680, height=1050, fullscreen=false, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXGLSupport.cpp:426
#3  0x00007fffec0888de in Ogre::GL3PlusRenderSystem::_createRenderWindow (this=0xf82050, name="Stunt Rally 3", width=1680, height=1050, fullScreen=false, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp:801
#4  0x00007ffff72d906a in Ogre::Root::createRenderWindow (this=0xbcf830, name="Stunt Rally 3", width=1680, height=1050, fullScreen=false, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreRoot.cpp:1372
#5  0x00000000005eae61 in GraphicsSystem::initialize (this=0xaa9480, windowTitle="Stunt Rally 3") at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/OgreCommon/GraphicsSystem.cpp:380
#6  0x00000000005f8b7a in MainEntryPoints::mainAppSingleThreaded (argc=1, argv=0x7fffffffd828) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/OgreCommon/System/Desktop/MainLoopSingleThreaded.cpp:104
#7  0x0000000000529cc5 in mainApp (argc=1, argv=0x7fffffffd828) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/common/Main.cpp:195
#8  0x000000000052988e in main (argc=1, argv=0x7fffffffd828) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/./src/OgreCommon/MainEntryPointHelper.h:40

I'm not very knowledgeable with debugging, but if you need any additional information, I'm happy to provide it.

@cryham
Copy link
Member

cryham commented Dec 28, 2024

Ok this is bad:
OGRE EXCEPTION(5:ItemIdentityException): Can not find codec for 'png' image format. formats are: dds ktx oitd pkm.
It could mean that freeimage was not found and OgreNext was built without freeimage which is used for png, jpg etc.
I have libfreeimage-dev installed, and OgreNext CMake shows it during configure, also FreeImage_INCLUDE_DIR is set just in /usr/include

@cryham
Copy link
Member

cryham commented Dec 28, 2024

Hi @darksylinc do you have any ideas on this? I'm not sure why it could crash here:
attr.colormap = XCreateColormap( xDisplay, DefaultRootWindow( xDisplay ), visualInfo->visual, AllocNone );
ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp:422

@darksylinc
Copy link

darksylinc commented Dec 28, 2024

I don't know. But there's critical information missing here:

  • What GPU do you have? (e.g. NVIDA GeForce 1080? AMD Radeon 5700 XT?)
  • Do you have more than 1 GPU?
  • Do you have multiple monitors?
  • What Desktop Environment are you using? (e.g. KDE, GNOME, etc)
  • Are you using X11/Xorg or XWayland?

Other things that can help:

  • Post the output of ldd Stunt Rally's executable.
  • Try to run the game behind gamescope, which implements an XWayland server in a sandbox. e.g. run gamescope -- ./stuntrally3.
  • Running behind valgrind may reveal more

If running behind Gamescope works, then perhaps OP is missing an xorg dependency or his Xorg installation is broken.

@bassmadrigal
Copy link
Author

Ok this is bad: OGRE EXCEPTION(5:ItemIdentityException): Can not find codec for 'png' image format. formats are: dds ktx oitd pkm. It could mean that freeimage was not found and OgreNext was built without freeimage which is used for png, jpg etc. I have libfreeimage-dev installed, and OgreNext CMake shows it during configure, also FreeImage_INCLUDE_DIR is set just in /usr/include

Whoops, I missed that dependency (as well as zzlib). Both are now installed and I've rebuilt the entirety of sr3 and its dependencies using build-sr3-Linux.py.

Here's an updated Ogre.log.

I don't know. But there's critical information missing here:

  • What GPU do you have? (e.g. NVIDA GeForce 1080? AMD Radeon 5700 XT?)
  • Do you have more than 1 GPU?
  • Do you have multiple monitors?
  • What Desktop Environment are you using? (e.g. KDE, GNOME, etc)
  • Are you using X11/Xorg or XWayland?

Other things that can help:

  • Post the output of ldd Stunt Rally's executable.
  • Try to run the game behind gamescope, which implements an XWayland server in a sandbox. e.g. run gamescope -- ./stuntrally3.
  • Running behind valgrind may reveal more

If running behind Gamescope works, then perhaps OP is missing an xorg dependency or his Xorg installation is broken.

Apologies, I didn't want to overshare info since it wasn't asked for in the initial bug report template.

Single GPU, AMD RX 7900 GRE.
Dual monitors @ 1080p connected via displayport (GPU side) to hdmi (monitor side) cable.
Running KDE (Plasma 5) via Wayland

Gamescope was not available in our software repositories and attempts to build it have ran into dependency issues (required newer wayland-server than installed), so I used an older version, which then was missing additional dependencies. I'll work on that over the next few days (and make it available on the software repo for others) and try to post an update when complete.

ldd output

jbhansen@craven-moorhead:~/program-downloads/compile-stuntrally3/sr3/bin/Debug$ ldd stuntrally3 
        linux-vdso.so.1 (0x00007f2c463bd000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2c4635e000)
        libopenal.so.1 => /usr/lib64/libopenal.so.1 (0x00007f2c461f8000)
        libBulletDynamics.so.3.25 => /usr/lib64/libBulletDynamics.so.3.25 (0x00007f2c46108000)
        libBulletCollision.so.3.25 => /usr/lib64/libBulletCollision.so.3.25 (0x00007f2c45ff4000)
        libLinearMath.so.3.25 => /usr/lib64/libLinearMath.so.3.25 (0x00007f2c45fcc000)
        libBulletSoftBody.so.3.25 => /usr/lib64/libBulletSoftBody.so.3.25 (0x00007f2c45ef8000)
        libBulletWorldImporter.so.3.25 => /usr/lib64/libBulletWorldImporter.so.3.25 (0x00007f2c45ed4000)
        libOgreAtmosphere_d.so.3.0 => /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib/libOgreAtmosphere_d.so.3.0 (0x00007f2c45ebe000)
        libOgreOverlay_d.so.3.0 => /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib/libOgreOverlay_d.so.3.0 (0x00007f2c45e53000)
        libOgreHlmsUnlit_d.so.3.0 => /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib/libOgreHlmsUnlit_d.so.3.0 (0x00007f2c45e0c000)
        libOgreHlmsPbs_d.so.3.0 => /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib/libOgreHlmsPbs_d.so.3.0 (0x00007f2c45cf1000)
        libOgreMain_d.so.3.0 => /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib/libOgreMain_d.so.3.0 (0x00007f2c45200000)
        libSDL2-2.0.so.0 => /usr/lib64/libSDL2-2.0.so.0 (0x00007f2c45060000)
        libMyGUIEngine_d.so.3.2.3 => /home/jbhansen/program-downloads/compile-stuntrally3/mygui-next/build/Debug/lib/libMyGUIEngine_d.so.3.2.3 (0x00007f2c44c00000)
        libboost_system.so.1.78.0 => /usr/lib64/libboost_system.so.1.78.0 (0x00007f2c45cec000)
        libboost_thread.so.1.78.0 => /usr/lib64/libboost_thread.so.1.78.0 (0x00007f2c45cce000)
        libenet.so.7 => /usr/lib64/libenet.so.7 (0x00007f2c45cbe000)
        libvorbis.so.0 => /usr/lib64/libvorbis.so.0 (0x00007f2c45c90000)
        libvorbisfile.so.3 => /usr/lib64/libvorbisfile.so.3 (0x00007f2c45c86000)
        libogg.so.0 => /usr/lib64/libogg.so.0 (0x00007f2c45c7b000)
        libtinyxml2.so.10 => /usr/lib64/libtinyxml2.so.10 (0x00007f2c45c60000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f2c44800000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f2c44f18000)
        libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f2c45c43000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f2c44a21000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2c463bf000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f2c45c3e000)
        libatomic.so.1 => /usr/lib64/libatomic.so.1 (0x00007f2c45c34000)
        libBulletFileLoader.so.3.25 => /usr/lib64/libBulletFileLoader.so.3.25 (0x00007f2c45c20000)
        libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f2c45c16000)
        libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f2c45bf8000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f2c446be000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f2c45be4000)
        libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007f2c44eae000)
        libXaw.so.7 => /usr/lib64/libXaw.so.7 (0x00007f2c44647000)
        libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f2c45bd5000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f2c4461e000)
        libfreeimage.so.3 => /usr/lib64/libfreeimage.so.3 (0x00007f2c43e00000)
        libzzip-0.so.13 => /usr/lib64/libzzip-0.so.13 (0x00007f2c44ea4000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f2c44604000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f2c4453f000)
        libOgrePlanarReflections_d.so.3.0 => /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib/libOgrePlanarReflections_d.so.3.0 (0x00007f2c44523000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f2c44e9a000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f2c44e91000)
        libXmu.so.6 => /usr/lib64/libXmu.so.6 (0x00007f2c44506000)
        libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x00007f2c444f2000)
        libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f2c44a14000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f2c444ed000)
        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f2c444e5000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f2c444d2000)
        libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f2c4449c000)
        libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f2c43d0e000)
        libbrotlidec.so.1 => /usr/lib64/libbrotlidec.so.1 (0x00007f2c4448f000)
        libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f2c44466000)
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f2c43bda000)
        libbrotlicommon.so.1 => /usr/lib64/libbrotlicommon.so.1 (0x00007f2c43bb7000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f2c43b3f000)

valgrind output:

==9755== Invalid read of size 8
==9755==    at 0x16598741: Ogre::GLXWindow::create(Ogre::PixelFormatGpu, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreGLXWindow.cpp:422)
==9755==    by 0x16596D5A: Ogre::GLXWindow::GLXWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::PixelFormatGpu, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, Ogre::GLXGLSupport*) (OgreGLXWindow.cpp:85)
==9755==    by 0x1658B735: Ogre::GLXGLSupport::newWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreGLXGLSupport.cpp:426)
==9755==    by 0x165AA8DD: Ogre::GL3PlusRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreGL3PlusRenderSystem.cpp:801)
==9755==    by 0x53FB5C5: Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreRoot.cpp:1372)
==9755==    by 0x5EAE60: GraphicsSystem::initialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GraphicsSystem.cpp:380)
==9755==    by 0x5F8B79: MainEntryPoints::mainAppSingleThreaded(int, char const**) (MainLoopSingleThreaded.cpp:104)
==9755==    by 0x529CC4: mainApp(int, char const**) (Main.cpp:195)
==9755==    by 0x52988D: main (MainEntryPointHelper.h:40)
==9755==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==9755== 
==9755== 
==9755== Process terminating with default action of signal 11 (SIGSEGV)
==9755==  Access not within mapped region at address 0x0
==9755==    at 0x16598741: Ogre::GLXWindow::create(Ogre::PixelFormatGpu, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreGLXWindow.cpp:422)
==9755==    by 0x16596D5A: Ogre::GLXWindow::GLXWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::PixelFormatGpu, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, Ogre::GLXGLSupport*) (OgreGLXWindow.cpp:85)
==9755==    by 0x1658B735: Ogre::GLXGLSupport::newWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreGLXGLSupport.cpp:426)
==9755==    by 0x165AA8DD: Ogre::GL3PlusRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreGL3PlusRenderSystem.cpp:801)
==9755==    by 0x53FB5C5: Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, Ogre::StdMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*) (OgreRoot.cpp:1372)
==9755==    by 0x5EAE60: GraphicsSystem::initialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GraphicsSystem.cpp:380)
==9755==    by 0x5F8B79: MainEntryPoints::mainAppSingleThreaded(int, char const**) (MainLoopSingleThreaded.cpp:104)
==9755==    by 0x529CC4: mainApp(int, char const**) (Main.cpp:195)
==9755==    by 0x52988D: main (MainEntryPointHelper.h:40)
==9755==  If you believe this happened as a result of a stack
==9755==  overflow in your program's main thread (unlikely but
==9755==  possible), you can try to increase the size of the
==9755==  main thread stack using the --main-stacksize= flag.
==9755==  The main thread stack size used in this run was 8388608.
==9755== 
==9755== HEAP SUMMARY:
==9755==     in use at exit: 16,206,800 bytes in 70,870 blocks
==9755==   total heap usage: 192,217 allocs, 121,347 frees, 57,776,015 bytes allocated
==9755== 
==9755== LEAK SUMMARY:
==9755==    definitely lost: 6,912 bytes in 144 blocks
==9755==    indirectly lost: 0 bytes in 0 blocks
==9755==      possibly lost: 2,677,423 bytes in 16,328 blocks
==9755==    still reachable: 13,522,457 bytes in 54,397 blocks
==9755==                       of which reachable via heuristic:
==9755==                         multipleinheritance: 6,488 bytes in 10 blocks
==9755==         suppressed: 8 bytes in 1 blocks
==9755== Rerun with --leak-check=full to see details of leaked memory
==9755== 
==9755== For lists of detected and suppressed errors, rerun with: -s
==9755== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault

And just in case it's helpful, here's the entirety of the gdb output with my recompiled stuntrally3 (after correcting those dependency issues):

jbhansen@craven-moorhead:~/program-downloads/compile-stuntrally3/sr3/bin/Debug$ gdb stuntrally3 
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from stuntrally3...
(gdb) run
Starting program: /home/jbhansen/program-downloads/compile-stuntrally3/sr3/bin/Debug/stuntrally3 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Init :: new App
Init :: LoadSettings
Paths info
-------------
Bin exe:      /home/jbhansen/program-downloads/compile-stuntrally3/sr3/bin/Debug
Data:         /home/jbhansen/program-downloads/compile-stuntrally3/sr3/data
ConfigDir:    /home/jbhansen/program-downloads/compile-stuntrally3/sr3/config
User cfg,log: /home/jbhansen/.config/stuntrally3
User data:    /home/jbhansen/.local/share/stuntrally3
Cache:        /home/jbhansen/.cache/stuntrally3
-------------
Init :: createSystems
Init :: pathmanager
Paths info
-------------
Bin exe:      /home/jbhansen/program-downloads/compile-stuntrally3/sr3/bin/Debug
Data:         /home/jbhansen/program-downloads/compile-stuntrally3/sr3/data
ConfigDir:    /home/jbhansen/program-downloads/compile-stuntrally3/sr3/config
User cfg,log: /home/jbhansen/.config/stuntrally3
User data:    /home/jbhansen/.local/share/stuntrally3
Cache:        /home/jbhansen/.cache/stuntrally3
-------------
Init :: new GraphicsSystem
[New Thread 0x7ffff5633640 (LWP 20110)]
[New Thread 0x7fffecbd4640 (LWP 20111)]
[New Thread 0x7fffe7fff640 (LWP 20112)]
[New Thread 0x7fffe77fe640 (LWP 20113)]
[New Thread 0x7fffe6ffd640 (LWP 20114)]
[New Thread 0x7fffe65fc640 (LWP 20115)]
[New Thread 0x7fffe5dfb640 (LWP 20116)]
[New Thread 0x7fffe55fa640 (LWP 20117)]
[New Thread 0x7fffe4df9640 (LWP 20118)]
[New Thread 0x7fffdffff640 (LWP 20119)]
[Thread 0x7fffdffff640 (LWP 20119) exited]
[Thread 0x7fffe4df9640 (LWP 20118) exited]
[Thread 0x7fffe55fa640 (LWP 20117) exited]
[New Thread 0x7fffe55fa640 (LWP 20120)]
[New Thread 0x7fffe4df9640 (LWP 20121)]
[New Thread 0x7fffdffff640 (LWP 20122)]
[Thread 0x7fffdffff640 (LWP 20122) exited]
[Thread 0x7fffe4df9640 (LWP 20121) exited]
[Thread 0x7fffe55fa640 (LWP 20120) exited]
Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Mesh2
Registering ResourceManager for type OldSkeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
ArchiveFactory for archive type EmbeddedZip registered.
DDS codec registering
FreeImage version: 3.18.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,psb,cut,xbm,xpm,gif,hdr,g3,sgi,rgb,rgba,bw,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti,x3f,webp,jxr,wdp,hdp
ETC codec registering
OITD codec registering
Registering ResourceManager for type HighLevelGpuProgram
MovableObjectFactory for type 'Decal' registered.
MovableObjectFactory for type 'InternalCubemapProbe' registered.
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Item' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'Rectangle2Dv2' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject2' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
MovableObjectFactory for type 'WireAabb' registered.
Loading library ./RenderSystem_GL3Plus_d
Installing plugin: GL 3+ RenderSystem
OpenGL 3+ Rendering Subsystem created.
[New Thread 0x7fffe55fa640 (LWP 20123)]
[New Thread 0x7fffe4df9640 (LWP 20124)]
[New Thread 0x7fffdffff640 (LWP 20125)]
[New Thread 0x7fffdf6bd640 (LWP 20126)]
[New Thread 0x7fffdeebc640 (LWP 20127)]
Plugin successfully installed
Loading library ./RenderSystem_Vulkan_d
Installing plugin: Vulkan RenderSystem
[Vulkan] Initializing VkInstance
Found instance extension: VK_KHR_device_group_creation
Found instance extension: VK_KHR_external_fence_capabilities
Found instance extension: VK_KHR_external_memory_capabilities
Found instance extension: VK_KHR_external_semaphore_capabilities
Found instance extension: VK_KHR_get_physical_device_properties2
Found instance extension: VK_KHR_get_surface_capabilities2
Found instance extension: VK_KHR_surface
Found instance extension: VK_KHR_surface_protected_capabilities
Found instance extension: VK_KHR_wayland_surface
Found instance extension: VK_KHR_xcb_surface
Found instance extension: VK_KHR_xlib_surface
Found instance extension: VK_EXT_headless_surface
Found instance extension: VK_EXT_debug_report
Found instance extension: VK_EXT_debug_utils
Found instance extension: VK_EXT_swapchain_colorspace
Found instance extension: VK_KHR_display
Found instance extension: VK_KHR_get_display_properties2
Found instance extension: VK_EXT_acquire_xlib_display
Found instance extension: VK_EXT_direct_mode_display
Found instance extension: VK_EXT_display_surface_counter
Found instance layer: VK_LAYER_MESA_device_select
Found instance layer: VK_LAYER_VALVE_steam_fossilize_64
Found instance layer: VK_LAYER_VALVE_steam_overlay_64
Found instance layer: VK_LAYER_VALVE_steam_overlay_32
Found instance layer: VK_LAYER_VALVE_steam_fossilize_32
Found instance layer: VK_LAYER_KHRONOS_validation
Found instance layer: VK_LAYER_LUNARG_monitor
Found instance layer: VK_LAYER_LUNARG_gfxreconstruct
Found instance layer: VK_LAYER_KHRONOS_timeline_semaphore
Found instance layer: VK_LAYER_LUNARG_screenshot
Found instance layer: VK_LAYER_LUNARG_demo_layer
Found instance layer: VK_LAYER_INTEL_nullhw
Found instance layer: VK_LAYER_KHRONOS_synchronization2
Found instance layer: VK_LAYER_LUNARG_api_dump
Found instance layer: VK_LAYER_LUNARG_starter_layer
Found instance layer: VK_LAYER_LUNARG_device_simulation
Found instance layer: VK_LAYER_MESA_overlay
Requesting Instance Extension: VK_KHR_get_physical_device_properties2
Requesting Instance Extension: VK_KHR_xcb_surface
Requesting Instance Extension: VK_EXT_debug_report
Requesting Instance Extension: VK_EXT_debug_utils
Requesting Instance Extension: VK_KHR_surface
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 0.  Skipping ICD.
[New Thread 0x7fffd09ff640 (LWP 20129)]
[Vulkan] Found 2 devices
[Vulkan] Found devices:
AMD Radeon RX 7900 GRE (RADV NAVI31) #0
llvmpipe (LLVM 18.1.8, 256 bits) #1
Plugin successfully installed
Loading library ./Plugin_ParticleFX_d
Installing plugin: ParticleFX
Particle Emitter Type 'Point' registered
Particle Emitter Type 'Box' registered
Particle Emitter Type 'Ellipsoid' registered
Particle Emitter Type 'Cylinder' registered
Particle Emitter Type 'Ring' registered
Particle Emitter Type 'HollowEllipsoid' registered
Particle Affector Type 'LinearForce' registered
Particle Affector Type 'ColourFader' registered
Particle Affector Type 'ColourFader2' registered
Particle Affector Type 'ColourImage' registered
Particle Affector Type 'ColourInterpolator' registered
Particle Affector Type 'ScaleInterpolator' registered
Particle Affector Type 'Scaler' registered
Particle Affector Type 'Rotator' registered
Particle Affector Type 'DirectionRandomiser' registered
Particle Affector Type 'DeflectorPlane' registered
Plugin successfully installed
*-*-* OGRE Initialising
*-*-* Version 3.0.0 (Eris)
CPU Identifier & Features
-------------------------
 *   CPU ID: AuthenticAMD: AMD Ryzen 9 5950X 16-Core Processor
 *   Logical cores: 32
 *      SSE: yes
 *     SSE2: yes
 *     SSE3: yes
 *      MMX: yes
 *   MMXEXT: yes
 *    3DNOW: no
 * 3DNOWEXT: no
 *     CMOV: yes
 *      TSC: yes
 *      FPU: yes
 *      PRO: yes
 *       HT: no
-------------------------
******************************
*** Starting GLX Subsystem ***
******************************
GL3PlusRenderSystem::_createRenderWindow "Stunt Rally 3", 1680x1050 windowed  miscParams: FSAA=0 SDL2x11=140737488342552 gamma=Yes parentWindowHandle=92274702 reverse_depth=Yes title=Stunt Rally 3 vsync=No 

Thread 1 "stuntrally3" received signal SIGSEGV, Segmentation fault.
0x00007fffe409f741 in Ogre::GLXWindow::create (this=0x19fc960, depthStencilFormat=Ogre::PFG_UNKNOWN, miscParams=0x7fffffffce60) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp:422
422                 attr.colormap = XCreateColormap( xDisplay, DefaultRootWindow( xDisplay ), visualInfo->visual,
(gdb) bt
#0  0x00007fffe409f741 in Ogre::GLXWindow::create (this=0x19fc960, depthStencilFormat=Ogre::PFG_UNKNOWN, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp:422
#1  0x00007fffe409dd5b in Ogre::GLXWindow::GLXWindow (this=0x19fc960, title="Stunt Rally 3", width=1680, height=1050, fullscreenMode=false, depthStencilFormat=Ogre::PFG_UNKNOWN, miscParams=0x7fffffffce60, glsupport=0xfd16d0)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXWindow.cpp:85
#2  0x00007fffe4092736 in Ogre::GLXGLSupport::newWindow (this=0xfd16d0, name="Stunt Rally 3", width=1680, height=1050, fullscreen=false, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/windowing/GLX/OgreGLXGLSupport.cpp:426
#3  0x00007fffe40b18de in Ogre::GL3PlusRenderSystem::_createRenderWindow (this=0xeec260, name="Stunt Rally 3", width=1680, height=1050, fullScreen=false, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/RenderSystems/GL3Plus/src/OgreGL3PlusRenderSystem.cpp:801
#4  0x00007ffff72df5c6 in Ogre::Root::createRenderWindow (this=0xff6f50, name="Stunt Rally 3", width=1680, height=1050, fullScreen=false, miscParams=0x7fffffffce60)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreRoot.cpp:1372
#5  0x00000000005eae61 in GraphicsSystem::initialize (this=0xac1d60, windowTitle="Stunt Rally 3") at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/OgreCommon/GraphicsSystem.cpp:380
#6  0x00000000005f8b7a in MainEntryPoints::mainAppSingleThreaded (argc=1, argv=0x7fffffffd828) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/OgreCommon/System/Desktop/MainLoopSingleThreaded.cpp:104
#7  0x0000000000529cc5 in mainApp (argc=1, argv=0x7fffffffd828) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/common/Main.cpp:195
#8  0x000000000052988e in main (argc=1, argv=0x7fffffffd828) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/./src/OgreCommon/MainEntryPointHelper.h:40
(gdb) quit
A debugging session is active.

        Inferior 1 [process 20104] will be killed.

Quit anyway? (y or n) y

@darksylinc
Copy link

This is starting to look like an XWayland issue (i.e. an issue with KWin version being used).

My guess is glXGetVisualFromFBConfig returned nullptr, which could only happen if mGLSupport->selectFBConfig somehow returned a non-nullptr that is invalid. Or glXGetVisualFromFBConfig is broken.

Sounds like gamescope should be capable of workarounding the problem.

@bassmadrigal
Copy link
Author

So, after running into a bunch of issues trying to get gamescope to build on my system, I tried running sr3 from X11. In doing so, I was able to launch the game and go to start a race, but in that loading screen, I got a sigtrap.

(If you'd prefer, this can moved to a new issue.)

Here is my Ogre.log and MyGUI.log.

And the gdb backtrace:

#0  trap_instruction () at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/include/debugbreak/debugbreak.h:48
#1  0x00007ffff71dead7 in debug_break () at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/include/debugbreak/debugbreak.h:136
#2  Ogre::Node::_getFullTransform (this=0xbf5d100) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/include/OgreNode.h:680
#3  Ogre::MovableObject::_getParentNodeFullTransform (this=0xbb57e70) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreMovableObject.cpp:292
#4  0x00007ffff79909d5 in Ogre::HlmsPbs::fillBuffersFor (isV1=false, commandBuffer=0x2d299f0, lastCacheHash=536878606, casterPass=false, queuedRenderable=..., cache=0xbbd1c10, this=0x2244bc0)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/Components/Hlms/Pbs/src/OgreHlmsPbs.cpp:3232
#5  Ogre::HlmsPbs::fillBuffersForV2 (this=0x2244bc0, cache=0xbbd1c10, queuedRenderable=..., casterPass=false, lastCacheHash=536878606, commandBuffer=0x2d299f0)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/Components/Hlms/Pbs/src/OgreHlmsPbs.cpp:2980
#6  0x00007ffff727832d in Ogre::RenderQueue::renderGL3 (this=0x25aa1b0, rs=0xf63570, casterPass=false, dualParaboloid=false, passCache=0x25ae228, renderQueueGroup=..., indirectBuffer=0xc133b40, indirectDraw=0x7fff8bee2154 "", 
    startIndirectDraw=0x7fff8bee2140 "") at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreRenderQueue.cpp:650
#7  0x00007ffff7277a31 in Ogre::RenderQueue::render (this=0x25aa1b0, rs=0xf63570, firstRq=0 '\000', lastRq=199 '\307', casterPass=false, dualParaboloid=false)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreRenderQueue.cpp:450
#8  0x00007ffff72f8f47 in Ogre::SceneManager::_renderPhase02 (this=0x25a4ce0, camera=0x5440d30, lodCamera=0x5440d30, firstRq=0 '\000', lastRq=199 '\307', includeOverlays=false)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreSceneManager.cpp:1501
#9  0x00007ffff6fdf53e in Ogre::Camera::_renderScenePhase02 (this=0x5440d30, lodCamera=0x5440d30, firstRq=0 '\000', lastRq=199 '\307', includeOverlays=false)
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreCamera.cpp:386
#10 0x00007ffff7457111 in Ogre::Viewport::_updateRenderPhase02 (this=0xf63688, camera=0x5440d30, lodCamera=0x5440d30, firstRq=0 '\000', lastRq=199 '\307')
    at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreViewport.cpp:206
#11 0x00007ffff74f2205 in Ogre::CompositorPassScene::execute (this=0x55b5b70, lodCamera=0x0) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/Compositor/Pass/PassScene/OgreCompositorPassScene.cpp:313
#12 0x00007ffff74afbaf in Ogre::CompositorNode::_update (this=0x559e3b0, lodCamera=0x0, sceneManager=0x25a4ce0) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/Compositor/OgreCompositorNode.cpp:833
#13 0x00007ffff74cb5e0 in Ogre::CompositorWorkspace::_update (this=0x55b3e60, bInsideAutoreleasePool=true) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/Compositor/OgreCompositorWorkspace.cpp:836
#14 0x00007ffff7283f95 in Ogre::RenderSystem::compositorWorkspaceUpdate (this=0xf63570, workspace=0x55b3e60) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/OgreRenderSystem.cpp:1322
#15 0x00007ffff74cae4c in Ogre::CompositorWorkspace::_update (this=0x55b3e60, bInsideAutoreleasePool=false) at /home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/src/Compositor/OgreCompositorWorkspace.cpp:744
#16 0x000000000046e099 in AppGui::UpdCubeRefl (this=0xa8dc98) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/common/AppGui_CubeReflect.cpp:203
#17 0x0000000000740b7f in App::update (this=0xa8dc80, dt=0.623516977) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/game/Game_Update.cpp:291
#18 0x00000000005e1f0d in BaseSystem::update (this=0xac1d60, timeSinceLast=0.623516977) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/OgreCommon/BaseSystem.cpp:44
#19 0x00000000005eb6a6 in GraphicsSystem::update (this=0xac1d60, timeSinceLast=0.623516977) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/OgreCommon/GraphicsSystem.cpp:490
#20 0x00000000005f8e92 in MainEntryPoints::mainAppSingleThreaded (argc=1, argv=0x7fffffffd8e8) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/OgreCommon/System/Desktop/MainLoopSingleThreaded.cpp:164
#21 0x0000000000529cc5 in mainApp (argc=1, argv=0x7fffffffd8e8) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/common/Main.cpp:195
#22 0x000000000052988e in main (argc=1, argv=0x7fffffffd8e8) at /home/jbhansen/program-downloads/compile-stuntrally3/sr3/./src/OgreCommon/MainEntryPointHelper.h:40

And valgrind output at the crash (I can provide the full valgrind output if desired):

/home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/OgreMain/include/OgreNode.h(680): Assert Failure: '!mCachedTransformOutOfDate' 
==6084== 
==6084== Process terminating with default action of signal 5 (SIGTRAP)
==6084==    at 0x52FA01D: trap_instruction (debugbreak.h:48)
==6084==    by 0x52FAAD6: debug_break (debugbreak.h:136)
==6084==    by 0x52FAAD6: _getFullTransform (OgreNode.h:680)
==6084==    by 0x52FAAD6: Ogre::MovableObject::_getParentNodeFullTransform() const (OgreMovableObject.cpp:292)
==6084==    by 0x4E959D4: fillBuffersFor (OgreHlmsPbs.cpp:3232)
==6084==    by 0x4E959D4: Ogre::HlmsPbs::fillBuffersForV2(Ogre::HlmsCache const*, Ogre::QueuedRenderable const&, bool, unsigned int, Ogre::CommandBuffer*) (OgreHlmsPbs.cpp:2980)
==6084==    by 0x539432C: Ogre::RenderQueue::renderGL3(Ogre::RenderSystem*, bool, bool, Ogre::HlmsCache*, Ogre::RenderQueue::RenderQueueGroup const&, Ogre::IndirectBufferPacked*, unsigned char*, unsigned char*) (OgreRenderQueue.cpp:650)
==6084==    by 0x5393A30: Ogre::RenderQueue::render(Ogre::RenderSystem*, unsigned char, unsigned char, bool, bool) (OgreRenderQueue.cpp:450)
==6084==    by 0x5414F46: Ogre::SceneManager::_renderPhase02(Ogre::Camera*, Ogre::Camera const*, unsigned char, unsigned char, bool) (OgreSceneManager.cpp:1501)
==6084==    by 0x50FB53D: Ogre::Camera::_renderScenePhase02(Ogre::Camera const*, unsigned char, unsigned char, bool) (OgreCamera.cpp:386)
==6084==    by 0x5573110: Ogre::Viewport::_updateRenderPhase02(Ogre::Camera*, Ogre::Camera const*, unsigned char, unsigned char) (OgreViewport.cpp:206)
==6084==    by 0x560E204: Ogre::CompositorPassScene::execute(Ogre::Camera const*) (OgreCompositorPassScene.cpp:313)
==6084==    by 0x55CBBAE: Ogre::CompositorNode::_update(Ogre::Camera const*, Ogre::SceneManager*) (OgreCompositorNode.cpp:833)
==6084==    by 0x55E75DF: Ogre::CompositorWorkspace::_update(bool) (OgreCompositorWorkspace.cpp:836)
==6084==    by 0x539FF94: Ogre::RenderSystem::compositorWorkspaceUpdate(Ogre::CompositorWorkspace*) (OgreRenderSystem.cpp:1322)
==6084== 
==6084== HEAP SUMMARY:
==6084==     in use at exit: 215,416,744 bytes in 812,962 blocks
==6084==   total heap usage: 3,260,542 allocs, 2,447,580 frees, 2,407,243,614 bytes allocated
==6084== 
==6084== LEAK SUMMARY:
==6084==    definitely lost: 6,920 bytes in 145 blocks
==6084==    indirectly lost: 0 bytes in 0 blocks
==6084==      possibly lost: 61,464,053 bytes in 201,372 blocks
==6084==    still reachable: 153,945,619 bytes in 611,441 blocks
==6084==                       of which reachable via heuristic:
==6084==                         newarray           : 1,349,312 bytes in 24 blocks
==6084==                         multipleinheritance: 1,897,840 bytes in 1,841 blocks
==6084==         suppressed: 152 bytes in 4 blocks
==6084== Rerun with --leak-check=full to see details of leaked memory
==6084== 
==6084== Use --track-origins=yes to see where uninitialised values come from
==6084== For lists of detected and suppressed errors, rerun with: -s
==6084== ERROR SUMMARY: 2195 errors from 54 contexts (suppressed: 0 from 0)

@cryham
Copy link
Member

cryham commented Jan 2, 2025

Agh, ok this is "normal" 🫤 .
It happens for me too. I do always comment out these asserts in OgreNext sources and rebuild.
But maybe there is a better way by defining: OGRE_DEBUG_MODE < OGRE_DEBUG_MEDIUM,
so setting in cmake OGRE_DEBUG_LEVEL_DEBUG to 1 or 0
This also needs rebuilding all after: OgreNext, then Mygui, then SR3.
This doesn't happen in release.
I added info in 86f2f9c and fixed in build with .py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants