PDA

View Full Version : Memory Leak Info



Robert Hanssen
08-10-04, 04:15
So, I was playing around with Purify (http://www-306.ibm.com/software/awdtools/purifyplus/)some more, and this time set everything to minimal inspection so I actually got 15fps and could zone around a couple times.

I got one error from Purify trying to free an invalid pointer:
[E] FIM: Freeing invalid memory in RtlFreeHeap {1 occurrence}
Address 0x10854008 points into a HeapAlloc'd block in unallocated region of the default heap
Location of free attempt
[C:\WINDOWS\system32\NTDLL.dll ip=0x6C9013E8]
[C:\WINDOWS\system32\GDI32.dll ip=0x77F21604]
[C:\WINDOWS\system32\GDI32.dll ip=0x77F29B1F]
[C:\WINDOWS\system32\GDI32.dll ip=0x77F2976D]
[C:\WINDOWS\system32\GDI32.dll ip=0x77F2180C]
[C:\WINDOWS\system32\GDI32.dll ip=0x77F2178D]
[C:\WINDOWS\system32\GDI32.dll ip=0x77F216D0]
[C:\WINDOWS\system32\GDI32.dll ip=0x77F216BF]
[C:\Program Files\neocron2\gamebase.dll ip=0x00575739]
??? [C:\Program Files\neocron2\Client.exe ip=0x0043A059]

The other thing was the potential memory leak again in d3d9drv.dll. Rational defines a potential memory leak as this:

There are no pointers to the start of the block, but there appear to be pointers pointing somewhere within the block. In order to free this memory, the program must subtract an offset from the pointer to the interior of the block. In general, you should consider a potential leak to be an actual leak until you can prove that it is not by identifying the code that performs this subtraction.

[ I ] MPK: Potential memory leak of 11997952 bytes from 1220 blocks allocated in DebugSetLevel [d3d9.dll]
Offset 0x0000002d referenced by 0x093e71c3, a location in a Global/LocalAlloc'd block
Distribution of potentially leaked blocks
3481760 bytes from 5 blocks of 696352 bytes (first block: 0x0fb90030)
2359872 bytes from 18 blocks of 131104 bytes (first block: 0x08cfdac8)

<snip>
88 bytes from 2 blocks of 44 bytes (first block: 0x00154958)
84 bytes from 1 block of 84 bytes (0x0016a220)
80 bytes from 2 blocks of 40 bytes (first block: 0x00198850)
68 bytes from 1 block of 68 bytes (0x00154568)
Allocation location
[C:\WINDOWS\system32\KERNEL32.dll ip=0x6C801DBC]
DebugSetLevel [C:\WINDOWS\system32\d3d9.dll]
DebugSetLevel [C:\WINDOWS\system32\d3d9.dll]
DebugSetLevel [C:\WINDOWS\system32\d3d9.dll]
DebugSetLevel [C:\WINDOWS\system32\d3d9.dll]

So, if you guys want, send me an NDA and a set of debug DLLs and I'll be more than happy to run this again with line numbers ;)

Attached is the results of the full run for your perusal. I logged in to TS HQ, walked around a bit, zoned out, looked in my inv, moved something from my gogo, down and up a lift and in and out of the lvl1 sewers, then F4'd.

nEo-1664
08-10-04, 04:28
nice. I hope for KK's benefit they take on board, and let the community help the game in this way lol. Hell, why not?

40$Poser
08-10-04, 05:03
keep it up dude, good to see someone is at least looking into one of the more wider known, annoying, and potentially turning off of new people issues.

hegemonic
08-10-04, 07:14
Also a big Thank You for looking into this.

I hope KK is watching and uses your information to make the game better.

__bigs__

CoDi
08-10-04, 14:57
Don't Alt+F4, try to log out and exit the game the regular way. I cannot guarantee :rolleyes: that everything's cleaned up correctly when closing the game with Alt+F4.

We have our own small memory leak tracking library, and atm I'm only aware of a bug which seem to fail to release some main menu resources now and then.

The d3d9drv.dll memory problem is a little more... complicated.

[D]est
08-10-04, 16:27
YOU CAN DO IT!



Can you? :confused:


It's one of the reasons why im not playing NC2 atm..

Shinto
08-10-04, 16:28
im sure he can


just a shame neocron 1 was a lot better performance wise for me.

NC2 gameplay that chugs aint good.

Robert Hanssen
08-10-04, 18:27
just a shame neocron 1 was a lot better performance wise for me.


Switch to the DX7 driver, and it should be the way it was...

naimex
08-10-04, 18:29
Don't Alt+F4, try to log out and exit the game the regular way. I cannot guarantee :rolleyes: that everything's cleaned up correctly when closing the game with Alt+F4.

We have our own small memory leak tracking library, and atm I'm only aware of a bug which seem to fail to release some main menu resources now and then.

The d3d9drv.dll memory problem is a little more... complicated.

alt+tabbing causes 99 % risc of FREs and it doesnt free up memory until i close client.exe manually from process window.

for me that is..

QuantumDelta
08-10-04, 18:32
Don't Alt+F4, try to log out and exit the game the regular way. I cannot guarantee :rolleyes: that everything's cleaned up correctly when closing the game with Alt+F4.

We have our own small memory leak tracking library, and atm I'm only aware of a bug which seem to fail to release some main menu resources now and then.

The d3d9drv.dll memory problem is a little more... complicated.
On my Radeon 9600 Pro, I seem to (most of the time) error on esc, next time I do, I'll grab a callstack.

--
Alt-F4ing seems to be fine with my RAM....( I only say this because I can jump into a Doom3 game almost immediately after alt-f4ing NC2.... no FPS Problems over the normal 9600 Pro melting :p )

Robert Hanssen
08-10-04, 18:35
Don't Alt+F4, try to log out and exit the game the regular way. I cannot guarantee :rolleyes: that everything's cleaned up correctly when closing the game with Alt+F4.

We have our own small memory leak tracking library, and atm I'm only aware of a bug which seem to fail to release some main menu resources now and then.

The d3d9drv.dll memory problem is a little more... complicated.

I'll try to log out normally. After zoning a couple times things really started to bog down.

What are my chances of getting a set of debug DLLs? Slim or none? :)

