Author Topic: [fixed] Crash as game is won  (Read 3284 times)

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
[fixed] Crash as game is won
« on: 4 January 2016, 02:58:40 »
Quote
megaglest v3.12-dev
Compiled using: GNUC: 40902 platform: Linux endianness: little
GIT: [Rev: 5356.f3e96a6] - using STREFLOP [SSE] - [no-denormals]

I was playing scenario Beginner 1. I believe I was about to get the message that I won, but instead, the game crashed. I think I had destroyed the entire enemy base, but not positive. This is the error log:
Quote
[2016-01-03 20:44:56] Runtime Error information:
======================================================
In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5763] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0xb6e48caa] line: 0
./megaglest:()address [0xb6e48fb1] line: 0
linux-gate.so.1:__kernel_sigreturn()address [0xb6982d1c] line: 0
/lib/i386-linux-gnu/i686/cmov/libc.so.6:()address [0xb5eb2c80] line: 0
./megaglest:Shared::Graphics::PixelBufferWrapper::getPixelBufferFor(int, int, int, int, int)address [0xb725a4e1] line: 0
./megaglest:Shared::Graphics::BaseColorPickEntity::getPickedList(int, int, int, int, std::vector<Shared::Graphics::BaseColorPickEntity*, std::allocator<Shared::Graphics::BaseColorPickEntity*> > const&)address [0xb7266542] line: 0
./megaglest:Glest::Game::Renderer::selectUsingColorPicking(std::vector<Glest::Game::Unit*, std::allocator<Glest::Game::Unit*> >&, Glest::Game::Object const*&, bool, Shared::Graphics::Vec2<int> const&, Shared::Graphics::Vec2<int> const&)address [0xb6de08b4] line: 0
./megaglest:Glest::Game::Renderer::computeSelected(std::vector<Glest::Game::Unit*, std::allocator<Glest::Game::Unit*> >&, Glest::Game::Object const*&, bool, Shared::Graphics::Vec2<int> const&, Shared::Graphics::Vec2<int> const&)address [0xb6de0d91] line: 0
./megaglest:Glest::Game::Gui::computeSelected(bool, bool)address [0xb6e080d5] line: 0
./megaglest:Glest::Game::Gui::update()address [0xb6e08627] line: 0
./megaglest:Glest::Game::Game::update()address [0xb6d4bdbf] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0xb6e6d2c7] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0xb6e56072] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0xb6e5e1a8] line: 0
./megaglest:main()address [0xb6c3fc7f] line: 0
/lib/i386-linux-gnu/i686/cmov/libc.so.6:__libc_start_main()address [0xb5d9ba63] line: 0
./megaglest:()address [0xb6c46957] line: 0

This was the terminal output:
Quote
./megaglest
megaglest v3.12-dev
Compiled using: GNUC: 40902 platform: Linux endianness: little
GIT: [Rev: 5356.f3e96a6] - using STREFLOP [SSE] - [no-denormals]
mgtest@asus:~/megaglest-git/megaglest-source/mk/linux$ ./megaglest
megaglest v3.12-dev
Compiled using: GNUC: 40902 platform: Linux endianness: little
GIT: [Rev: 5356.f3e96a6] - using STREFLOP [SSE] - [no-denormals]
Game unique identifier is: a8cab710-b28a-11e5-a913-67f19378f672
Auto Change resolution to (1280 x 768) from (800 x 600)
Auto Change resolution to (1280 x 768) from (800 x 600)
Auto Change resolution to (1280 x 768) from (800 x 600)
In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5763] Error detected: signal 11:
Error saved to logfile [/home/mgtest/.megaglest/error.log]
*ERROR* [2016-01-03 20:44:55] In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleRuntimeError Line: 641] [In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5763] Error detected: signal 11:
] gameInitialized = 1, program = 0xb8a08818
*ERROR* [2016-01-03 20:44:56] In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleRuntimeError Line: 660] [In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5763] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0xb6e48caa] line: 0
./megaglest:()address [0xb6e48fb1] line: 0
linux-gate.so.1:__kernel_sigreturn()address [0xb6982d1c] line: 0
/lib/i386-linux-gnu/i686/cmov/libc.so.6:()address [0xb5eb2c80] line: 0
./megaglest:Shared::Graphics::PixelBufferWrapper::getPixelBufferFor(int, int, int, int, int)address [0xb725a4e1] line: 0
./megaglest:Shared::Graphics::BaseColorPickEntity::getPickedList(int, int, int, int, std::vector<Shared::Graphics::BaseColorPickEntity*, std::allocator<Shared::Graphics::BaseColorPickEntity*> > const&)address [0xb7266542] line: 0
./megaglest:Glest::Game::Renderer::selectUsingColorPicking(std::vector<Glest::Game::Unit*, std::allocator<Glest::Game::Unit*> >&, Glest::Game::Object const*&, bool, Shared::Graphics::Vec2<int> const&, Shared::Graphics::Vec2<int> const&)address [0xb6de08b4] line: 0
./megaglest:Glest::Game::Renderer::computeSelected(std::vector<Glest::Game::Unit*, std::allocator<Glest::Game::Unit*> >&, Glest::Game::Object const*&, bool, Shared::Graphics::Vec2<int> const&, Shared::Graphics::Vec2<int> const&)address [0xb6de0d91] line: 0
./megaglest:Glest::Game::Gui::computeSelected(bool, bool)address [0xb6e080d5] line: 0
./megaglest:Glest::Game::Gui::update()address [0xb6e08627] line: 0
./megaglest:Glest::Game::Game::update()address [0xb6d4bdbf] line: 0
./megaglest:Glest::Game::Program::loopWorker()address [0xb6e6d2c7] line: 0
./megaglest:Glest::Game::glestMain(int, char**)address [0xb6e56072] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0xb6e5e1a8] line: 0
./megaglest:main()address [0xb6c3fc7f] line: 0
/lib/i386-linux-gnu/i686/cmov/libc.so.6:__libc_start_main()address [0xb5d9ba63] line: 0
./megaglest:()address [0xb6c46957] line: 0
]
Segmentation fault

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: Crash as game is won
« Reply #1 on: 15 January 2016, 21:54:52 »
Quote from: filux
Probably you should add this with some description to https://forum.megaglest.org/index.php?topic=9763.msg92197#msg92197
because it looks similar for first look.

Filux, Jammy, and myself were playing Long Way Ahead V1.2 and after about 30 minutes of battle, there was a crash.
Code: [Select]
$ megaglest
megaglest v3.12-dev
Compiled using: GNUC: 40902 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5387.e7a9c01] - using STREFLOP [SSE] - [no-denormals]
*ERROR* [2016-01-15 14:17:17] In [menu_state_custom_game.cpp::simpleTaskForMasterServer Line 3295] error checking response from masterserver elapsed seconds = 0.00 / 15
Response:
Trying to connect to '24.179.142.105' using port '61357'...
socket_connect() failed.
 Reason: (111) Connection refused
wrong router setup
** #2 Socket peek error for sock = -1 err = -1 lastSocketError = 104 mustGetData = 0
** #2 Socket peek error for sock = 19 err = 0 lastSocketError = 0 mustGetData = 0
IsConnected socket has disconnected sock = -1 err = 0 lastSocketError = 0
Game unique identifier is: f39acbf2-bbc4-11e5-b1b4-c58017f9f7d0
Auto Change resolution to (1360 x 768) from (800 x 600)
In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5861] Error detected: signal 11:
Error saved to logfile [/home/andy/.megaglest/error.log]
*ERROR* [2016-01-15 15:28:02] In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleRuntimeError Line: 642] [In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5861] Error detected: signal 11:
] gameInitialized = 1, program = 0x7f940464d310
*ERROR* [2016-01-15 15:28:03] In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleRuntimeError Line: 661] [In [/home/andy/megaglest-git/megaglest-source/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5861] Error detected: signal 11:

Stack Trace:
megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x7f940258a052] line: 0
megaglest:Glest::Game::handleSIGSEGV(int)address [0x7f940258a3c3] line: 0
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f93fda9e180] line: 0
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f93fdaf972e] line: 0
megaglest:Shared::Graphics::PixelBufferWrapper::getPixelBufferFor(int, int, int, int, int)address [0x7f94029c7260] line: 0
megaglest:Shared::Graphics::BaseColorPickEntity::getPickedList(int, int, int, int, std::vector<Shared::Graphics::BaseColorPickEntity*, std::allocator<Shared::Graphics::BaseColorPickEntity*> > const&)address [0x7f94029d38b3] line: 0
megaglest:Glest::Game::Renderer::selectUsingColorPicking(std::vector<Glest::Game::Unit*, std::allocator<Glest::Game::Unit*> >&, Glest::Game::Object const*&, bool, Shared::Graphics::Vec2<int> const&, Shared::Graphics::Vec2<int> const&)address [0x7f940251e10c] line: 0
megaglest:Glest::Game::Renderer::computeSelected(std::vector<Glest::Game::Unit*, std::allocator<Glest::Game::Unit*> >&, Glest::Game::Object const*&, bool, Shared::Graphics::Vec2<int> const&, Shared::Graphics::Vec2<int> const&)address [0x7f940251e7d6] line: 0
megaglest:Glest::Game::Gui::computeSelected(bool, bool)address [0x7f94025472a0] line: 0
megaglest:Glest::Game::Gui::update()address [0x7f94025476f4] line: 0
megaglest:Glest::Game::Game::update()address [0x7f94024806b5] line: 0
megaglest:Glest::Game::Program::loopWorker()address [0x7f94025b20f4] line: 0
megaglest:Glest::Game::glestMain(int, char**)address [0x7f940259dcbf] line: 0
megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x7f94025a2292] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f93fda8ab45] line: 0
megaglest:()address [0x7f940236c95a] line: 0
]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x7f94066cde30] isBaseThread: 1, Name: [SimpleTaskThread]
Aborted

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Crash as game is won
« Reply #2 on: 17 January 2016, 05:51:15 »
Ok made an attempt to fix this, pushed a fix in git

