Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

"Z_Free" Problem

Recommended Posts

That is an internal error of the Zone memory management system.
It is not supposed to happen. I spent considerable time rewriting
that Zone memory system in DoomLegacy to stop those errors.
They are caused by nearby uses of memory, having writes outside their
allocated space, that hit the memory allocation header.
Also could be caused by releasing a memory allocation twice, but
that is rarer because the code is more careful of that.

These are faults within the code.

It would take considerable effort to even track down what
is triggering the memory overwrite.

Some possibilities:
1. corrupt wad structures
2. not running a node builder
3. compressed patches created by some editors. But this only affected
code that tried to convert multi-patch textures to one-patch.
In DoomLegacy this caused the memory required to be underestimated.
4. overrun of span data structures, clobbering adjacent tables
5. the same texture used in the status bar, and in the level.
The texture gets released from the cache, and the status bar is still using it.
6. Allowing an editor to use a ZDoom-ism in a wad meant for vanilla doom. Other special linedefs of other ports could have the same
7. many more that I cannot remember.

Use the -mb switch to pre-allocate a huge Zone memory. This will move the adjacent memory allocations and may reduce that
memory clobbering.

Ports that have abandoned or replaced the Zone memory system
wont't have the errors.
Submit your wads to another port that gives better error messages.
DoomLegacy has a verbose command line option.
It may be possible, you will find nothing wrong with your wads.
Rewritten ports are more tolerant of some unusual wad structures than vanilla doom was.

Share this post

Link to post

It's not a fault of the zone system itself. It means some other part of the program malfunctioned earlier and corrupted the heap. Ports that don't use zone memory, but have the same kinds of problems, will issue an operating-system-level error message instead (typically "This program has performed an illegal operation and must shut down.")

If it has to do with textures, maybe check and make sure that you don't have any resources in an incorrect format (ie. embedded as PNG or linear instead of DOOM's patch format).

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