Is the 'd3d9 memory leak' not really a memory leak, but simply loading lots of meshes/textures over time? Personally, I haven't had many problems with this (then again, I do have 1.5GB RAM), I've just been seeing lots of GPFs lately and THAT's what I'm more concerned with.

MrChumble
08-10-04, 18:40
I'm not sure if this is related to the memory leak or not, but if I go into wastelands then hack a GR back into hacknet my fps drop to ~20 (from 76) and turning around goes very jerky. It happens every time, but going into hacknet from an inside location causes no problems. Relog fixes the problem.

[D]est
08-10-04, 19:57
CAnt you play NC2 with dx7 instead of dx9? ANd should it fix the leaks?

Dribble Joy
08-10-04, 19:59
I don't see why they cannot go back to the drivers/dlls/files/whatever that they had in closed beta and then try to apply the changes they have made again.

notneo
08-10-04, 20:05
i lose about 20-50 mb of memory per zone/gr sync
-start of with about 380 mb free

KRIMINAL99
08-10-04, 22:53
My free memory is usually 0 but my total memory goes constantly down when I am in a zone with a lot of people. Could be when new models are loaded.

naimex
08-10-04, 22:55
My free memory is usually 0 but my total memory goes constantly down when I am in a zone with a lot of people. Could be when new models are loaded.

If I have to give my best guess, I would say it just keeps stacking on the different textures and skins, instead of replace them in the memory..

but of course, if it had to replace it instead of just add onto, it "COULD" take longer time to synch, and I do believe thatīs not what the community want.

Shinto
08-10-04, 23:05
dunno if this is related to whats been said, but anyone suffer from a sudden slow down when you fire CS first time you pull it?

naimex
08-10-04, 23:06
dunno if this is related to whats been said, but anyone suffer from a sudden slow down when you fire CS first time you pull it?

I havent noticed any..

Shinto
08-10-04, 23:08
man this is fucking shite, theres no way im gonna be able to continue playing this game between c2p and all the problems in game im having :(

BinaryData
09-10-04, 03:42
yes there is definitely a leak or something.

I start of with 500MB of free memory and it runs fine for a while, then when it gets down to < 100 I start to chug a LOT!!!! Also I notice that my HD light starts going on a lot more so I would imagine it is getting to my Swap memory. And I have a Gig of memory, so that just aint right o_O

hegemonic
09-10-04, 07:31
dunno if this is related to whats been said, but anyone suffer from a sudden slow down when you fire CS first time you pull it?
Yes. Same thing with my tank.
You are not alone :)

Argent
09-10-04, 12:06
Don't Alt+F4, try to log out and exit the game the regular way. I cannot guarantee :rolleyes: that everything's cleaned up correctly when closing the game with Alt+F4.

Some people have to alt-f4. I for one, if I log out normally it's a 99% change that next time I log in I'll be in the evil "blank sync" (and it usually needs 2-3 relogs to correct). Then again, if I use alt+f4, I encounter blank sync only once in a while.

Ryman
09-10-04, 15:25
How comes when i log in i have like 450/2000 memory ?

them after zoning etc it goes to about 2/1700 ? then i cant do anything

Xian
09-10-04, 15:45
dunno if this is related to whats been said, but anyone suffer from a sudden slow down when you fire CS first time you pull it?

Happens to me with any weapon that has any sort of graphical decency (i.e not a force weapon), and will happen sporadically in the middle of a fight. It's extremely annoying and has made PvP/PvM impossible for me, thus making it pointless for me to log in at all.

I logged in the other day sitting on top of a TG tank, starting out with 248MB free memory. After a lag spike every couple of seconds which occur when my free memory goes down in massive chunks (normally during weapon fire), I was dead, with 2MB to spare. Great fun. o_O

Shinto
09-10-04, 22:14
Happens to me with any weapon that has any sort of graphical decency (i.e not a force weapon), and will happen sporadically in the middle of a fight. It's extremely annoying and has made PvP/PvM impossible for me, thus making it pointless for me to log in at all.

I logged in the other day sitting on top of a TG tank, starting out with 248MB free memory. After a lag spike every couple of seconds which occur when my free memory goes down in massive chunks (normally during weapon fire), I was dead, with 2MB to spare. Great fun. o_O
man sounds like me mate, its depressing tbh as i really wanna play now as well :(

if i win at PvP its pure luck or the other player was really skill-less cos of the problems im having

Opar
09-10-04, 22:25
I usually have 200 mb / 1024 mb memory free..... I think.

___T-X____
10-10-04, 00:44
lol, I just use RamBooster on XP, works a treat since xp wont release ram used in NC.

get it from www.download.com