Home | Webstore
Latest News: OOTP 26 Available - FHM 11 Available - OOTP Go! Available

Out of the Park Baseball 26 Buy Now!

  

Go Back   OOTP Developments Forums > Prior Versions of Our Games > Earlier versions of Out of the Park Baseball > Earlier versions of OOTP: Technical Support > Earlier versions of OOTP: Closed or Claim Fixed
Register Blogs FAQ Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Old 06-06-2006, 08:38 AM   #1
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Major Memory Leak

The game has a major memory leak. In trying to sim a 100 year test league (I used the default MAL league) by the time I got to the 45th year, OOTP was using 1.5 gig of the 2 gigs of ram I have in my machine. As I watched the process through the visual studio debugger, I noticed that the amount of ram just kept creeping up and NEVER went down.
__________________
When is good enough, good enough?

jarmenia is offline  
Old 06-06-2006, 09:12 AM   #2
rdomico
All Star Reserve
 
Join Date: Mar 2002
Location: Monaca, PA
Posts: 828
Quote:
Originally Posted by jarmenia
The game has a major memory leak. In trying to sim a 100 year test league (I used the default MAL league) by the time I got to the 45th year, OOTP was using 1.5 gig of the 2 gigs of ram I have in my machine. As I watched the process through the visual studio debugger, I noticed that the amount of ram just kept creeping up and NEVER went down.

I might be wrong, but I don't think it is a memory leak. Close the game down, reboot and then reload your game. You will see that the memory usage will be about the same.

I think it is a design decision. I can't see the code, so I can only guess, but it appears as though the game keeps the entire database(or a lot of it) in memory. The pro of that approach is faster access. Reading/Writing to a file is slow. Reading/Writing to memory is fast. The con is just what you are seeing.... a lot of memory.
rdomico is offline  
Old 06-06-2006, 09:27 AM   #3
JimG
Banned
 
Join Date: Jun 2006
Posts: 241
Quote:
Originally Posted by rdomico
I think it is a design decision. I can't see the code, so I can only guess, but it appears as though the game keeps the entire database(or a lot of it) in memory. The pro of that approach is faster access. Reading/Writing to a file is slow. Reading/Writing to memory is fast. The con is just what you are seeing.... a lot of memory.
Wow does that mean if I only have 512mb of ram that would explain all the crashes?
JimG is offline  
Old 06-06-2006, 09:31 AM   #4
scefalu
Major Leagues
 
scefalu's Avatar
 
Join Date: Dec 2001
Posts: 355
I, for one, would do it differently. I understand the speed aspect of it, but there has to be a way to segment the database so that only the active players are in the 'in memory' database. The remaining historical information should be relegated to disk.

__________________
Shawn
scefalu is offline  
Old 06-06-2006, 09:32 AM   #5
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Quote:
Originally Posted by rdomico
I might be wrong, but I don't think it is a memory leak. Close the game down, reboot and then reload your game. You will see that the memory usage will be about the same.

I think it is a design decision. I can't see the code, so I can only guess, but it appears as though the game keeps the entire database(or a lot of it) in memory. The pro of that approach is faster access. Reading/Writing to a file is slow. Reading/Writing to memory is fast. The con is just what you are seeing.... a lot of memory.
No that would not be a design decisision, it would be a memory leak. If the game continues to take more and more memory without releasing it up to the point where a strong system will grind to a halt, that my friend is a memory leak. When I restart the game, the memory doesn't imediatly jump back up to 1 + gigs so its not loading the whole database at once. The reason the memory returns to the system once the game is closed is the fact that windows XP does its job and when OOTP is closed, XP releases any memory allocated to it that was not released by the application its self.

Besides, think about it. Most people don't have 2 gigs of ram in their machine. If it brings my machine to a halt, what would it do to somone with 512 megs of ram?
__________________
When is good enough, good enough?

jarmenia is offline  
Old 06-06-2006, 09:32 AM   #6
rdomico
All Star Reserve
 
Join Date: Mar 2002
Location: Monaca, PA
Posts: 828
Quote:
Originally Posted by JimG
Wow does that mean if I only have 512mb of ram that would explain all the crashes?

Remember, I didn't write the code, so I could be wrong and I don't want people to think I disagree with the design. It might be the right choice. If I was the programmer Markus is, I would be writing my own game and not commenting on this message board.

