Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when trying to start the game with Huge Random map #21

Open
tsunamistate opened this issue Sep 29, 2023 · 3 comments
Open

Crash when trying to start the game with Huge Random map #21

tsunamistate opened this issue Sep 29, 2023 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@tsunamistate
Copy link
Contributor

Environment:

  • OS: Windows 11, Ubuntu 22.04.2 via WSL
  • Compiler: MSVC 17.7.4, GCC 11.4.0 on WSL

Steps to reproduce:

  1. Start a GLSMAC game with proper path to SMAC resources
  2. In main menu, click "Start Game"
  3. Click "Make Random Map" ⇒ "Huge Planet"
  4. Choose any difficulty
  5. Click "Start with standard rules"
  6. Wait until map generation completes

Actual result:
The game crashes to desktop on both Windows and Linux.

unknown_2023.09.29-22.53.mp4

Linux release build shows the following logs:

terminate called after throwing an instance of 'std::runtime_error'
  what():  OpenGL error occured in render loop, aborting
Aborted

Debug build shows A breakpoint instruction (__debugbreak() statement or a similar call) was executed in GLSMAC.exe.
with call stack pointing to

glGenerateMipmap( GL_TEXTURE_2D );

Debug logs have the following error:

Exception thrown at 0x00007FFE91E84FFC in GLSMAC.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000069065FEC58.

Expected result:
Game successfully starts with newly generated map

Note: Game only crashes after generating "Huge Planet" map, "Large Planet" and lower don't crash

@afwbkbc
Copy link
Owner

afwbkbc commented Sep 29, 2023

Our of curiosity - which GPU was that or was it two different GPUs? In particular, how much video memory is there?

@afwbkbc afwbkbc added the bug Something isn't working label Sep 29, 2023
@afwbkbc afwbkbc self-assigned this Sep 29, 2023
@tsunamistate
Copy link
Contributor Author

tsunamistate commented Sep 30, 2023

Radeon RX 590 8Gb
Also happens on my laptop, Ryzen 5300U with 2Gb VRAM set in BIOS

@hartmark
Copy link
Contributor

I get the same behaviour on arch linux

Console log:

<Scheduler::Simple::#30> Stopping task [Task::MainMenu::#185]
<Audio::SDL2::#21> Removing sound actor Entity::Actor::Sound::(UI::SoundEffect)#253
<Graphics::OpenGL::#13> FATAL: Error loading texture
terminate called after throwing an instance of 'std::runtime_error'
  what():  Error loading texture
[1]    17416 IOT instruction (core dumped)  ./build/bin/GLSMAC --gdb --smacpath 
./build/bin/GLSMAC --gdb --smacpath   20.40s user 2.02s system 39% cpu 56.620 total

tmp.tar.gz

% lspci | grep -i vga
0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XL/XT [Radeon RX Vega 56/64] (rev c1)

Running the program with --gdb flag didn't work. Doing manual way with gdp worked and yielded the following bt:

...
<Graphics::OpenGL::#13> FATAL: Error loading texture
terminate called after throwing an instance of 'std::runtime_error'
  what():  Error loading texture

Thread 2 "GLSMAC" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff677f6c0 (LWP 18322)]
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
Downloading source file /usr/src/debug/glibc/glibc/nptl/pthread_kill.c
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                                                                                                                                                                                     
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff74ac8a3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff745c668 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff74444b8 in __GI_abort () at abort.c:79
#4  0x00007ffff769ca6f in __gnu_cxx::__verbose_terminate_handler () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#5  0x00007ffff76b011c in __cxxabiv1::__terminate (handler=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#6  0x00007ffff76b0189 in std::terminate () at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
#7  0x00007ffff76b03ed in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x55555598bf80 <typeinfo for std::runtime_error@GLIBCXX_3.4>, dest=0x7ffff76c8320 <std::runtime_error::~runtime_error()>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
#8  0x00005555556ae8f1 in graphics::opengl::OpenGL::LoadTexture (this=0x7fffffffcb30, texture=0x7fffeca04ee0) at /home/markus/code/glsmac/src/graphics/opengl/OpenGL.cpp:467
#9  0x0000555555696298 in graphics::opengl::Mesh::LoadTexture (this=0x7ffff1c5a3b0) at /home/markus/code/glsmac/src/graphics/opengl/actor/Mesh.cpp:123
#10 0x00005555556a1ab1 in graphics::opengl::Scene::Update (this=0x7ffff25f9500) at /home/markus/code/glsmac/src/graphics/opengl/Scene.cpp:139
#11 0x000055555568bb87 in graphics::opengl::routine::World::Iterate (this=0x5555559b5000) at /home/markus/code/glsmac/src/graphics/opengl/routine/World.cpp:31
#12 0x00005555556aca85 in graphics::opengl::OpenGL::Iterate (this=0x7fffffffcb30) at /home/markus/code/glsmac/src/graphics/opengl/OpenGL.cpp:207
#13 0x00005555555840a3 in base::Thread::Run (this=0x555555a43ee0) at /home/markus/code/glsmac/src/base/Thread.cpp:84
#14 0x0000555555586452 in std::__invoke_impl<void, void (base::Thread::*)(), base::Thread*> (__f=@0x5555559b4ea0: (void (base::Thread::*)(base::Thread * const)) 0x555555583d28 <base::Thread::Run()>, __t=@0x5555559b4e98: 0x555555a43ee0)
    at /usr/include/c++/13.2.1/bits/invoke.h:74
#15 0x00005555555863b1 in std::__invoke<void (base::Thread::*)(), base::Thread*> (__fn=@0x5555559b4ea0: (void (base::Thread::*)(base::Thread * const)) 0x555555583d28 <base::Thread::Run()>) at /usr/include/c++/13.2.1/bits/invoke.h:96
#16 0x0000555555586321 in std::thread::_Invoker<std::tuple<void (base::Thread::*)(), base::Thread*> >::_M_invoke<0ul, 1ul> (this=0x5555559b4e98) at /usr/include/c++/13.2.1/bits/std_thread.h:292
#17 0x00005555555862da in std::thread::_Invoker<std::tuple<void (base::Thread::*)(), base::Thread*> >::operator() (this=0x5555559b4e98) at /usr/include/c++/13.2.1/bits/std_thread.h:299
#18 0x00005555555862be in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (base::Thread::*)(), base::Thread*> > >::_M_run (this=0x5555559b4e90) at /usr/include/c++/13.2.1/bits/std_thread.h:244
#19 0x00007ffff76e1943 in std::execute_native_thread_routine (__p=0x5555559b4e90) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#20 0x00007ffff74aa9eb in start_thread (arg=<optimized out>) at pthread_create.c:444
#21 0x00007ffff752e7cc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
(gdb) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants