Z_Free: memory block wrote past end
Z_Free: memory block wrote past end
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)
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)
Re: Z_Free: memory block wrote past end
Simple, it means the sample rate that you are using isn't supported.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Z_Free: memory block wrote past end
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 

Re: Z_Free: memory block wrote past end
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)?


///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)?
Re: Z_Free: memory block wrote past end
Seems Quake 3 does not support grayscale textures
I have to choose always RGB workspace when saving JPEG and TGA textures... So it's working now...

Re: Z_Free: memory block wrote past end
There are plenty of grey scale maps out there. You can't use progressive jpg thpugh
Re: Z_Free: memory block wrote past end
Make sure your sounds are 8 bit mono files as well
Re: Z_Free: memory block wrote past end
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...
Re: Z_Free: memory block wrote past end
Does JPEG even support this? Isn't it always 24 bpp?
Re: Z_Free: memory block wrote past end
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.
Re: Z_Free: memory block wrote past end
no. jpgs are by definition not indexed.CZghost wrote:but I think I can save JPEG with indexed colors as well .
Re: Z_Free: memory block wrote past end
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.
/// 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.
Re: Z_Free: memory block wrote past end
Because the JPEG is the devil's picture file format. 

[url=http://lvlworld.com/author/Martinus]My Quake 3 maps[/url]
Re: Z_Free: memory block wrote past end
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...