If you don't have enough memory, it would use your harddrive as memory. Windows calls this a swapfile. That should not be causing crashes. It would just start running slower because accessing the swapfile is slow.
rdomico is offline  
Old 06-06-2006, 09:32 AM   #7
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Quote:
Originally Posted by JimG
Wow does that mean if I only have 512mb of ram that would explain all the crashes?

Its one of the potential causes.
__________________
When is good enough, good enough?

jarmenia is offline  
Old 06-06-2006, 09:34 AM   #8
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Quote:
Originally Posted by rdomico
Remember, I didn't write the code, so I could be wrong and I don't want people to think I disagree with the design. It might be the right choice. If I was the programmer Markus is, I would be writing my own game and not commenting on this message board.

If you don't have enough memory, it would use your harddrive as memory. Windows calls this a swapfile. That should not be causing crashes. It would just start running slower because accessing the swapfile is slow.
Its a leak. Trust me. There is no way OOTP should be bringing my system down to a crawl because I simmed 40 years straight. I have programs much more demanding on it and they don't have that effect.
__________________
When is good enough, good enough?

jarmenia is offline  
Old 06-06-2006, 09:36 AM   #9
thomamon
Global Moderator
 
thomamon's Avatar
 
Join Date: Sep 2003
Location: NJ
Posts: 5,274
Tt 1710
__________________
Thomas A. Montalto
Please check out my Stupid Little Blog - http://www.stupidlittleblog.com
thomamon is offline  
Old 06-06-2006, 09:37 AM   #10
rdomico
All Star Reserve
 
Join Date: Mar 2002
Location: Monaca, PA
Posts: 828
Quote:
Originally Posted by jarmenia
Its a leak. Trust me. There is no way OOTP should be bringing my system down to a crawl because I simmed 40 years straight. I have programs much more demanding on it and they don't have that effect.

There probably is a leak. I don't think that is the whole problem.
rdomico is offline  
Old 06-06-2006, 09:39 AM   #11
scefalu
Major Leagues
 
scefalu's Avatar
 
Join Date: Dec 2001
Posts: 355
Quote:
Originally Posted by rdomico
If you don't have enough memory, it would use your harddrive as memory. Windows calls this a swapfile. That should not be causing crashes. It would just start running slower because accessing the swapfile is slow.
Doesn't Windows put a limit on the amount of virtual memory, though? I have 1 Gb RAM on my system and the VM is limited to 2.5 Gb. I wonder if it is that memory cap that some users are running up against?
__________________
Shawn
scefalu is offline  
Old 06-06-2006, 09:40 AM   #12
Erik W.
Global Moderator
 
Erik W.'s Avatar
 
Join Date: Apr 2003
Location: Rivière-du-Loup, Qc
Posts: 4,615
Quote:
Originally Posted by JimG
Wow does that mean if I only have 512mb of ram that would explain all the crashes?
I have 512 RAM and an old processor, and I've only crashed once, and that was due to a reason that's been cited as specific and fixed. Having 512 RAM shouldn't make you crash by default unless you're playing the game a long time in one sitting. But even then, my performance has degraded to annoying levels before I ever crash, so I've never crashed due to resource drain. I restart the game every three managed games or so.

According to Duffy, turning off the ticker (which we can do after the patch) will fix the problem that's appearing as a memory leak.
__________________
Free agent baseball fan. Let's go (insert team name here)!
Erik W. is offline  
Old 06-06-2006, 09:52 AM   #13
Marc Duffy
SI Marketing Wizard
 
Join Date: Mar 2004
Location: Old Street, London
Posts: 4,741
Well, no that is one issue

The other factor to take into consideration is the cache. The game is caching your html reports and stuff which could account for the increase in RAM
Marc Duffy is offline  
Old 06-06-2006, 10:01 AM   #14
Markus Heinsohn
Developer OOTP
 
Markus Heinsohn's Avatar
 
Join Date: Dec 2001
Location: Germany
Posts: 24,805
Keep in mind that the game constantly creates new players that generate history. This will be kept in RAM.

There is a leak if you start, sim, check the memory useage, close the game down, start again, load the same league and then the memory useage is much less than before... if that is the case, we have a leak.
Markus Heinsohn is offline  
Old 06-06-2006, 10:06 AM   #15
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Quote:
Originally Posted by Markus Heinsohn
Keep in mind that the game constantly creates new players that generate history. This will be kept in RAM.

There is a leak if you start, sim, check the memory useage, close the game down, start again, load the same league and then the memory useage is much less than before... if that is the case, we have a leak.
That is definately what I am seeing.
__________________
When is good enough, good enough?

