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

Unit destructor crashes the game #716

Closed
royfalk opened this issue Jul 22, 2022 · 6 comments · Fixed by #754 or #851
Closed

Unit destructor crashes the game #716

royfalk opened this issue Jul 22, 2022 · 6 comments · Fixed by #754 or #851
Assignees
Labels
Milestone

Comments

@royfalk
Copy link
Contributor

royfalk commented Jul 22, 2022

Sometimes, when a unit is destroyed, the game crashes.

Stack Trace:
#13 0x000055a645097aaa in std::vector<Mesh*, std::allocator<Mesh*> >::_M_range_check ( __n=18446744073709551615, this=0x55a653939740) at /usr/include/c++/11/bits/hashtable_policy.h:387 #14 std::vector<Mesh*, std::allocator<Mesh*> >::at (__n=18446744073709551615, this=0x55a653939740) at /usr/include/c++/11/bits/stl_vector.h:1094 #15 Mesh::~Mesh (this=0x55a65393a498, __in_chrg=<optimized out>) at /home/roy/git/vegastrike/Vega-Strike-Engine-Source/engine/src/gfx/mesh_gfx.cpp:442 #16 0x000055a645097ce2 in Mesh::~Mesh (this=0x55a6539a6c50, __in_chrg=<optimized out>) at /home/roy/git/vegastrike/Vega-Strike-Engine-Source/engine/src/gfx/mesh_gfx.cpp:461 #17 0x000055a645097d5f in Mesh::~Mesh (this=0x55a6539a6c50, __in_chrg=<optimized out>) at /home/roy/git/vegastrike/Vega-Strike-Engine-Source/engine/src/gfx/mesh_gfx.cpp:407 #18 0x000055a64544481a in Unit::~Unit (this=0x55a653938670, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/stl_vector.h:1043 #19 0x000055a645444c5f in Unit::~Unit (this=0x55a653938670, __in_chrg=<optimized out>) at /home/roy/git/vegastrike/Vega-Strike-Engine-Source/engine/src/cmd/unit_generic.cpp:326

@royfalk royfalk added the bug label Jul 22, 2022
@BenjamenMeyer BenjamenMeyer added this to the 0.9.x milestone Jul 22, 2022
@stephengtuggy
Copy link
Contributor

Yes, I'm pretty sure I've noticed this same crash. It's on my to-do list to fix. Hopefully sooner rather than later.

@stephengtuggy
Copy link
Contributor

Well, #754 had to be rolled back in its entirety. So now this crash is back. Argh.

@BenjamenMeyer
Copy link
Member

are we still seeing this? If so we probably need to fix for the 0.9.x release.

@stephengtuggy
Copy link
Contributor

are we still seeing this? If so we probably need to fix for the 0.9.x release.

Definitely needs to be fixed for 0.9.x, if it isn't already. Looks like I will be able to do some testing later today or tomorrow.

@stephengtuggy
Copy link
Contributor

So I'm definitely seeing a crash with the 0.9.x code. Pretty consistently, too. It occurs in a different part of the code -- in GFXDeleteTextures(...). So probably a different bug. But I'm pretty sure that the Textures crash was one that I fixed -- or at least tried to -- in the ill-fated PR #754 . I will see if I can fix it again (without all the other problems that #754 came with LOL).

@stephengtuggy
Copy link
Contributor

I believe this particular crash is fixed. @royfalk feel free to reopen if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment