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

Single player crashes with assertion error at handle_pool_vs.h:151 #1121

Open
etasnadi opened this issue Jul 19, 2022 · 4 comments
Open

Single player crashes with assertion error at handle_pool_vs.h:151 #1121

etasnadi opened this issue Jul 19, 2022 · 4 comments

Comments

@etasnadi
Copy link

etasnadi commented Jul 19, 2022

Reporting a bug? Please make sure you've given the following information - thanks!

Operating system and version:
Ubuntu 20.04.4 LTS

Is this for single player or multiplayer?
Single player

Description of the bug (and if possible, steps to reproduce the bug):

openjk_sp.x86_64: openjk/code/game/../Ratl/handle_pool_vs.h:151: ratl::handle_pool_base<T>::TTValue& ratl::handle_pool_base<T>::operator[](int) [with T = ratl::storage::value_semantics<CTroop, 100>; ratl::handle_pool_base<T>::TTValue = CTroop]: Assertion `is_used(i)' failed. 

Can happen anytime but it appears on level t3_byss crashes often during playing.

Stack trace (when playing on t3_byss):

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff790f859 in __GI_abort () at abort.c:79
#2  0x00007ffff790f729 in __assert_fail_base (fmt=0x7ffff7aa5588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7fffcac5c6dc "is_used(i)", 
    file=0x7fffcac5c6a0 "openjk/code/game/../Ratl/handle_pool_vs.h", line=151, function=<optimized out>) at assert.c:92
#3  0x00007ffff7920fd6 in __GI___assert_fail (assertion=0x7fffcac5c6dc "is_used(i)", file=0x7fffcac5c6a0 "openjk/code/game/../Ratl/handle_pool_vs.h", line=151, 
    function=0x7fffcac5c5e8 "ratl::handle_pool_base<T>::TTValue& ratl::handle_pool_base<T>::operator[](int) [with T = ratl::storage::value_semantics<CTroop, 100>; ratl::handle_pool_base<T>::TTValue = CTroop]") at assert.c:101
#4  0x00007fffca9a4e8d in ratl::handle_pool_base<ratl::storage::value_semantics<CTroop, 100> >::operator[](int) () from openjk/build/jagamex86_64.so
#5  0x00007fffca9a190b in Trooper_Think(gentity_s*) () from openjk/build/jagamex86_64.so
#6  0x00007fffca9a1f63 in NPC_BehaviorSet_Trooper(int) () from openjk/build/jagamex86_64.so
#7  0x00007fffcaac18bc in NPC_RunBehavior(int, int) () from openjk/build/jagamex86_64.so
#8  0x00007fffcaac1c7f in NPC_ExecuteBState(gentity_s*) () from openjk/build/jagamex86_64.so
#9  0x00007fffcaac2872 in NPC_Think(gentity_s*) () from openjk/build/jagamex86_64.so
#10 0x00007fffcaa228ef in GEntity_ThinkFunc(gentity_s*) () from openjk/build/jagamex86_64.so
#11 0x00007fffcaa2f9f0 in G_RunThink(gentity_s*) () from openjk/build/jagamex86_64.so
#12 0x00007fffcaa3233c in G_RunFrame(int) () from openjk/build/jagamex86_64.so
#13 0x00005555555db2a4 in SV_Frame(int, float) ()
#14 0x00005555555b15ad in Com_Frame() ()
#15 0x000055555562b1d6 in main ()

The game crashes during playing.

The same error always happens if I save the game on vjun1 in the acid rain (it is important) and then I try to load the game. The program crashes before the progress bar appears during loading. The stack trace for the assertion error:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff790f859 in __GI_abort () at abort.c:79
#2  0x00007ffff790f729 in __assert_fail_base (fmt=0x7ffff7aa5588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7fffca8ee6dc "is_used(i)", 
    file=0x7fffca8ee6a0 "openjk/code/game/../Ratl/handle_pool_vs.h", line=151, function=<optimized out>) at assert.c:92
#3  0x00007ffff7920fd6 in __GI___assert_fail (assertion=0x7fffca8ee6dc "is_used(i)", file=0x7fffca8ee6a0 "openjk/code/game/../Ratl/handle_pool_vs.h", line=151, 
    function=0x7fffca8ee5e8 "ratl::handle_pool_base<T>::TTValue& ratl::handle_pool_base<T>::operator[](int) [with T = ratl::storage::value_semantics<CTroop, 100>; ratl::handle_pool_base<T>::TTValue = CTroop]") at assert.c:101
#4  0x00007fffca636e8d in ratl::handle_pool_base<ratl::storage::value_semantics<CTroop, 100> >::operator[](int) () from openjk/build/jagamex86_64.so
#5  0x00007fffca63390b in Trooper_Think(gentity_s*) () from openjk/build/jagamex86_64.so
#6  0x00007fffca633f63 in NPC_BehaviorSet_Trooper(int) () from openjk/build/jagamex86_64.so
#7  0x00007fffca7538bc in NPC_RunBehavior(int, int) () from openjk/build/jagamex86_64.so
#8  0x00007fffca753c7f in NPC_ExecuteBState(gentity_s*) () from openjk/build/jagamex86_64.so
#9  0x00007fffca754872 in NPC_Think(gentity_s*) () from openjk/build/jagamex86_64.so
#10 0x00007fffca6b48ef in GEntity_ThinkFunc(gentity_s*) () from openjk/build/jagamex86_64.so
#11 0x00007fffca6c19f0 in G_RunThink(gentity_s*) () from openjk/build/jagamex86_64.so
#12 0x00007fffca6c433c in G_RunFrame(int) () from openjk/build/jagamex86_64.so
#13 0x00005555555db2a4 in SV_Frame(int, float) ()
#14 0x00005555555b15ad in Com_Frame() ()
#15 0x000055555562b1d6 in main ()

What did you expect to happen instead?
The game should not crash.

@ensiform
Copy link
Member

It's an assert that may or may not still need to be there. If you use the release build as opposed to debug compilation it won't "crash"

@etasnadi
Copy link
Author

Thanks, then I will remove the assert if you think it is not needed anymore. I thouht that the code is not functioning properly on my system as there is a good reason for that assert to be there.

@ensiform
Copy link
Member

I didn't say it was for sure not needed. But you shouldn't be playing with debug on a normal play. If it crashes without the assert or release compile then it is definitely needed

@etasnadi
Copy link
Author

I rebuilt in Release and it does not crash anymore (not in the cases mentioned at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants