Project

General

Profile

Bug #530

Framedropping with sound crackling

Added by arsenic87 about 11 years ago. Updated almost 7 years ago.

Status:
Duplicate
Severity:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04/09/2013
% Done:

100%

Version:
Platform:
Any
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

A little hard to describe excactly how the bug shows itself, but it has been discussed in great detail in this thread:
http://forum.kerbalspaceprogram.com/showthread.php/31925-Sound-skipping?p=576390&viewfull=1#post576390

To sum it up:
When you have been ingame a while, the game starts to halt on a regular interval of 1-3 seconds. It halts for about 30-40ms, and then continues. This is noticeable by everything in the game freezing (By holding a key rotating around a ship, it is most prominent) Many users experience sound distortion (crackling and popping) at theese freezing intervals. The sound issue is due to the soundcard sample buffer getting emptied, and thereby causing a pop or crackle on some systems.

The root cause isn't a sound issue, but some update issue. With the small plugin I made, you clearly see the game halting on a very regular intervall without doing anything at all. The intervall changes when you do something.

This bug makes playing the ingame music untolerable since it crackles and skips every 2-3 seconds. (Which is really to bad, since the soundtrack is really nice)
We have perhaps narrowed it down to being caused by unitys OnGUI (GC.Collect). This can probably be seen in the unity editor with the profiler enabled.

The solution is perhaps to not use OnGUI methods at all, and use something else (homemade?), but I will not say that for certain.
One thing is sure: The game should not skip and freeze at theese intervals.

Really hope this can be fixed, as it ruins much of the immersion in the game.

Thanks!

ps.
I'm setting the priority to Normal, but for my own gaming experience, this is a critical bug.

History

#1 Updated by BloodyRain2k almost 11 years ago

I've been having this issue since I play this game and across 3 different pcs even (my girlfriend's for testing included) but with slightly different starting parameters:
For me it's freezing and crackling right away even in vanilla KSP, but at varying intervals, normally every 5 sec but it can be longer and shorter.
It doesn't matter for me whenever I'm doing something or not, it's crackling and popping and has the minifreezes although they can get so short that I wouldn't notice them anymore if it wouldn't be for the crackling.

So the suspicion of the GC makes sense because that's cleaned in varying intervals, depending on how full it got.
This might also mean that the performance updates of 0.20 might fix it, and I'm praying for that, this crackling is sometimes so annoying that I just don't wanna play : (

#2 Updated by Jarod almost 11 years ago

Problem is still here with 0.21.
KSP without mods can stutter from the beginning on the launchpad every 3 seconds, returning to the first main screen of the game can bring back the stutter to every 20 seconds at best.
With mods, Mechjeb and Kerbal Engineer redux make the game stutter every 3 seconds no matter what, when they're displaying stages stats (delta-v and TWR) (datas continuously computed), even in the VAB.
Stutters disappear if alt-tab is used and the game is not displayed on screen.
Stutters make the game really unpleasant because of the cracking sounds, musics, and artefacts in physic behavior, engines are stopped during the stutters and can affect the vehicle's behavior really badly.
Arsenic87 seems to have found a possible culprit for this problem. Is it possible to have more information from the developers on this issue ? With the popularity of the game, even more players encounter this bug.

#3 Updated by Jarod almost 11 years ago

Since Arsenic87's link is not valid anymore, this is a working one :
http://forum.kerbalspaceprogram.com/showthread.php/25077-Slight-game-stutter
And some slides I didn't know about Memory profiling in Unity :
http://www.slideshare.net/williamyang3910/unitekorea2013-memory-profiling-in-unity
OnGUI calls are given as very memory intensive even if empty.

#4 Updated by arsenic87 over 10 years ago

  • Status changed from New to Duplicate
  • % Done changed from 0 to 100

Been a while since I played KSP now due to this issue. And now I'm back trying again. Seeing that the bug is more prominent than ever in 0.22 is very discouraging, but let's try once more to fix it.
I notice there are very many bugreports here now, and wondering if there is a more recent report on this bug that is being worked on/discussed other than this one? (Will search trough the bugs a little later, but just asked since maybe someone knows :P)
So let's get crackin' solving this bi***

#5 Updated by arsenic87 over 10 years ago

Seems #1196 is about the same issue

#7 Updated by arsenic87 over 10 years ago

Well, after countless hours of troubleshooting this sucker, I finally figured a way to get wrid of the sound issue. The skipping it self is still there, but at least the "chineese water torture" sound crackling is completly gone. big smile of relief

We know one thing:
This is due to GC in OnGUI calls. If it's a generall GC call, or if it's just been placed in OnGUI, we don't know. But it's the GC that freezes the entire system long enough for the soundbuffer to completly empty, and cause a crackle or pop in sounds.
After much searching, I notice that most of unitys GUI calls are managed trough "Mono", and not much else is managed there.
So I tried deleting the Mono scritps from the managed directory, and oalla, no more skipping, but also no more GUI :-\

Luckily, mono has reacently updated their GC routines (http://www.mono-project.com/Release_..._in_Mono_3.0.3), but this isn't yet updated in to KSP it seems
But it IS however updated in to the KSP launcher (probably a newer version of unity used here).

The temp fix
Find the KSP_Data folder. Backup and delete the Mono directory.
Find the Launcher_Data folder, and copu the Mono folder from there, in to KSP_Data folder.
Launch KSP, and hopefully play soundskipping free
Iwe tried this "quickfix" on 2 computers now, and they have no soundskipping after this was done.
NOTE: The skipping issue itself is NOT resolved... It only fixes the sound issue.

#8 Updated by Saegio over 9 years ago

Problem still persistent in 0.25. Every few seconds game freezes and sound along with it. It is really annoying and impairs the game experience

#9 Updated by EddieRod1285 almost 9 years ago

This problem is back and is louder than ever but without the frame stuttering. Just the audio issue! Also it sounds like an explosion is happening very fast, like 1/4 second fast, and you can hear what sounds like something crashing/bouncing in the ocean very far away! Game breaking for me in KSP 1.0

#10 Updated by fisban almost 7 years ago

runnin ksp 1.0.3.1804. windows 10 64bit running ksp 64. i am still having this issue running stock ksp through steam. skips even happen on main title screen, however i do not get the sound issue described. and it seems to be worse the more crafts i have but even with a fresh start this issue happends.

Also available in: Atom PDF