Bug #27367

Memory leak in 1.4

Added by Xeno over 3 years ago. Updated about 3 years ago.

Status:Closed Start date:12/26/2011
Priority:High Due date:
Assignee:Psychobastard % Done:

100%

Category:Scripts
Target version:-
BIForumURL:

Description

Game memory usage does rise slowly but steady when using JSRS 1.4, aka mem leak.

Not only the memory usage does increase but also the FPS go down in the same time.

History

Updated by LordJarhead over 3 years ago

  • Status changed from New to Closed
  • Priority changed from Normal to Low

This is because of the high amount of sound samples. Try to set up 128 samples in audio options and to delete the environment_c.pbo.

Updated by Xeno over 3 years ago

Nope, it is not because of the high amount of the samples!
The problem is not related to the sounds.

Updated by Sickboy over 3 years ago

Xeno wrote:

Nope, it is not because of the high amount of the samples!
The problem is not related to the sounds.

So why don't you tell him what it is related to?

@Jarhead; You are creating objects for the dynamic sounds, but you don't delete the objects after the sounds have played.

Updated by LordJarhead over 3 years ago

So, I have to ask Psycho how tp prevent that. Thanks for the information Sickboy!

Updated by LordJarhead over 3 years ago

  • Status changed from Closed to In progress
  • Priority changed from Low to High

Updated by Xeno over 3 years ago

Oops, yeah, forgot that (was on the run @work).
It's the particlesource objects which cause the problem as they are not beeing deleted after usage.

Concerning the "there has to be a vehicle on the map to make distance sounds working...", why not simply create a non visible vehicle at a non water random position somewhere on the outer sides of the map ? (like the preview vehicles for Warfare, use setTexture to make them invisible).

Updated by Psychobastard over 3 years ago

  • Assignee set to Psychobastard

It's the particlesource objects which cause the problem as they are not beeing deleted after usage.

Yes, my mistake - i thinking before a particlesource delete themself after usage. :-P No problem to fix it... the invisible vehicle is no problem, too.
BUT! - i havent any time to do anything before mid of january. (work, silvester, ski holidays) Sorry!

btw: how mush storage use it? Can you discripe it a little bit to assess the urgency?

Updated by Xeno over 3 years ago

You can easily check this without the soundmod loaded.

Just create ten thousands of particlesources (add a global reference to the first one created).
Then you'll see that it won't get deleted (means memory usage rises) and that your FPS go down over time (the engine has to handle thousands of objects after some time).

Particlesource != particles.

Updated by LordJarhead over 3 years ago

Wow, thank you so much for helping me out with that. So mid januar will be a fix for that, if Psycho got the time ;) Thanks Xeno, Sickboy!

Jarhead

Updated by Psychobastard about 3 years ago

  • Category set to Scripts
  • Status changed from In progress to Resolved
  • % Done changed from 0 to 100

fixed.

changed:
- #particlesource will be deleted after sound has played
- limited operating range of sound (between 100m and 2200m)
- no longer a vehicle must place on map (now automaticaly)

Updated by tonci87 about 3 years ago

Great news!

Updated by Ayger about 3 years ago

Good job man!

Updated by LordJarhead about 3 years ago

  • Status changed from Resolved to Closed

Great Job man! Thanks alot. So I'm able to finish the work on the latest patch then. Thanks alot guys for your support!

Also available in: Atom PDF