MantisBT - Zandronum
View Issue Details
0001086Zandronum[All Projects] Bugpublic2012-09-29 14:342024-03-01 19:55
Player701 
 
normalmajorsometimes
closedno change required 
MicrosoftWindowsXP/Vista/7
1.0 
 
0001086: "High quality resize mode" OpenGL setting causes memory leak
Well, this may be system-dependent, but I'll still report it. Setting "High quality resize mode" in OpenGL options to something other than "None" may cause a huge memory leak. Yesterday Zandronum crashed 3 times in a row (each time after ~ 15 minutes from the start) with a "failed to allocate xxx bytes from process heap" message. It was using like ~ 1.6GB of memory! After changing resize mode from "Scale4X" to "None", it went on fine. My friend, who was playing with me at the time, said that Zandronum was using a large amount of page file memory (it was continuously increasing), but it didn't crash though. His resize mode was set to "HQ4X".
Set "High quality resize mode" in "OpenGL options"->"Texture options" to something other than "None".
If it can help, I was playing on an Armageddon 2 Invasion server. Previously I played on some other servers and got no crashes... however, these servers were not using PWADs like Armageddon 2 (with high amounts of monsters).
No tags attached.
Issue History
2012-09-29 14:34Player701New Issue
2012-09-29 14:35Player701Note Added: 0004842
2012-09-29 17:41Torr SamahoDescription Updatedbug_revision_view_page.php?rev_id=2636#r2636
2012-09-29 17:44Torr SamahoNote Added: 0004844
2012-09-29 20:31Player701Note Added: 0004849
2012-09-30 08:27Torr SamahoNote Added: 0004864
2012-09-30 09:30FritsNote Added: 0004870
2012-09-30 10:19Torr SamahoNote Added: 0004873
2012-09-30 10:19Torr SamahoStatusnew => feedback
2012-09-30 10:58Player701Note Added: 0004876
2012-09-30 10:58Player701Statusfeedback => new
2014-06-12 20:28WatermelonNote Added: 0009164
2014-06-12 20:28WatermelonStatusnew => feedback
2014-06-15 10:53Player701Note Added: 0009366
2014-06-15 10:53Player701Statusfeedback => new
2014-06-15 14:11WatermelonNote Added: 0009374
2014-06-15 14:11WatermelonStatusnew => feedback
2014-06-19 10:29Player701Note Added: 0009593
2014-06-19 10:29Player701Statusfeedback => new
2017-02-04 23:40jdagenetNote Added: 0016751
2024-03-01 19:55Ru5tK1ngNote Added: 0023193
2024-03-01 19:55Ru5tK1ngStatusnew => closed
2024-03-01 19:55Ru5tK1ngResolutionopen => no change required

Notes
(0004842)
Player701   
2012-09-29 14:35   
Whoops, sorry, I didn't know the exact function of the "~" character here.
(0004844)
Torr Samaho   
2012-09-29 17:44   
4x resizing needs loads of memory and the memory usage will increase with each new texture / sprite you see. It's possible that you simply don't have enough memory for this feature. If there are enough textures on the map it's possible that you need 1GB RAM or more.
(0004849)
Player701   
2012-09-29 20:31   
My laptop (where the crashes occured) has 4GB RAM, but I think 32-bit apps cannot allocate more than 2GB? When I was playing, at the start Zandronum was using like 200MB of RAM. After approximately three minutes, I looked in task manager and it was using 400MB! Then, each three minutes (or like this) the memory usage was increasing by ~ 200MB. Most likely it reached (or tried to reach) this 2GB point and Zandronum crashed. I don't think it is supposed to continuously increase its memory usage by such a high amount.
(0004864)
Torr Samaho   
2012-09-30 08:27   
I can use the hg resize modes without problems, so this may also be a bug of your GPU driver. Which GPU are you using?
(0004870)
Frits   
2012-09-30 09:30   
I have the same issue. I'm using HQ4X and in maps/wads with lot's of effects (like stronghold) more and more ram is used until ZAN finally starts running at 1 fps. However, alt-enter (going from windowed to full and vice versa) fixes it and ZAN runs fine again.
(0004873)
Torr Samaho   
2012-09-30 10:19   
Frits, which GPU are you using?
(0004876)
Player701   
2012-09-30 10:58   
My laptop's GPU is GeForce GT 540M, IIRC (I don't have it here with me). My friend, who was experiencing high usage of page file, has a GeForce GTS 8800 512MB. We both always use the latest official drivers.
(0009164)
Watermelon   
2014-06-12 20:28   
Check if it happens in gzdoom, if not then report back here
(0009366)
Player701   
2014-06-15 10:53   
Which version of GZDoom should I use for testing?
(0009374)
Watermelon   
2014-06-15 14:11   
Try the absolute latest and see if its fixed
(0009593)
Player701   
2014-06-19 10:29   
I wasn't able to get the very latest GZDoom build to crash.

Zandronum 1.2.1 still crashes though. The easiest way to get it to crash is to load a mapset with lots of new sprites and textures - I used Armageddon 2 Invasion MAP09 for testing and it crashed somewhere in the middle of the map.

High memory usage is clearly seen when using scale4x, independent of the mapset loaded. With "High quality resize mode" turned off, memory usage doesn't go higher than 200 MB; with scale4x enabled, it almost immediately jumps to 300-400 MB, then continuously increases during the gameplay, and eventually Zandronum crashes. It does so even in single-player games.
(0016751)
jdagenet   
2017-02-04 23:40   
I can confirm this is most likely an issue in the setting as opposed to the user's PC. I've been using the high quality resize mode on textures and fonts and after roughly 50 minutes of gameplay in the All Out War server my client crashes with the "failed to allocate" memory error.

My guess is that the resizing of the fonts cause the overflow for me since the texture are static and never change. With the fonts, you have in-game frag messasges, player's chat, menu fonts, etc.
(0023193)
Ru5tK1ng   
2024-03-01 19:55   
Given that the user stated he couldn't get the latest GZDoom to crash (1.8.6) at that time, 3.X should have the same behavior. If someone still has this crash with 3.1 or 3.2, reopen the ticket.