Author Topic: Dynamic bmpman slots  (Read 781 times)

0 Members and 1 Guest are viewing this topic.

Offline m!m

  • 211
Dynamic bmpman slots
"bmpman" is the system the FSO engine uses for managing the loaded image data. Currently, that is done by using an array with a static size (although a new addition allows to specify the size). Obviously, this means that when the engine is loading too many images at some point it will run out of bitmap slots to store the information for the new image. In most cases this will lead to weird issues and strange assertion failures.

Some time ago, I proposed a new system for managing the bitmap slots by allowing the engine to allocate new slots when necessary. I implemented that system over the last few days and to my amazement it actually works!

Here are some test builds with the changes: http://swc.fs2downloads.com/builds/test/bitmapBlocks/

To test, simply play the game as usual. No changes are required for making use of this new system. It should be especially useful for mods that use a lot of bitmap slots (I am looking at you Spoon) so mods like that should benefit the most from this.

Please let me know if you find anything that got broken by this change. In my tests this worked pretty well but it's possible that I missed something.

 

Offline Spoon

  • 212
  • troll missions builder ヾ(´︶`♡)ノ
Re: Dynamic bmpman slots
I'll give it a whirl as soon as Dahblount can get me a wod build for this.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Spoon

  • 212
  • troll missions builder ヾ(´︶`♡)ノ
Re: Dynamic bmpman slots
Tested it, as far as I can tell (from admittedly, not super deep tests) there don't seem to be any issues, weird artifacts, textures not loading or any of the bad stuff.
I noticed in the debug log the bmpman limit started off as 4096 and doubled to 8192 when that limit was hit. So everything working as intended I guess.

Of course, should I actually run into any weird issues I'll let you know, but this initial gander at it looks good.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Dynamic bmpman slots
I reported this on Discord awhile ago, but I probably should record it here for more permanence.
I played JAD 2.21 for about an hour straight and got to somewhere around the taco mission (I don't remember exactly) and then FSO completely crashed.  Unfortunately, I wasn't playing on debug build and I can't test on one because the Starlance is completely unusable when using a debug build (but that's another story), so I don't know if it was a problem with this build.  I should note that I could play JAD in one sitting much longer than last time I got a bmpman error in JAD.
[6:59 PM] Admiral Nelson: who made the "New Folder" campaign?
[7:00 PM] Cobbles: Never heard of that one
[7:00 PM] PIe: best campaign name ever
[7:00 PM] PIe: I really liked the sequel "Copy of New Folder"
[7:01 PM] Admiral Nelson: no way
[7:01 PM] Admiral Nelson: Copy of New Folder (2) was waayyy better
[7:01 PM] GayShivan: Now now
[7:01 PM] GayShivan: Let's talk about the spinoff, Shortcut of Copy of New Folder (3)

[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

 

Offline Nightmare

  • 210
Re: Dynamic bmpman slots
I reported this on Discord awhile ago, but I probably should record it here for more permanence.
I played JAD 2.21 for about an hour straight and got to somewhere around the taco mission (I don't remember exactly) and then FSO completely crashed.  Unfortunately, I wasn't playing on debug build and I can't test on one because the Starlance is completely unusable when using a debug build (but that's another story), so I don't know if it was a problem with this build.  I should note that I could play JAD in one sitting much longer than last time I got a bmpman error in JAD.

Is this something you've experienced only with these test builts or other ones as well? I'm running into several (probably memory related) crashes recently, mostly with FRED when using FRED and FS simultainous, but I'm using Nightly builts, not this one.

 

Offline PIe

  • 28
  • GTVA POLICE
    • freespace3.com
Re: Dynamic bmpman slots
Is this something you've experienced only with these test builts or other ones as well? I'm running into several (probably memory related) crashes recently, mostly with FRED when using FRED and FS simultainous, but I'm using Nightly builts, not this one.
I don't know and I don't have a lot of time to play JAD for hours on end to find out.  If you want to try to replicate it on a regular nightly, I explored every dialogue option in the visual novel sections and never exited back to the mainhall until it crashed around the taco eater mission.
[6:59 PM] Admiral Nelson: who made the "New Folder" campaign?
[7:00 PM] Cobbles: Never heard of that one
[7:00 PM] PIe: best campaign name ever
[7:00 PM] PIe: I really liked the sequel "Copy of New Folder"
[7:01 PM] Admiral Nelson: no way
[7:01 PM] Admiral Nelson: Copy of New Folder (2) was waayyy better
[7:01 PM] GayShivan: Now now
[7:01 PM] GayShivan: Let's talk about the spinoff, Shortcut of Copy of New Folder (3)

[6:23 PM] PIe: why do I have the feeling that I shouldn't be able to give orders to 22nd armored hq
[6:24 PM] Axem: 22nd armored hq, i order you to get me a cup of coffee
[6:24 PM] PIe: and donuts
[6:24 PM] PIe: BECAUSE THIS IS THE GTVA POLICE
[6:25 PM] Axem: :O
[6:25 PM] Axem: am i under arrest
[6:26 PM] [`_`]/: no, just please step out of the myrmidon
[6:26 PM] [`_`]/: you have so much to fred for

 

Offline Nightmare

  • 210
Re: Dynamic bmpman slots
I didn't play JAD, I used only MVPs with some custom low-poly stuff. Though, I had both FRED (and probably FS) running in background for a long time (30 mins, maybe over an hour) without sitting in front of the computer.

  

Offline m!m

  • 211
Re: Dynamic bmpman slots
Thank you all for testing this. The changes should be ready for the merge into the master branch since they do not seem to cause any major issues.