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
Continuing a saved GP causes “last lap” sound to be played many times throughout the race (UPDATE: Bug may be caused by something else!) #2169
Comments
I am so far unable to reproduce the bug |
I can't reproduce either. Do you see any messages on stdout.log? (perhaps we drop some sound effects command, and for whatever reason also drop the 'stop sfx'). Is it playing continuously, i.e. without pause, or does it appear to be started every X seconds again? Do you use the pause menu somehow? |
There is nothing special in The sound is not played continously, but in a “one-shot” fashion. There does not seem to be a regular interval. It seems (!) I can reliably reproduce this by doing this:
My guess is that the other karts use the “horn” as well which causes the distorted sound to be played so often. EDIT: It seems this bug has nothing to do with GPs as well. I just played a non-GP race on Northern Resort where I hammered the attack key before the start (I got a time penalty), and bingo! Again all these distorted sounds again. |
I was able to reproduce it with Northern Resort and pressing space often after the loading screen appears. After that, every following race was broken in the same way. I seemed like one sound was picked (the second time I got this it sounded like another one) and then multiplied and played in a loop (one sound per space?). Unfortunately I am not able to reproduce it again atm... |
I've created a branch fix_2169 (a bit optimistic that name ;) ), which adds some logging feature. To use it, add the command line parameter --log-sfx. Then reproduce the problem. If it happens, click to open the debug menu (artist debug mode necessary of course), and select "Dump sfx data". This will take quite some time! The compress stdout.log, and either send it to me or attach it here. |
I'm preparing builds for STK 0.9.2 and I it was the first time when this bug occured for me. You can hear it in the video: This sound seems to be played instead of engine sound. I'm affraid that it's a memory corruption somewhere. |
Ohhh... that.... I had this happen once, unfortunately I do not remember many details, as it was around the time I first started playing, here is what I do know:
|
IT IS HAPPENING AGAIN, on a different computer, one I am fixing for a friend. STK 0.9.2, Sound: Last lap, Triggers: Basketball, Plunger, and Cupcake, Computer: Mac Mini, OS: Ubuntu 16.04.1 64-bit, fresh install yesterday. The game is still running, so I can help with the debugging. CC: @auriamg @Benau @hiker @deveee |
@qwertychouskie If you are able to reproduce it, try to run it under valgrind. Just run something like
If we are lucky, it will report what's wrong. Note that it may run very slow and STK must be compiled in debug mode. I'm removing can_not_reporoduce, because the problem certainly exists. |
The issue is, I don't know if I can reproduce it or not, and I don't want to relaunch STK just to find that it can't be reproduced. |
I took the risk and relaunched STK under valgrind, and now it won't do it. :( |
This is why this bug is that hard to catch. Some things must be prepared before STK starts, and then you must have the hopes that the problem will occur. You can also use hiker's branch to get more verbose log. If you have some suspections which part of memory is accidentally modified, you can also add a watchpoint under debugger to see which function actually modifies it (but this is not trivial). Actually it is possible to connect gdb debugger to already running process, which might be sometimes helpful (for example when application stays in infinite loop and we want to see where it is). But it wasn't really helpful for this particular issue, because something wrong already happened earlier. |
This is very likely a problem with STK using too many openal sources, which was reported in #2921 and is fixed now. So I am closing this ticket now. |
Tbh I don't think, because I always play with very little karts, no Grand Prix etc. and I never received any openal errors in console. But I can't reproduce it on demand, so I can't say that it's not fixed :p |
My reasoning was that the leak in (iirc) the gum SFX could have triggered the problem (too many sources), considering that you played a GP that could have accumulated. Anyway, if you should observe it again, please reopen. |
And btw. it was happening for me on the first race (just open STK and run a race) so no accumulation, and also in STK 0.9.2 there was only one crash sound, so less sounds sources. Maybe there is something wrong with threads, no idea... Because I sometimes see other strange errors on startup, for example a crash with "pure virtual method called" or runtime exceptions (cannot write addons.xml or something like this). They are not reproducible, but happened 5-6 times for me. |
I just noticed that all these reports are related to release builds that use old openal version. Our package has openal 1.14. Linux mint was based on ubuntu 14.04, so it's openal 1.14 too. Wuzzy reported it for STK 0.9, so probably old openal too. I'm not sure what about Qwerty's report, but ubuntu 16.04 has STK 0.9.1, so he was probably using our 0.9.2 package. So I will upgrade openal in our linux package, maybe this is the reason. And btw #2153 seems to be the same bug. |
Good catch that.
I've opened a new ticket #2926 to add this kind of information to our
stack trace reports.
Cheers,
Joerg
|
It also seems like it may be related to first runs. Both times I had the issue, it was just installed from the PPA. |
I found one thing that may be related. In MusicInformation::startMusic() it's possible that i.e. fast music is deleted and is not null. I saw some crashes in isPlaying(), so I will prepare a patch anyway. |
I did some tests with sounds/music in current git STK and after few races once I received:
when fast music should start playing (for last lap). And also once fast music wasn't playing at all, and in last lap there were only sounds without music. So there is definitely something wrong somewhere... It was in cornfield crossing without AI karts. |
Try |
One more behavior that happened on Android: I was looking at the logs from |
Appears to be rare, so postponing. |
Now we don't change current working directory to get files list and also Benau fixed all known issues with thread safety in audio and file manager. So that it's quite possible that the bug is already fixed. Please reopen if it still happens. |
When I continue a saved GP, I will hear the “last lap” sound (or something similar, I am not sure) a lot of time again and again throughout the race.
This bug happens if you continue a saved grand prix. It seems only to happen after you have done so, I have never experienced the bug in other situations.
Also, this bug seems to continue for all future GP races (even non-GP) in the same STK session as well. If you restart STK, the sound weirdness is gone, until you continue a GP again.
Sometimes the sound in question is strangely distorted.
STK version: 0.9
The text was updated successfully, but these errors were encountered: