Author Topic: [fixed] 3.6.0.3-debian & 3.8.0-beta1, on L32, Segmentation fault at game loading  (Read 1219 times)

maybit

  • Guest
Hi everyone,

I encounter the following segfault with both megaglest 3.6 and megaglest 3.8b1

How to reproduce



  • Start Megaglest
  • Try to launch any solo game (tutorial/scenario/custom game... did not try LAN and others)

Description of the problem



Megaglest stops running with a segfault at the end of the game loading, when reachin 100%  (screenshot)

The logs are:
The versions of the installed packages are:
  • megaglest: 3.6.0.3-1.2
  • megaglest-data: 3.6.0.3-1
Both were installed through aptitude

Platform infos



Linux 32bits > Debian Testing (kept updated)
KDE4

Hardware infos



Intel Core Duo T2050 @ 1.60GHz
Graphics card (extract from lspci): 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
Ram: 2Go + 512 Mo

MegaGlest version



megaglest 3.6.0.1:
Code: [Select]
bernard ~ $ megaglest --version
megaglest v3.6.0.3
Compiled using: GNUC: 40702 on: Oct 23 2012 15:37:17
SVN: [Rev: ] - using STREFLOP

megaglest 3.8.0-beta1
Code: [Select]
bernard ~ $ megaglest/megaglest --version
megaglest v3.8.0-beta1
Compiled using: GNUC: 40403 on: Jun 25 2013 22:20:53 platform: Linux endianness: little
SVN: [Rev: 4514] - using STREFLOP [SSE] - [no-denormals]
p11-kit: invalid config filename, will be ignored in the future: /etc/pkcs11/modules/gnome-keyring-module
p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: cannot open shared object file: No such file or directory

I hope this helps!
If you need more info/more steps, ask :)

Cheers,



Edit (tomreyn): Removed [bug] tag, not needed on the bug reports forum.
« Last Edit: 13 November 2013, 21:33:44 by maybit »

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Is it Debian 6.0/Squeeze?

If yes then maybe this information can help you:
Quote
'Be sure to have the squeeze-backports repository installed...'

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
"Testing" refers to a future (then "stable") release, the one currently worked on is codenamed "jessie". "Squeeze" is currently "oldstable", so the last but one stable release (the latest "stable" release is "wheezy"). So backports should not be necessary here.

Our output is not very telling here. Your graphics chipset can give you a hard time getting MG (and some other 3-d games) to work, though.

For now, can we see gdb backtraces for both versions (or just for 3.8.0 beta1 if you prefer to not spend too much time)?
The process to get those is as follows:

Make sure any output will be in English
Code: [Select]
export LANG=C
Install gdb if not already installed:
Code: [Select]
sudo apt-get update && sudo apt-get install gdb
Activate full core dumps:
Code: [Select]
ulimit -c unlimited
Move any existing (likely unrelated) core files out of the way:
Code: [Select]
mv core* /tmp
Run MegaGlest (that's just megaglest for the 3.6.0.3 .deb):
Code: [Select]
./start_megaglest
Make MegaGlest crash - it should say that a core file was written then.
Check you have a fresh core file:
Code: [Select]
ls -lh core*
Run gdb and have it process the core file (replace ./megaglest by /usr/games/megaglest and adjust the output filename when analyzing the 3.6.0.3 core file)
Code: [Select]
gdb -q -n -ex "bt" -batch ./megaglest ./core* >/tmp/megaglest_bt_3.8.0-beta1.txt 2>&1
Take a look at the backtrace:
Code: [Select]
editor /tmp/megaglest_bt_3.8.0-beta1.txt
Then make it available to us, use bbcode "code" tags ("#" button while editing a post) if posting it here, or use a pastebin if it's too large for the forum.
« Last Edit: 18 August 2013, 14:07:13 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

maybit

  • Guest
Heya! Thanks for the quick feedback!

Got gdb on my laptop, but I will not be able to provide that before this evening (= now+ ~6h).

Can try to grab the svn version and compile it if you prefer.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
I just rewrote the above a little.

You can try compiling from SVN (but I'd suggest you only do this after running gdb since I'd like to know what's going wrong for you with the existing builds). The SVN code will not differ much from 3.8.0 beta1, but since it will be your own build it might help with debugging.

I may be available on IRC (#megaglest on Freenode, same nickname) when you'll be working on this.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

maybit

  • Guest
Ok, so here are the outputs:

debian testing:

Code: (megaglest_bt_3.6.0.3-debian.txt) [Select]
[New LWP 4225]
[New LWP 4228]
[New LWP 4226]
[New LWP 4229]
[New LWP 4232]
[New LWP 4234]
[New LWP 4240]
[New LWP 4241]
[New LWP 4238]
[New LWP 4233]

warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Core was generated by `./megaglest'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
#0  0x00000000 in ?? ()
#1  0x081d3823 in Glest::Game::Renderer::MapRenderer::renderVisibleLayers(Glest::Game::Map const*, float, Glest::Game::VisibleQuadContainerCache&) ()
#2  0x081db6dc in Glest::Game::Renderer::renderSurface(int) ()
#3  0x08163a9f in Glest::Game::Game::render3d() ()
#4  0x081730e3 in Glest::Game::Game::renderWorker() ()
#5  0x08234789 in Glest::Game::Program::loopWorker() ()
#6  0x0822c10d in Glest::Game::ExceptionHandler::handleRuntimeError(char const*) ()
#7  0x08219eab in Glest::Game::handleSIGSEGV(int) ()
#8  <signal handler called>
#9  0x00000000 in ?? ()

Megaglest 3.8.0-beta1
Code: (megaglest_bt_3.8.0-beta1.txt) [Select]
[New LWP 4123]
[New LWP 4126]
[New LWP 4136]
[New LWP 4131]
[New LWP 4127]
[New LWP 4137]
[New LWP 4129]
[New LWP 4139]
[New LWP 4124]
[New LWP 4130]
[New LWP 4134]

warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Core was generated by `./megaglest'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
#0  0x00000000 in ?? ()
#1  0x0836dfbb in Glest::Game::Renderer::MapRenderer::renderVisibleLayers (this=0x8d3267c <Glest::Game::Renderer::getInstance()::renderer+828>, map=0xaa26468, coordStep=1, qCache=...) at /home/softcoder/Code/megaglest/trunk/source/glest_game/graphics/renderer.cpp:4106
#2  0x0836e8bf in Glest::Game::Renderer::renderSurface (this=0x8d32340 <Glest::Game::Renderer::getInstance()::renderer>, renderFps=-1) at /home/softcoder/Code/megaglest/trunk/source/glest_game/graphics/renderer.cpp:4221
#3  0x082b7f8b in Glest::Game::Game::render3d (this=0xaa26400) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:4957
#4  0x082cd992 in Glest::Game::Game::renderWorker (this=0xaa26400) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:3118
#5  0x082cdfc0 in Glest::Game::Game::render (this=0xaa26400) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:3048
#6  0x083ed241 in Glest::Game::Program::loopWorker (this=0x9c47a68) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/program.cpp:422
#7  0x083a1147 in Glest::Game::ExceptionHandler::handleRuntimeError (msg=<optimized out>, getStackTraceString=true) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:684
#8  0x083a15a1 in Glest::Game::handleSIGSEGV (sig=11) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5532
#9  <signal handler called>
#10 0x00000000 in ?? ()
#11 0x0836dfbb in Glest::Game::Renderer::MapRenderer::renderVisibleLayers (this=0x8d3267c <Glest::Game::Renderer::getInstance()::renderer+828>, map=0xaa26468, coordStep=1, qCache=...) at /home/softcoder/Code/megaglest/trunk/source/glest_game/graphics/renderer.cpp:4106
#12 0x0836e8bf in Glest::Game::Renderer::renderSurface (this=0x8d32340 <Glest::Game::Renderer::getInstance()::renderer>, renderFps=-1) at /home/softcoder/Code/megaglest/trunk/source/glest_game/graphics/renderer.cpp:4221
#13 0x082b7f8b in Glest::Game::Game::render3d (this=0xaa26400) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:4957
#14 0x082cd992 in Glest::Game::Game::renderWorker (this=0xaa26400) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:3118
#15 0x082cdfc0 in Glest::Game::Game::render (this=0xaa26400) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game.cpp:3048
#16 0x083ed241 in Glest::Game::Program::loopWorker (this=0x9c47a68) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/program.cpp:422
#17 0x083c2f4a in Glest::Game::glestMain (argc=1, argv=0xbfae8b24) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5379
#18 0x083c715d in Glest::Game::glestMainSEHWrapper (argc=1, argv=0xbfae8b24) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5624
#19 0x083c734f in Glest::Game::glestMainWrapper (argc=1, argv=0xbfae8b24) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5697
#20 0x083c7443 in main (argc=1, argv=0xbfae8b24) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:5703

maybit

  • Guest
Compilation success... on the first attempt  ;) svn revision: 4527 . It's a nice thing to have a script that output the required packages on a per-dsitribution basis!
Pasted here the output of the compilation process and the first run (which segfaulted at the same moment as above )

Code: (megaglest_bt_trunk_r4527.txt) [Select]
[New LWP 20315]
[New LWP 20329]
[New LWP 20319]
[New LWP 20318]
[New LWP 20324]
[New LWP 20323]
[New LWP 20327]
[New LWP 20328]
[New LWP 20321]
[New LWP 20322]
[New LWP 20316]
[New LWP 20326]

warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Core was generated by `mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
#0  0x00000000 in ?? ()
#1  0x08270283 in Glest::Game::Renderer::MapRenderer::renderVisibleLayers (this=0x88eaabc <Glest::Game::Renderer::getInstance()::renderer+828>, map=0xa4bd190, coordStep=1, qCache=...) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/graphics/renderer.cpp:4106
#2  0x08270a0b in Glest::Game::Renderer::renderSurface (this=0x88ea780 <Glest::Game::Renderer::getInstance()::renderer>, renderFps=-1) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/graphics/renderer.cpp:4221
#3  0x081a54c3 in Glest::Game::Game::render3d (this=0xa4bd128) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/game/game.cpp:4957
#4  0x081b6e9c in Glest::Game::Game::renderWorker (this=0xa4bd128) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/game/game.cpp:3118
#5  0x081bd700 in Glest::Game::Game::render (this=0xa4bd128) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/game/game.cpp:3048
#6  0x082f6c2f in Glest::Game::Program::loopWorker (this=0x9481f80) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/main/program.cpp:422
#7  0x082c5bb7 in Glest::Game::ExceptionHandler::handleRuntimeError (msg=0x1 <Address 0x1 out of bounds>, getStackTraceString=true) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/main/main.cpp:684
#8  0x082c5f1b in Glest::Game::handleSIGSEGV (sig=11) at /home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/main/main.cpp:5532
#9  <signal handler called>
#10 0x00000000 in ?? ()

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
This is very obvious a problem with the gfx driver.  If you can try to run with another version, please do it.

From the stacktrace you see the place where it crashes::
/home/bernard/tmp/megaglest/megaglest_trunk/source/glest_game/graphics/renderer.cpp:4106

This line looks like this and its an OpenGL call and it crashes in the driver .
glBindBuffer(GL_ARRAY_BUFFER_ARB,0);

« Last Edit: 18 August 2013, 23:18:28 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

maybit

  • Guest
Ok! Thank you! About upgrading the driver: I never tinkered with that, but I'll dig into it this week. I'd be interested if you have any pointer on how do that. By the way, neither aptitude nor lsmod showed something for gfx or opengl.

Digging a bit more, I installed glxinfo through mesa-utils. It seems opengl is enabled, yay :)
And I found some info about my driver:

Code: ("excerpt from glxinfo") [Select]
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 945GM x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 9.1.4

I'll come back when I make some progress.

Thanks for the help!

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Mesa 9.1.4 is very recent already, the latest version is 9.1.6 (sid has this one). So upgrading might help - or make things less reliable. I'm also using 9.1.4 but on Ubuntu (maybe they forgot to provide their patches to upstream). It may be wise to check any Debian bug reports if you haven't done so already.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

maybit

  • Guest
Hello!

Frankly, I had not much time back then and let sit this problem... And it seems it solved by itself :)

I did not even recompiled Megaglest since then, I just ran it, and tadaaa! Tutorial started and I was off to create my first worker.
That said, you probably were right: this is my current mesa version:

Code: [Select]
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 945GM x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 9.2.2

Well, anyway, many thanks for your advices!