Thanks

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: Crash as game is won
« Reply #3 on: 17 January 2016, 21:21:41 »
You're welcome.

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: Crash as game is won
« Reply #4 on: 18 January 2016, 20:50:47 »
Crash today at ~08:45PM UTC. titi suggested I post here.

Rev: 5394.c6c9eb1

http://pastebin.com/TFDSz7YY

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Crash as game is won
« Reply #5 on: 18 January 2016, 20:58:25 »
Custom_94 was connected as client in this moment and got this output on console: http://pastebin.com/1aPWqc1u . Sadly it looks a bit like he made his binary a bit "strange" so the output is not too helpful.
Does this say something to you softcoder ? This is not directly related to the main topic here , if it helps in any way I make a new bug report from this .
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: my system_report.log
« Reply #6 on: 18 January 2016, 21:27:39 »
My system_report.log

Cpu freq is inaccurate because of ondemand governor. It's max is 3.2 Ghz
« Last Edit: 19 January 2016, 04:55:26 by andy_5995 »

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: Crash as game is won
« Reply #7 on: 19 January 2016, 04:42:24 »
I hope this is good news.

I reproduced the error first try. I allowed myself to die early in the game.

And I have the video to prove it:

Download testing.avi

The crash is at the very end (3m:01s). You can see I was making selection squares with my mouse pointer just as my base is being destroyed.

The error messages stayed on the screen until I hit the enter key.

I'm sorry, but I don't want to spend time editing the video, but it's only 5 megs and 3m long. I only recorded at 4fps

I played on Rev: 5402.9cd3d6e
« Last Edit: 19 January 2016, 05:08:33 by andy_5995 »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Crash as game is won
« Reply #8 on: 19 January 2016, 05:12:05 »
I just pushed some more debug code, please snag a build with rev: https://github.com/MegaGlest/megaglest-source/commit/a0337c80e1c4d1727b3fc983e9840a8bb2804d3f

Thanks

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: Crash as game is won
« Reply #9 on: 19 January 2016, 05:31:20 »
I just pushed some more debug code, please snag a build...

Rev: 5404.a0337c8

No sorry, same thing. The next two tries, I reproduced it twice.

Then I went to windowed mode, and couldn't reproduce it after two tries.

I noticed that the crash isn't happening as the game is won or lost. When I played in windowed mode, instead of when it usually crashed, the enemy kept going after my cows, and workers, before the window finally came up "You lose!"

Therefore my inexperienced guess would have to be it has something to do with the destruction of the last structure.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Crash as game is won
« Reply #10 on: 19 January 2016, 05:43:49 »
Please share what you get in the console and error.log as i added more info to show the location of the error

andy_5995

  • Moderator
  • Ornithopter
  • ********
  • Posts: 474
  • Debian Linux user
    • View Profile
    • Andy Alt's home page
Re: Crash as game is won
« Reply #11 on: 19 January 2016, 05:52:21 »
Please share what you get in the console and error.log as i added more info to show the location of the error

Pastebin Console output and error log

This new video may prove to be more enlightening. I intentionally reproduced the error at the beginning of the game.

You'll see near the end of the video, I made many selection areas with no crash.

But when the icons on right were in the selection area, CRASH

testing3_5404.a0337c8.avi (8 fps)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Crash as game is won
« Reply #12 on: 19 January 2016, 06:02:02 »
ok try git head again, this tiem run with this commandline option:

megaglest --verbose

And paste the console output as soon as you get the first error.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Crash as game is won
« Reply #13 on: 19 January 2016, 07:27:44 »
Ok I found the issue and the fix is pushed on git head.

It relates to SDL2 (but was a generic bug) that was triggered when a resolution change occurs. In SDL2 when you go full-screen it uses the desktop resolution, and a graphics buffer fro color picking was not getting resized.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: [fixed] Crash as game is won
« Reply #14 on: 27 January 2016, 08:34:47 »
Quoting Andy (from a personal message):
This bug can be moved to 'closed'.
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 · · ·

 

anything