Author Topic: [fixed] r3364: OpenGL error #1281, invalid value at renderer.cpp, line 7311  (Read 1810 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
I ran into this yesterday with r3364 (unfortunately I forgot how, and I do not have a core file):
Code: [Select]
tomreyn@atibox:~/SCM/megaglest-trunk$ mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/
megaglest v3.6.1-dev
Compiled using: GNUC: 40603 [64bit] on: May 26 2012 02:42:44
SVN: [Rev: 3364M] - using STREFLOP [SSE] - [no-denormals]
AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up
Error saved to logfile [/home/tomreyn/.megaglest/error.log]
[2012-05-26 03:45:35] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 369] [OpenGL error #1281 [0x501] : [invalid value] at file: [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp], line: 7311
Stack Trace:
mk/linux/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&) address [0x9b9316] line: 246
mk/linux/megaglest() [0x5deb59] address [0x5deb59]
mk/linux/megaglest:Glest::Game::Renderer::reset3dMenu() address [0x5e8f43] line: 567
mk/linux/megaglest:Glest::Game::BattleEnd::render() address [0x6597a0] line: 163
mk/linux/megaglest:Glest::Game::Program::loopWorker() address [0x668ef4] line: 411
mk/linux/megaglest:Glest::Game::glestMain(int, char**) address [0x650144] line: 4571
mk/linux/megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x653656] line: 4751
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7fd74ff1f76d] line: 0
mk/linux/megaglest() [0x4b5769] address [0x4b5769]
] gameInitialized = 1, program = 0x1755330
terminate called after throwing an instance of 'Shared::Platform::megaglest_runtime_error'
  what():  OpenGL error #1281 [0x501] : [invalid value] at file: [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp], line: 7311
Stack Trace:
mk/linux/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&) address [0x9b9316] line: 246
mk/linux/megaglest() [0x5deb59] address [0x5deb59]
mk/linux/megaglest:Glest::Game::Renderer::reset3dMenu() address [0x5e8f43] line: 567
mk/linux/megaglest:Glest::Game::BattleEnd::render() address [0x6596b2] line: 129
mk/linux/megaglest:Glest::Game::Program::loopWorker() address [0x668ef4] line: 411
mk/linux/megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool) address [0x6577c5] line: 407
mk/linux/megaglest:Glest::Game::glestMain(int, char**) address [0x64924f] line: 4620
mk/linux/megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x653656] line: 4751
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7fd74ff1f76d] line: 0
mk/linux/megaglest() [0x4b5769] address [0x4b5769]

error.log contains the same stacktrace as provided above.
« Last Edit: 28 May 2012, 17:27:15 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 · · ·

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
I found a way to reproduce this after a full rebuild (rm -rf build/) on r3366:

Code: [Select]
ulimit -c unlimited; mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/ --auto-test=1,, --verbose 2>&1 | tee ~/.megaglest/stdouterr.log
What matters here is the --auto-test=1,, option which makes the game cycle through scenarios, switching to the next scenario after just one second. Here, when the game switches after the second or third scenario, it will crash with:

Code: [Select]
Game ending with stats:
-----------------------
Description: Tough Duel
Faction count: 2
Game duration (mins): 0
Max Concurrent Units: 18
Total EndGame Concurrent Unit Count: 18
player #0 tomreyn (Human) faction: Magic Team: 0 victory: 0 # kills: 0 # enemy kills: 0 # deaths: 0
# units produced: 0 # resources harvested: 0
player #1 CPU (Ultra) (CPU (Ultra) x 1.5) faction: Tech Team: 1 victory: 0 # kills: 0 # enemy kills: 0 # deaths: 0
# units produced: 0 # resources harvested: 0
-----------------------
In [/home/tomreyn/SCM/megaglest-trunk/source/shared_lib/sources/platform/sdl/platform_util.cpp::getStackTrace Line: 180]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 355]
Error saved to logfile [/home/tomreyn/.megaglest/error.log]
terminate called after throwing an instance of 'Shared::Platform::megaglest_runtime_error'
  what():  OpenGL error #1281 [0x501] : [invalid value] at file: [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp], line: 7316
