xmoto-0.6.1_3 crashes on 13.1 STABLE with ode-0.13_4,1: ---gdb log--- New UI allocated (gdb) r Starting program: /usr/local/bin/xmoto [New LWP 108967 of process 52881] [New LWP 108968 of process 52881] Thread 1 received signal SIGSEGV, Segmentation fault. Address not mapped to object. 0x00000008010da934 in strtod_l (s00=0x0, se=0x0, loc=<optimized out>) at gdtoa_strtod.c:147 147 for(s = s00;;s++) switch(*s) { (gdb) bt #0 0x00000008010da934 in strtod_l (s00=0x0, se=0x0, loc=<optimized out>) at gdtoa_strtod.c:147 #1 0x0000000800ad5e6f in ?? () from /usr/local/lib/libGLU.so.1 #2 0x0000000800adaa33 in gluBuild2DMipmaps () from /usr/local/lib/libGLU.so.1 #3 0x00000000003208bb in TextureManager::createTexture (this=0x8024acdc8, Name="roundButtonPressed", pcData=0x80546d500 "", nWidth=128, nHeight=128, bAlpha=true, bClamp=false, eFilterMode=FM_MIPMAP) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/common/VTexture.cpp:179 #4 0x00000000003210f0 in TextureManager::loadTexture (this=0x8024acdc8, Path="Textures/UI/roundButtonPressed.png", bSmall=false, bClamp=false, eFilterMode=FM_MIPMAP, persistent=true, associatedSprite=0x802486d00) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/common/VTexture.cpp:340 #5 0x00000000002fdb51 in Theme::loadTexture (this=0x8024acdc0, p_fileName="Textures/UI/roundButtonPressed.png", bSmall=false, bClamp=false, eFilterMode=FM_MIPMAP, persistent=true, associateSprite=0x802486d00) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/common/Theme.cpp:114 #6 0x0000000000302f49 in Sprite::getTexture (this=0x802486d00, bSmall=false, bClamp=false, eFilterMode=FM_MIPMAP) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/common/Theme.cpp:707 #7 0x000000000038a61f in UIButtonDrawn::UIButtonDrawn (this=0x8024ada40, pParent=0x802447320, i_spriteUnpressed="RoundButtonUnpressed", i_spritePressed="RoundButtonPressed", i_spriteHover="RoundButtonHover", x=560, y=390, Caption=..., nWidth=180, nHeight=180) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/gui/basic/GUIButtonDrawn.cpp:42 #8 0x000000000039c5ab in UIQuickStartButton::UIQuickStartButton (this=0x8024ada40, pParent=0x802447320, x=560, y=390, Caption="Quick start", nWidth=180, nHeight=180, i_qualityMIN=1, i_difficultyMIN=1, i_qualityMAX=5, i_difficultyMAX=5) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/gui/specific/GUIXMoto.cpp:285 #9 0x0000000000407654 in StateMainMenu::createGUIIfNeeded (i_screen=0x8024ad7e4) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/states/StateMainMenu.cpp:896 #10 0x00000000004064a4 in StateMainMenu::enter (this=0x8024ad7c0) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/states/StateMainMenu.cpp:166 #11 0x000000000041d6c4 in StateManager::pushState (this=0x8024467c0, pNewState=0x8024ad7c0) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/states/StateManager.cpp:185 #12 0x00000000004acbdf in GameApp::run_load (this=0x802424000, nNumArgs=1, ppcArgs=0x7fffffffe798) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/xmoto/GameInit.cpp:705 #13 0x00000000004a8347 in GameApp::run (this=0x802424000, nNumArgs=1, ppcArgs=0x7fffffffe798) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/xmoto/GameInit.cpp:158 #14 0x00000000004a8192 in main (nNumArgs=1, ppcArgs=0x7fffffffe798) at /disk-samsung/freebsd-ports/games/xmoto/work/xmoto-0.6.1/src/xmoto/GameInit.cpp:117 (gdb)
All dependencies: $ pkg info -d xmoto xmoto-0.6.1_3: libxdg-basedir-1.2.2 libxml2-2.10.3_1 sdl_net-1.2.8_3 lua52-5.2.4 sdl_ttf-2.0.11_8 png-1.6.38 libglvnd-1.4.0_2 libGLU-9.0.2_1 jpeg-turbo-2.1.4 curl-7.85.0 sdl-1.2.15_15,2 ode-0.13_4,1 sqlite3-3.39.3_1,1 sdl_mixer-1.2.12_14
^Triage: Loop in x11 (libGLU) and acm@ (ode) Yuri is this reproducible in any other branch/release version (in/out of poudriere)? This will assist/ease reproduction/isolation
(In reply to Kubilay Kocak from comment #2) I only tried with 13.1 STABLE.
Also: this system has a very old OpenGL card. This may or may not cause this crash.
Likely a Mesa bug. - What exactly GPU do you have? Show "pciconf -l | fgrep vga" output - What OpenGL driver is used? Show "LIBGL_DEBUG=verbose glxinfo 2>&1 | fgrep dri.so" - What OpenGL version it supports? Show "glxinfo -B" output - Can you reproduce using software rendering with LIBGL_ALWAYS_SOFTWARE=1 via environ(7)? - Can you reproduce by raising OpenGL version with allow_higher_compat_version=true via environ(7)? - Can you reproduce with newer OpenGL driver via graphics/mesa-devel? - Can you reproduce with older OpenGL driver by downgrading graphics/mesa-dri? - Can you reproduce with SDL2 via devel/sdl12-compat? - Can you try disabling gluBuild2DMipmaps() in games/xmoto by patching *Texture() from FM_MIPMAP to FM_LINEAR or FM_NEAREST by default?
(In reply to Jan Beich from comment #5) Here is the first part of answers: $ pciconf -l | fgrep vga vgapci0@pci0:3:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x104a subvendor=0x19da subdevice=0x6222 This command doesn't return anything: LIBGL_DEBUG=verbose glxinfo 2>&1 | fgrep dri.so $ glxinfo -B name of display: unix:0.0 display: unix:0 screen: 0 direct rendering: Yes Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 2048 MB Total available memory: 2048 MB Currently available dedicated video memory: 1775 MB OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GT 610/PCIe/SSE2 OpenGL core profile version string: 4.5.0 NVIDIA 390.154 OpenGL core profile shading language version string: 4.50 NVIDIA OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 4.5.0 NVIDIA 390.154 OpenGL shading language version string: 4.50 NVIDIA OpenGL context flags: (none) OpenGL profile mask: (none) OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.154 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 Still reproducible with LIBGL_ALWAYS_SOFTWARE=1. Still reproducible with allow_higher_compat_version=true
glGetString(GL_VERSION) returns null on this system and xmoto expects !=null.
This looks like a bug in /usr/local/lib/libGL-NVIDIA.so.1 The documentation https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGetString.xhtml doesn't say that it can return null. It isn't clear where to report bugs for nvidia-driver-390-390.154
I get the same crash on FreeBSD 14 CURRENT (main-75217c2b470) with nvidia-driver-340 340.108_3 so it does not seem to be specific to this driver only.
This looks like a bug in xmoto itself (I have rebuilt graphics/libglvnd WITH_DEBUG=yes) env __GLVND_APP_ERROR_CHECKING=1 gdb /usr/local/bin/xmoto (gdb) run Starting program: /usr/local/bin/xmoto warning: Could not load shared library symbols for [vdso]. Do you need "set solib-search-path" or "set sysroot"? [New LWP 105386 of process 87617] [New LWP 105387 of process 87617] OpenGL function called without a current context Thread 1 received signal SIGABRT, Aborted. looks like OpenGL context has not yet been initialized...