ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.56k stars 552 forks source link

[BUG] Lately loading some wads crashes gzdoom with stl_vector.h "Assertion '__n < this->size()' failed" - Sometimes this may only happen after starting the game on a custom level. #2812

Open ipaqmaster opened 2 weeks ago

ipaqmaster commented 2 weeks ago

GZDoom version

g4.14pre-66-g1e4f176395-m

Which game are you running with GZDoom?

Doom 2

What Operating System are you using?

Linux x86_64

Please describe your specific OS version

Archlinux, Kernel 6.6.58-1-lts

Relevant hardware info

GPU: NVIDIA 2080Ti. CPU: AMD 3900x (12c, 24t)

Have you checked that no other similar issue already exists?

A clear and concise description of what the bug is.

Upon loading some wads (not all) or entering the first map of some wads (not all) gzdoom may coredump with this:

/usr/include/c++/14.2.1/bits/stl_vector.h:1130: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = short int; _Alloc = std::allocator<short int>; reference = short int&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)

Steps to reproduce the behaviour.

Explain how to reproduce

  1. For example, run gzdoom Tartaru5.wad (Wad hash: 0bca31e98798627152bf6aed94b76ee31f4c048c)
  2. Start a new game on map TAT01 by selecting the wad's map campaign.
  3. The game crashes with:
/usr/include/c++/14.2.1/bits/stl_vector.h:1130: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = short int; _Alloc = std::allocator<short int>; reference = short int&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)

Your configuration

This can be reproduced after deleting gzdoom.ini

Provide a Log

/usr/include/c++/14.2.1/bits/stl_vector.h:1130: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = short int; _Alloc = std::allocator<short int>; reference = short int&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)
ipaqmaster commented 2 weeks ago

/usr/include/c++/14.2.1/bits/stl_vector.h belongs to the core/gcc package of Archlinux in the distribution's Core repository.

RicardoLuis0 commented 2 weeks ago

do you have a link for the wad? searching "Tartaru5" finds nothing on the idgames archive

ipaqmaster commented 1 week ago

This seems to be the one https://forum.zdoom.org/viewtopic.php?t=48472

ipaqmaster commented 1 week ago

I can load this wad just fine using an ubuntu:latest docker container with the current latest gzdoom deb file installed. This is likely a problem specific to a more recent change in Archlinux.