Stack Trace:
mk/linux/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&) address [0x9b9d56] line: 246
mk/linux/megaglest() [0x5deae9] address [0x5deae9]
mk/linux/megaglest:Glest::Game::Renderer::reset3dMenu() address [0x5e8ed3] line: 570
mk/linux/megaglest:Glest::Game::BattleEnd::render() address [0x659642] line: 130
mk/linux/megaglest:Glest::Game::Program::loopWorker() address [0x668e84] line: 411
mk/linux/megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool) address [0x657755] line: 407
mk/linux/megaglest:Glest::Game::glestMain(int, char**) address [0x6491df] line: 4620
mk/linux/megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x6535e6] line: 4751
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7fd24c70a76d] line: 0
mk/linux/megaglest() [0x4b56f9] address [0x4b56f9]

In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 368] program = 0xe2a450 gameInitialized = 1 msg [OpenGL error #1281 [0x501] : [invalid value] at file: [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp], line: 7316
Stack Trace:
mk/linux/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&) address [0x9b9d56] line: 246
mk/linux/megaglest() [0x5deae9] address [0x5deae9]
mk/linux/megaglest:Glest::Game::Renderer::reset3dMenu() address [0x5e8ed3] line: 570
mk/linux/megaglest:Glest::Game::BattleEnd::render() address [0x659730] line: 165
mk/linux/megaglest:Glest::Game::Program::loopWorker() address [0x668e84] line: 411
mk/linux/megaglest:Glest::Game::glestMain(int, char**) address [0x6500d4] line: 4571
mk/linux/megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x6535e6] line: 4751
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7fd24c70a76d] line: 0
mk/linux/megaglest() [0x4b56f9] address [0x4b56f9]
]
[2012-05-28 14:01:13] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 369] [OpenGL error #1281 [0x501] : [invalid value] at file: [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp], line: 7316
Stack Trace:
mk/linux/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&) address [0x9b9d56] line: 246
mk/linux/megaglest() [0x5deae9] address [0x5deae9]
mk/linux/megaglest:Glest::Game::Renderer::reset3dMenu() address [0x5e8ed3] line: 570
mk/linux/megaglest:Glest::Game::BattleEnd::render() address [0x659730] line: 165
mk/linux/megaglest:Glest::Game::Program::loopWorker() address [0x668e84] line: 411
mk/linux/megaglest:Glest::Game::glestMain(int, char**) address [0x6500d4] line: 4571
mk/linux/megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x6535e6] line: 4751
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7fd24c70a76d] line: 0
mk/linux/megaglest() [0x4b56f9] address [0x4b56f9]
] gameInitialized = 1, program = 0xe2a450
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 374]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 383]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 392]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 398]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 401]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 403]
In [/home/tomreyn/SCM/megaglest-trunk/source/shared_lib/sources/platform/sdl/platform_util.cpp::getStackTrace Line: 180]

Note that this is --verbose output already. Would a debug log be good to have?
Is anyone else able to reproduce 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 · · ·

carolinus

  • Daemon
  • Posts: 8
    • View Profile
the error is repeatable

my machine: Intel(R) Pentium(R) CPU B940 @ 2.00GHz;
gfx: intel hd300 and  NVIDIA Corporation GF119 [GeForce GT 520MX] (rev ff)

3.2.0-24-generic-pae #38-Ubuntu SMP Tue May 1 16:40:26 UTC 2012 i686 i686 i386 GNU/Linux
ram:
Code: [Select]
free:
             total       used       free     shared    buffers     cached
Mem:       2993960    1853400    1140560          0     166500    1394576
-/+ buffers/cache:     292324    2701636
Swap:      1184764          0    1184764

here is fragment of stdouterr.log
http://megaglest.pzt.me/6j91
--
#191319 win7 home 64/ lubuntu 12.04 i686 Pentium b940 /graph: hd3000

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Try svn rev 3368 and let me know if this is still reproducible.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
This is now fixed for me, thanks! On a side note, even after cycling through 30 games this way, reserved memory does not reach 500 MB (it constantly remains below). :)
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 · · ·