[Bug] "Can't Allocate DIB Handle" error message

Started by Flopsy, June 14, 2017, 10:18:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Flopsy

v10.13.16-B

This happens whenever I pass over a certain level in my level pack, as in using the arrow keys to scroll through the levels to get past it. I've also had reports from my testers that whenever this said level is completed, this error message gets displayed.

Sometimes Neo Lemmix just closes instead of displaying this error message.

I can send you the level in question if it helps.

namida

#1
Does the level in question use a large variety of graphic sets? This, especially if it's one with a lot of images (ie: many animation frames and/or lots of terrain pieces; the size is irrelevant as far as I know, it's just the quantity that matters), and even more so if heavy use is made of flipped / rotated pieces (especially objects), can lead to such errors.

Note that making an Epic-style tileset will not avert this issue, as it isn't so much "how many graphic sets are used" that causes this, but more "how many total images are in all graphic sets this level uses, combined"? (If we want to be really technical, it will also keep in memory any graphic set used by the last four levels that were loaded in addition to the currently loaded one.)

While making the code more efficient in terms of how it handles images, or less efficient in terms of keeping pieces in memory in case they're used again, can reduce the impact of this bug - and I have some ideas on how to further do this - nothing short of heavy modifications to Graphics32 (so it doesn't use DIB handles in the first place) or outright replacing it, at least behind-the-scenes (while maybe still using it for loading image files and graphic output) will outright prevent it. It's an issue that I'd love to get fixed for once and for all, but that might be a while before it happens (with that being said, new-formats is inherently more resistant to this than the old-formats version is, because it doesn't have to load the entire graphic set, it only loads the pieces that are actually used by the level).

Changelogs for V10.13.17 and V10.13.18 don't suggest that I've made any changes that would reduce how likely this issue is to occur, but it may be worth testing with V10.13.18 anyway, on the offchance I made improvements but forgot to note it in the changelog. V10.13.18 will be the final version of NeoLemmix until the new-formats version is ready, I'm not even doing hotfixes at this stage.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Flopsy

Yes that is correct, it does use a lot of different graphic sets and they are flipped or rotated.

I read that as: This may be eliminated when the new format is introduced.

Thanks for your reply namida :)

namida

New formats won't completely fix it, just make it much rarer.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

If anyone gets this error in the new-formats version, then please make a new bug report in a new thread.