View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001573 | Spring engine | Gfx driver issues | public | 2009-08-22 22:10 | 2010-02-16 21:18 | ||||
Reporter | mr_spuck | ||||||||
Assigned To | imbaczek | ||||||||
Priority | normal | Severity | block | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 0.80.2.0+git | ||||||||
Target Version | 0.81.0.0 | Fixed in Version | 0.81.0.0+git | ||||||
Summary | 0001573: Memory leak when drawing queue lines | ||||||||
Description | Since alwaysDrawQueue was enabled by default the game started leaking huge amounts of memory whenever I have a moving unit selected. Around 2mb per second, which kills the game pretty fast. I can also reproduce it by disabling alwaysDrawQueue, selecting a moving unit and holding down shift. It seems to have something to do with the LineDrawer class. The only way I can stop it without completely disabling the line drawing is by commenting out the the glColor4fv calls in CLineDrawer::DrawLine. That turns the queue lines white. Odd that just changing the color could cause this ..I don't really know GL that well though. I'm on 64bit Arch linux RadeonHD 3200 catalyst 9.8 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
||||||
|
![]() |
|
mr_spuck (reporter) 2009-08-22 22:13 |
Oh right .. I've only played with BA. I've seen the issue with 6.96 and 7.0 |
tvo (reporter) 2009-08-22 22:23 |
Not (yet) been able to reproduce here (with nvidia card), memory usage seemed constant. May be driver bug, in particular if just commenting out the glColor4fv calls makes the problem go away. |
Auswaschbar (reporter) 2009-08-23 00:57 |
Me neither (gentoo 64bit, nvidia) |
mr_spuck (reporter) 2009-08-23 11:19 |
I don't have an Nvidia card handy, so can't really verify that it's a driver thing. Maybe somebody else will pop up with this problem on AMD. The best I could try would be slightly older driver versions or the open drivers.. not sure if they can run the game yet though. |
imbaczek (reporter) 2009-08-23 20:28 Last edited: 2009-08-23 20:31 |
i can confirm 1-2MB/s leak. (4850, 9.8 catalyst). enabling/disabling queue drawing doesn't always trigger it, though. maybe related to PBO? |
mr_spuck (reporter) 2009-08-24 15:17 |
I think I saw it with PBO on and off. It's most likely a driver bug. I just went through a couple of catalyst versions. 9.6 no leak but bad flickering 9.7 no leak 9.8 leaks I guess it's a coincidence that the bad driver release and alwaysDrawQueue change happended around the same time. Would still be interesting to know what exactly triggers it. My workaround works for me but it's not really a solution. |
mr_spuck (reporter) 2009-08-24 15:49 |
Disabling shadows also stops the leak. I just noticed that shadows aren't actually drawn when they are enabled. |
mr_spuck (reporter) 2009-08-27 21:35 |
After a system lockup that wiped my spring config this doesn't happen anymore. So maybe I had some bad combination of options. Toggling shadows also works again. |
imbaczek (reporter) 2009-08-30 21:13 Last edited: 2009-08-30 21:24 |
i messed about and i could toggle leaking with /water 1 and /water 3, ie. reflective and optionally refractive. /water 0 and /water 2 didn't leak. will test more. edit: played a bit more and i definitely can link /water 1 and /water 3 with huge memleaks. |
Kloot (developer) 2009-08-30 22:04 |
I can't (8800GT), and I grow tired of catering to every driver issue with yet-another-ATI-hack. |
imbaczek (reporter) 2009-08-31 18:47 |
hey, you can be only tired, it is me who is actually hurting ^^ i'll see what i can do. |
General Failure (reporter) 2009-09-10 05:25 |
I seem to have a related problem on Ubuntu hardy with ATI Mobility Radeon X1400, driver version 8.47.3, OpenGL version string: 2.1.7412. To trigger it, I just need to have a number of queue lines displayed. When the queue lines disappear (either by releasing shift if alwaysDrawQueue is off, or by switching unit), everything else becomes invisible, including all buildings, units, icons on the map, interface widgets and the mouse cursor. Only the terrain and the map remain. Moving the mouse around blindly and listening to the sound effects, I've made sure that Spring is still fully responsive; it's purely a visualization problem. I have reasons to believe this is a different manifestation of the same driver bug. No shocking news so far. Now here comes the interesting part: commenting out stipplePattern 0xffcc stippleFactor 1 stippleSpeed 1.0 completely makes the problem go away. This is interesting because it can be offered to users as a quick fix that doesn't involve modifying the code and recompiling Spring. Also, one could put a piece of code in a future version that disables "stippling" if an ATI driver is detected (I have seen other software doing the same thing, that is, disabling certain graphical features when detecting an ATI card). Oh yeah, for the record, I can reproduce this in Spring versions 0.76b1, 0.78.2.0 and 0.80.4.1. Compiling 0.80.4.1 was one of my worst compilation experiences ever but I'll open another bug report on that. |
jK (developer) 2009-09-10 06:56 |
@General Failure sounds as you don't have atiHacks enabled |
General Failure (reporter) 2009-09-10 15:20 |
@jK, I do have AtiHacks=1 in my ~/.springrc file. That does enable atiHacks, doesn't it? Oh yeah, I found a thread on the issue. Seems there's multiple people experiencing it, and not only in Linux. http://springrts.com/phpbb/viewtopic.php?f=20&t=17033&p=330168 BTW, I also tried a few mods. Most of them are affected (although it's not always as easy to trigger). |
imbaczek (reporter) 2010-02-13 13:22 |
this still exists as of master and 10.1 ati drivers. |
imbaczek (reporter) 2010-02-13 15:59 |
after 5b20216d624, memory leak still happens, but to make it happen, you need to select something that's displayed as an icon (ie. be zoomed out enough.) |
imbaczek (reporter) 2010-02-14 11:28 |
pinpointed this issue to drawing lines in immediate mode. now converting line drawer to vertex arrays. |
imbaczek (reporter) 2010-02-16 21:18 |
this should be fixed now. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2009-08-22 22:10 | mr_spuck | New Issue | |
2009-08-22 22:13 | mr_spuck | Note Added: 0003972 | |
2009-08-22 22:23 | tvo | Note Added: 0003973 | |
2009-08-23 00:57 | Auswaschbar | Note Added: 0003974 | |
2009-08-23 11:19 | mr_spuck | Note Added: 0003978 | |
2009-08-23 20:28 | imbaczek | Note Added: 0003979 | |
2009-08-23 20:28 | imbaczek | Severity | major => block |
2009-08-23 20:31 | imbaczek | Note Edited: 0003979 | |
2009-08-24 15:17 | mr_spuck | Note Added: 0003992 | |
2009-08-24 15:49 | mr_spuck | Note Added: 0003993 | |
2009-08-27 21:35 | mr_spuck | Note Added: 0004007 | |
2009-08-30 21:13 | imbaczek | Note Added: 0004036 | |
2009-08-30 21:24 | imbaczek | Note Edited: 0004036 | |
2009-08-30 22:04 | Kloot | Note Added: 0004038 | |
2009-08-31 18:47 | imbaczek | Note Added: 0004046 | |
2009-09-10 05:25 | General Failure | Note Added: 0004096 | |
2009-09-10 06:56 | jK | Note Added: 0004097 | |
2009-09-10 15:20 | General Failure | Note Added: 0004101 | |
2009-10-03 10:46 | imbaczek | Target Version | => 0.81.0.0 |
2009-11-09 20:30 | tvo | Category | General => Gfx driver issues |
2009-11-30 12:47 | Auswaschbar | Relationship added | has duplicate 0001736 |
2010-02-13 13:22 | imbaczek | Note Added: 0004655 | |
2010-02-13 15:59 | imbaczek | Note Added: 0004656 | |
2010-02-13 17:42 | imbaczek | Status | new => confirmed |
2010-02-14 11:28 | imbaczek | Note Added: 0004658 | |
2010-02-16 21:18 | imbaczek | Note Added: 0004666 | |
2010-02-16 21:18 | imbaczek | Status | confirmed => resolved |
2010-02-16 21:18 | imbaczek | Fixed in Version | => 0.81.0.0+git |
2010-02-16 21:18 | imbaczek | Resolution | open => fixed |
2010-02-16 21:18 | imbaczek | Assigned To | => imbaczek |