-
Notifications
You must be signed in to change notification settings - Fork 16
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
Game crashes on playing dynamic songs with only one section [linux, macos] #161
Comments
Fixed in #162 ? |
Still having issues with game crashing when a brain is destroyed, with or without I am on Arch linux with AMD CPU and GPU. |
Confirmed, game reliably crashes on loss or win, or if theres otherwise only a single song to select from. |
yep, as said in discord i can't tell why this would happen. on Windows it appears to work fine. if we can't figure this out before release a dirty fix might be to insert a silent SoundContainer into single-container DynamicSongs so as to make them not single-container, which appears to be the problem if regular the battle music DynamicSong works fine. something to test for mac/linux users: does the single-container ambient music (appropriate activities call this when in initial edit mode i believe) also crash? does the first/some random SoundContainer from the battle music get eaten by any chance? |
Edit 1 actually I was wrong, got it to not crash modifing Music.ini |
OK so
I think I have cracked it, having more than one dynamic song causes the game to crash. |
So my suspicion, given that it works on Windows but not Linux, is that we likely have undefined behaviour somewhere. I recall some iterations of the code around the dynamic music looks a bit wonky, I guess I'll need to look again. Of particular note GCC has some interesting (stupid) ideas about certain cases of undefined behaviour, for example in functions without a base-case return it can literally just decide to literally omit the RET instruction. |
It's not undefined behaviour. It's literally just that libstdc++ is bounds-checking the vector whereas MSVC's std is not. |
So if I understand, it plays the DynamicSong (Battle Music for example) and upon calling a new Dynamic Song is removing (clearing) sound containers from the DynamicSong and then erroring out that the DynamicSong is empty? |
I will just say, I am a simple human and I may not know much about this error or programming but what I do know is no music = no crashes 👍 |
Fixed in #172 |
Describe the bug
Whenever the enemy brain is killed, the game will freeze for a few seconds and then crash.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Win screen
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
here's the last error before crashing
/usr/include/c++/14/bits/stl_vector.h:1130: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator [with _Tp = unsigned int; _Alloc = std::allocator; reference = unsigned int&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)
I'm also running Nobara (Fedora based), compiled from latest develop branch (commit 34552e8)
github won't let me upload the coredump, so use this link: https://bin.dembased.xyz/corecortexcommand1000fa2728a4cbdc4f29bc28bd84d753688611174791732255150000000.zst
Ask me for it again if the link expires, or tell me how to upload it :)
Thanks!
The text was updated successfully, but these errors were encountered: