Author Topic: [Bug] "Can't Allocate DIB Handle" error message  (Read 4419 times)

0 Members and 1 Guest are viewing this topic.

Offline Flopsy

  • Global Moderator
  • Posts: 953
  • Lix Nerd
    • View Profile
[Bug] "Can't Allocate DIB Handle" error message
« on: June 14, 2017, 10:18:34 AM »
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.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [Bug] "Can't Allocate DIB Handle" error message
« Reply #1 on: June 14, 2017, 10:31:00 AM »
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.
« Last Edit: June 14, 2017, 11:09:24 AM by namida »
My Lemmings 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)

Offline Flopsy

  • Global Moderator
  • Posts: 953
  • Lix Nerd
    • View Profile
Re: [Bug] "Can't Allocate DIB Handle" error message
« Reply #2 on: June 15, 2017, 02:38:15 PM »
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 :)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [Bug] "Can't Allocate DIB Handle" error message
« Reply #3 on: June 16, 2017, 05:21:17 AM »
New formats won't completely fix it, just make it much rarer.
My Lemmings 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)

Offline Nepster

  • Posts: 1829
    • View Profile
Re: [Bug] "Can't Allocate DIB Handle" error message
« Reply #4 on: September 24, 2017, 07:19:04 PM »
If anyone gets this error in the new-formats version, then please make a new bug report in a new thread.