BA keeps all pictures on memory and crashes
Moderators: FranAvalon, Marek14, CCGHQ Admins
BA keeps all pictures on memory and crashes
by Jean le Chauve » 17 Nov 2012, 17:26
Rheikon reported on Slightlymagic:
If you look at lots of pictures BA keeps them all in memory eventually crashing when running out. On occasion it will simply stop showing pictures.
I've tested it and that is right and happens on deckbuilder when you see between 2500 and 3000 cards, ay least on my PC. I never got it playing games.
BA must be picture memory cache limited to for example 500 card or so.
marek14:
That would probably explain some of my crashes, given that I'm prone to play with big testing decks containing lots of cards.
void:
As a matter of fact such a mechanism is already implemented.
CGdiplus::FlushBitmaps() is called (no more often then 10s between calls) then there are more then 256 pictures stored.
At least that's what I can see in the code.
The mechanism is so advanced that it takes into account hit ratio.
FranAvalon:
To me BA crashes when it hits a size of 1.3 Gb more or less.
If i load all card images from letter A, it get a size of 614 Mb, and after wait a couple of minutes, it down to 469 Mb, and no more changes happen on next 5 min.
MORE TEST:
If you exit from deckbuilder, size doesn't down, but if you start a game, and then you finnish it, BA size goes to 98Mb more or less. So end game has a rutine to clear card picture cache.
void:
The logic and functionality is there, but some bug has slipped into it.
If you look at lots of pictures BA keeps them all in memory eventually crashing when running out. On occasion it will simply stop showing pictures.
I've tested it and that is right and happens on deckbuilder when you see between 2500 and 3000 cards, ay least on my PC. I never got it playing games.
BA must be picture memory cache limited to for example 500 card or so.
marek14:
That would probably explain some of my crashes, given that I'm prone to play with big testing decks containing lots of cards.
void:
As a matter of fact such a mechanism is already implemented.
CGdiplus::FlushBitmaps() is called (no more often then 10s between calls) then there are more then 256 pictures stored.
At least that's what I can see in the code.
The mechanism is so advanced that it takes into account hit ratio.
FranAvalon:
To me BA crashes when it hits a size of 1.3 Gb more or less.
If i load all card images from letter A, it get a size of 614 Mb, and after wait a couple of minutes, it down to 469 Mb, and no more changes happen on next 5 min.
MORE TEST:
If you exit from deckbuilder, size doesn't down, but if you start a game, and then you finnish it, BA size goes to 98Mb more or less. So end game has a rutine to clear card picture cache.
void:
The routine is CGdiplus::ClearBitmapCacheJul 17, 2011, 5:24pm, FranAvalon wrote:
If you exit from deckbuilder, size doesn't down, but if you start a game, and then you finnish it, BA size goes to 98Mb more or less. So end game has a rutine to clear card picture cache.
The logic and functionality is there, but some bug has slipped into it.
- Jean le Chauve
- Posts: 56
- Joined: 30 Jan 2012, 10:28
- Has thanked: 1 time
- Been thanked: 1 time
1 post
• Page 1 of 1
Return to User Interface and AI issues
Who is online
Users browsing this forum: No registered users and 2 guests