Quake3World.com Forums
     Level Editing & Modeling
        Z_Free: memory block wrote past end


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Z_Free: memory block wrote past end

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-05-2015 05:31 AM           Profile   Send private message  E-mail  Edit post Reply with quote


I made an experimental map with custom sounds where I am testing different sample rates up to maximum 22050 Hz - how it sounds like in game. I made a simple boxed map with some pillars and arches above player, a sky on top, buttons and it targetted speakers around the map. I set up few weak lights and minimum light to make sure the rest of map in shadow won't be completely in dark. Then tried to make simple test compile - success.

But when it comes to load the compiled map in game, it returns to Windows with Z_Free: memory block wrote past end error. What does that mean? I included four bullets ammo boxes in corners leaving default settings and through target_give I force player to gain more 100 bullets (it was reduced from 200, to see if it will help, it didn't)



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 08-05-2015 05:50 AM           Profile Send private message  E-mail  Edit post Reply with quote


Simple, it means the sample rate that you are using isn't supported.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-05-2015 05:59 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Okay, thank you. Maybe it might be just 11025 and 22050 Hz - I never overreach the maximum sample rate. I am using sounds with 8000 Hz and 16000 Hz sample rate. Those are maybe the ones that are not supported. So, here we are :D



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-05-2015 06:14 AM           Profile   Send private message  E-mail  Edit post Reply with quote


So I reduced number of sample rates to only 2: 22050 Hz and 11025 Hz - I know Maxell did use 11025 Hz sample rates in his experimental School map (and his map Zastavka) - it did work. For me, it does not. Why? :( I edited sounds to use only 22050 and 11025 Hz sample rate, like Maxell did, but the error is still present :(

///EDIT: I tried out again pack custom assets in the pk3, tried to replace old pk3 with the new pk3, tried out including BSP inside pk3 and tried out launching it in clean installation, but no success. It should have much deeper meaning that error. What sample rates exactly Quake 3 does support? List. Is it anything up to 22050 Hz or only 22050 Hz or 22050 Hz plus half of it? Does that appy also to textures (bad JPEG format)?



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-05-2015 06:43 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Seems Quake 3 does not support grayscale textures :disgust: I have to choose always RGB workspace when saving JPEG and TGA textures... So it's working now...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 08-05-2015 10:28 PM           Profile Send private message  E-mail  Edit post Reply with quote


There are plenty of grey scale maps out there. You can't use progressive jpg thpugh




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44138
PostPosted: 08-06-2015 12:08 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Make sure your sounds are 8 bit mono files as well




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-06-2015 12:55 AM           Profile   Send private message  E-mail  Edit post Reply with quote


I am using 16bit mono, and it works. I'm sure it's not much important how much bits the bit depth has, maybe maximum 16 bits per sample. For the textures: I am using always standard baseline JPG in Q3, but it was in Greyscale color workspace (so only 8 bits per pixel in shades of grey), this was that what caused the error as well. I need to check if the image is in RGB color workspace already and if not, force Photoshop to save with RGB information... It can be only grays, but it always needs to carry full color information in three bytes per pixel (in raw format), though they are all the same...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44138
PostPosted: 08-06-2015 09:07 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Does JPEG even support this? Isn't it always 24 bpp?




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-07-2015 02:10 AM           Profile   Send private message  E-mail  Edit post Reply with quote


I'm sure it does. When I tried to reopen saved JPG file some had Grey as color workspace. Then I forced Photoshop to change workspace to RGB color and save again. Then tried to reopen it and it had correct workspace then... I just did not notice workspace change when pasted downloaded image. When pasting copied image which is black&white/grayscale - Photoshop automaticaly changes workspace to save the space - which I always forgot to check. Then saved image as JPEG (not for web, using standard Save as utility) - selecting quality to 8 (from 0 to 12; High) it didn't lose any details, though... I think it is maximum 24 bpp (JPEG do not support alpha channels), but I think I can save JPEG with indexed colors as well (will need to test this)... Quake 3, however, seems to support only RGB color workspace for textures.



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Messatsu Ko Jy-ouu
Messatsu Ko Jy-ouu
Joined: 24 Nov 2000
Posts: 44139
PostPosted: 08-15-2015 04:06 AM           Profile   Send private message  E-mail  Edit post Reply with quote


CZghost wrote:
but I think I can save JPEG with indexed colors as well .

no. jpgs are by definition not indexed.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-15-2015 04:45 AM           Profile   Send private message  E-mail  Edit post Reply with quote


If I can save 8bit JPEG grayscale image, why not 8bit JPEG colored image? With only 256 colors and of course without transparency.

/// EDIT: I checked Photoshop saving settings with indexed images - JPEG is missing. That leads me to believe that only one variant of 8bit JPEG is grayscale.



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Veteran
Veteran
Joined: 17 Jun 2013
Posts: 158
PostPosted: 08-15-2015 06:54 AM           Profile Send private message  E-mail  Edit post Reply with quote


Because the JPEG is the devil's picture file format. >:)



_________________
My Quake 3 maps


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 08-15-2015 08:22 AM           Profile   Send private message  E-mail  Edit post Reply with quote


I do not think so. It depends highly on compression settings (read quality). More quality => less compression => bigger size. For Quake 3 textures I would recommend saving via Save As dialog and set quality to Maximum (10-12), also Baseline Standard should be checked. Never save as Web picture...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.