Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Tormentor667

Bug?

Recommended Posts

I got an ZDoom Bug called:

Z_Malloc: Failed to allocate "X" Bytes :(

What about this and how to fix it?

**EDIT**

The bad thing about it: I can't play my map anymore because of that bug :( ZDoom always crashes and tells me about this problem :(

Share this post


Link to post

It's not really a bug. It just means there's not enough memory being set aside for whatever map you're playing. You can edit that .bat to add this:

zdoom -file filename.wad -heapsize 16

This should give you enough memory. If not, try using 24 or 32 instead.

Share this post


Link to post

Or you could try a newer version of ZDoom, as they don't crash with this bug. (in my experience, anyway. I got crashes in LTSD's two biggest maps with 1.23b33, but not with v25)

Ichor: what's the default heapsize? (just interested)

Share this post


Link to post

I think it's 8.

And the real big maps can cause the Z_Malloc error. The worst thing about this is if you get it when you try to save your game, it crashes like usual, but it also erases any previous saved game in that particular slot.

Share this post


Link to post

It could be machine-specific, as if you have a machine (usually a low-end one) with not much free HD space on it, ZDoom might crash with a Z_Malloc when you try to save (I got this on a P200 playing an 1100-sector map with one script running at the time). It's also map related, as the maps I got a crash on both had 1400+ sectors in (playing on a duron 700), along with a ton of things and some complex scripts.

Share this post


Link to post

As Ichor stated. It's level dependent, especially if hi-res textures are used. A safe value is -heapsize 30 (for now). If one has at least 256mb of real memory, have at it. This same type of thing applies to the other ports too (that accept overrides).

Too bad the various ports couldn't standardize on just this simple name though. Some use -mb 30 some -maxzone 30 BAH!

Share this post


Link to post

Hmm... so I should write something like this in my readme txt because my map has now over 5000 sectors and sometimes about 4 scripts running at the same time ;)

Thx for the help :)

Share this post


Link to post

I don't think having a bunch of scripts running at the same time would be that much of a problem. Some of my maps have at least a half dozen scripts running (mostly lighting scripts and puzzles) with no errors. The only problems I had were on map 5 (Haunted Castle), but that was because of its size. Even that went away when I increased the heapsize.

Share this post


Link to post
Tormentor667 said:

@Nightmare - It IS detailed ;)

Maybe there's some miscommunication here? 5000 sectors would tend to have around 15,000 (or more) linedefs. A level that size wouldn't work unless you let the -latest- ZDOOM build the nodes (+gennodes 1).

But you could be right - it's just unusual. ZDOOM could be doing the nodes automatically. I tested this but forget if it did or didn't kick in - I was after some other issue - IIRC it didn't. Enjay or somebody else with more time spent probably remembers better.

Which reminds me, Randy in the next release has fixed the ZDOOM internal nodebuilder to support over 32k linedefs and goes over 64k segs (the latter is usually what stops big levels from working - it's 32k for stock nodes to give you an idea).

Share this post


Link to post

? Only 1725 ?

Well, but if I open it with a editor, the last sector created has the sector id "5200" (or sth. like this). Why has the editor left out all sector numbers from 1000 to 5000?!

Share this post


Link to post
Tormentor667 said:

? Only 1725 ?

Well, but if I open it with a editor, the last sector created has the sector id "5200" (or sth. like this). Why has the editor left out all sector numbers from 1000 to 5000?!


Share this post


Link to post

Are you talking about tnt2.wad? I noted in several other posts that this wad has a very strange sector problem, thousands of sectors seem to be "compressed" into zero space and don't appear on the map although they are in the database. One of the errors DeePsea fixed was to eliminate thousands of "unused" sectors and sidedefs. I think your wad editor is malfunctioning.

Have you received the fixed tnt2 I sent you? Do you see a difference?

Oh, I see your update in the wads forum, so you have it. :) It only lost 4 - 5 MB, huh?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×