jarmenia is offline  
Old 06-06-2006, 10:17 AM   #16
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by Markus Heinsohn
Keep in mind that the game constantly creates new players that generate history. This will be kept in RAM.

There is a leak if you start, sim, check the memory useage, close the game down, start again, load the same league and then the memory useage is much less than before... if that is the case, we have a leak.
Markus & jarmenia, sorry but you're wrong A leak is if the program allocates memory and doesn't free it *when it's no longer needed*.

What we have here, is a cache. Templates and text file content and also other stuff is being cached. When the cache is full or when you close the game, the cache will be written into a file and then the used memory will be freed again as it should be (so it's no leak). When you start the game again, the cache will be empty, so the game will use less RAM. After simulating some games it will be used again and it will need RAM again.

So Marc is right, it's just the cache.
I've tested it several times for memory leaks, and there are no leaks in the game at the moment
Andreas Raht is offline  
Old 06-06-2006, 10:47 AM   #17
Erik W.
Global Moderator
 
Erik W.'s Avatar
 
Join Date: Apr 2003
Location: Rivière-du-Loup, Qc
Posts: 4,615
Quote:
Originally Posted by Andreas Raht
Markus & jarmenia, sorry but you're wrong A leak is if the program allocates memory and doesn't free it *when it's no longer needed*.

What we have here, is a cache. Templates and text file content and also other stuff is being cached. When the cache is full or when you close the game, the cache will be written into a file and then the used memory will be freed again as it should be (so it's no leak). When you start the game again, the cache will be empty, so the game will use less RAM. After simulating some games it will be used again and it will need RAM again.

So Marc is right, it's just the cache.
I've tested it several times for memory leaks, and there are no leaks in the game at the moment
Good to know.

Now explain why the heck the game runs so much more smoothly in a window than fullscreened!
__________________
Free agent baseball fan. Let's go (insert team name here)!
Erik W. is offline  
Old 06-06-2006, 10:52 AM   #18
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Quote:
Originally Posted by Andreas Raht
Markus & jarmenia, sorry but you're wrong A leak is if the program allocates memory and doesn't free it *when it's no longer needed*.

What we have here, is a cache. Templates and text file content and also other stuff is being cached. When the cache is full or when you close the game, the cache will be written into a file and then the used memory will be freed again as it should be (so it's no leak). When you start the game again, the cache will be empty, so the game will use less RAM. After simulating some games it will be used again and it will need RAM again.

So Marc is right, it's just the cache.
I've tested it several times for memory leaks, and there are no leaks in the game at the moment

If the program is written to continue to take memory until the system drags to a hault, then yes, its not a memory leak just a memory hog. The result is the same however as system performance degrades over time. The program should run the same in the first 15 min as it does five hours later. This is not the case and I'll be happy to send you the performance logs when I get home if you want to see them.

Perhaps a solution to this is to empty the cache every so often, say once a year or every so many games. I'm not sure what exactly your caching or why so I can't propose a solution. The one thing I can say though is it needs to be looked at and I'll do whatever you ask to help resolve it. The way it is right now I can't run a 100 year sim without restarting the game every 20 years or so.
__________________
When is good enough, good enough?

jarmenia is offline  
Old 06-06-2006, 10:58 AM   #19
enuttage
Hall Of Famer
 
enuttage's Avatar
 
Join Date: Mar 2002
Location: Hill Country
Posts: 2,428
Quote:
Originally Posted by jarmenia
The way it is right now I can't run a 100 year sim without restarting the game every 20 years or so.
This is definitely a problem.
__________________
The former GM of the WHBL Managua Four Roses

"The best way to find out if you can trust somebody is to trust them."
enuttage is offline  
Old 06-06-2006, 11:03 AM   #20
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Quote:
Originally Posted by Azamien
Good to know.

Now explain why the heck the game runs so much more smoothly in a window than fullscreened!
<DIR>If your desktop is for example 1600x1200 then when you open fullscreen the window OOTP writes to will be that big (1,920,000 pixel). In windowed mode then the window is 1024x768 (786,432 pixel, that's only 40% of the bigger resolution). Maybe that this is the reason why it's getting slower. "Painting" the window needs more time if it's so much bigger.
</DIR>
Andreas Raht is offline  
Closed Thread

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:52 AM.

 

Major League and Minor League Baseball trademarks and copyrights are used with permission of Major League Baseball. Visit MLB.com and MiLB.com.

Officially Licensed Product – MLB Players, Inc.

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2023 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright © 2024 Out of the Park Developments