Author Topic: [fixed] r3217: Savegames: tech tree has no tech resources msg  (Read 821 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
While loading a savegame (see note below) which uses a techtree not available on my system, I ran into this:

Code: [Select]
$ LANG=en_US.utf-8 ./dev_rungame
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: option value of option vblank_mode ignored.
megaglest v3.6.1-dev
Compiled using: GNUC: 40601 [64bit] on: Apr  2 2012 12:42:52
SVN: [Rev: 3217M] - using STREFLOP [SSE] - [no-denormals]
>>> schoen
[2012-04-02 14:50:01] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/world/map.cpp::load Line: 541] Error [This tech tree has not tech resources, one at least is required]
[2012-04-02 14:50:01] *ERROR* In [program.cpp::setState Line: 590]
Error [Error loading map: /home/tomreyn/.megaglest/maps/Captive 1v1.gbm
This tech tree has not tech resources, one at least is required]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 634] Error detected: signal 11:
Error saved to logfile [/home/tomreyn/.megaglest/error.log]

Segmentation fault detected, analyzing...

warning: [New LWP 29610]
[New LWP 29614]
[New LWP 29616]
[New LWP 29621]
[New LWP 29615]
[New LWP 29620]
[New LWP 29619]
[New LWP 29613]
[New LWP 29618]
[New LWP 29622]
Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Core was generated by `./megaglest'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000899074 in Glest::Game::World::showWorldForPlayer (this=0x2fb54f8, factionIndex=0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/world/world.cpp:1789
1789           else if(game->getGameOver() == true &&
#0  0x0000000000899074 in Glest::Game::World::showWorldForPlayer (this=0x2fb54f8, factionIndex=0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/world/world.cpp:1789
#1  0x00000000005d781e in Glest::Game::Renderer::getQuadCache (this=0xc80280, forceNew=false, updateOnDirtyFrame=true) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:7812
#2  0x00000000005d8883 in Glest::Game::Renderer::renderUnits (this=0xc80280, renderFps=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:4595
#3  0x0000000000542c9b in Glest::Game::Game::render3d (this=0x2fb54c0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:2844
#4  0x0000000000565c72 in Glest::Game::Game::renderWorker (this=0x2fb54c0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:1662
#5  0x0000000000566198 in Glest::Game::Game::render (this=0x2fb54c0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:1592
#6  0x000000000063d7a6 in Glest::Game::Program::loopWorker (this=0x1bddbb0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/program.cpp:409
#7  0x0000000000634345 in Glest::Game::ExceptionHandler::handleRuntimeError (msg=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:512
#8  0x000000000061da22 in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:638
#9  <signal handler called>
#10 0x0000000000899074 in Glest::Game::World::showWorldForPlayer (this=0x2fb54f8, factionIndex=0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/world/world.cpp:1789
#11 0x00000000005d781e in Glest::Game::Renderer::getQuadCache (this=0xc80280, forceNew=false, updateOnDirtyFrame=true) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:7812
#12 0x00000000005d9001 in Glest::Game::Renderer::renderUnitsFast (this=0xc80280, renderingShadows=true, colorPickingSelection=false) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:6633
#13 0x00000000005d95d0 in Glest::Game::Renderer::renderShadowsToTexture (this=0xc80280, renderFps=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:6287
#14 0x0000000000542b96 in Glest::Game::Game::render3d (this=0x2fb54c0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:2818
#15 0x0000000000565c72 in Glest::Game::Game::renderWorker (this=0x2fb54c0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:1662
#16 0x0000000000566198 in Glest::Game::Game::render (this=0x2fb54c0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:1592
#17 0x000000000063d7a6 in Glest::Game::Program::loopWorker (this=0x1bddbb0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/program.cpp:409
#18 0x000000000062aca6 in Glest::Game::glestMain (argc=<optimized out>, argv=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:4140
#19 0x000000000062e0d6 in Glest::Game::glestMainWrapper (argc=1, argv=0x7fffb52e9a48) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:4296
#20 0x00007fdc9c32e30d in __libc_start_main (main=0x4ab0c0 <main(int, char**)>, argc=1, ubp_av=0x7fffb52e9a48, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffb52e9a38) at libc-start.c:226
#21 0x00000000004b0539 in _start ()

Please note that I manually edited an existing savegame to create this situation, replacing all occurrences of the previous techtree "megapack" by "doesntexist". Before this modification was made, this savegame loaded fine. If this is not a proper test case, please say so.

I'm not exactly sure whether or not this can be considered a bug. However, the map referred to in the error message IS available at the very location provided, so at least this error message seems wrong. And the "tech tree has not tech resources, one at least is required" message is at least hard to understand / misleading when what is happening is that you are trying to play a savegame from someone else who was using a techtree you have not available on your system. So maybe the error message could be improved, and an on-screen message could be displayed instead of the game segfaulting immediately? (I really don't know how much I'm asking here, so if this makes things complex then just keep it as is).

Entirely unrelated (I guess) is that I'm surprised about the output of >>> schoen (german for nice) in this place and I'm wondering what it means in this context.
« Last Edit: 20 July 2012, 15:33:05 by softcoder »
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 · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
fixed in svn.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Much better now, thanks. It still reports that the map file is missing, though, even though it's there:

Code: [Select]
tomreyn@atibox:~/SCM/megaglest-trunk/mk/linux$ ./dev_rungame
AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up
megaglest v3.6.1-dev
Compiled using: GNUC: 40601 [64bit] on: Apr  2 2012 21:59:34
SVN: [Rev: 3220M] - using STREFLOP [SSE] - [no-denormals]
>>> techtree [doesntexist] path not found.
[2012-04-02 22:03:27] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/world/map.cpp::load Line: 541] Error [This tech tree has no resources defined, at least one is required]
[2012-04-02 22:03:27] *ERROR* In [program.cpp::setState Line: 590]
Error [Error loading map: /home/tomreyn/.megaglest/maps/Captive 1v1.gbm
This tech tree has no resources defined, at least one is required]

tomreyn@atibox:~/SCM/megaglest-trunk/mk/linux$ ls -lah "/home/tomreyn/.megaglest/maps/Captive 1v1.gbm"
-rw-rw-r-- 1 tomreyn tomreyn 6,6K 2011-11-20 01:17 /home/tomreyn/.megaglest/maps/Captive 1v1.gbm

tomreyn@atibox:~/SCM/megaglest-trunk/mk/linux$

Is this behaviour as expected?
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 · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Yes this is expected because the map references resources that are not found in the techtree.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Thanks for explaining. I still find it difficult, from a user perspective, to read this message:
Code: [Select]
Error [Error loading map: /home/tomreyn/.megaglest/maps/Captive 1v1.gbm
This tech tree has no resources defined, at least one is required]
...and draw the conclusion that they may be (and likely are) missing a techtree.

Maybe the second sentence could say this instead?
Code: [Select]
The referenced tech tree is either missing or has no resources defined but at least one resource is required.

It might also help if the on screen message would also say which techtree is missing, or to ask the user to check the console output for more info.

Do you think some of this can be done or does it complicate things too much on the programming side?
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 · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Done, the message uses your wording and also specifies which tech tree.

 

anything