Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Gunz Graphic Memory Leaks?

Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
Hey Ragezone,
I found out that if i keep my client running, after 2~3 hours it crashes.

First, I saw in the Task Manager that every second the memory usage of the Gunz.exe proccesses is increased infinitly (until the crash).

Then, I tried to debug which part of the code causes this thing, and found out that it is related to the graphic engine that in the end calls to 'MWidget::OnDraw' infinitly.

More Info:

The function RRun() in RFrameWork.cpp calls in infinite loop to g_App.OnDraw();
which calls to Mint::GetInstance()->Draw();
which calls to m_pMainFrame->Draw(pDC);
And this Draw function above (in MWidget.cpp) calls to OnDraw()

When I tried to delete this call to OnDraw() just for testing, I found out that the memory leak is gone!
but of course also the game interface is gone and the screen becomes black - because nothing is renedered anymore.

My questions are:
1. how should i fix it?
2. is it a common issue with Gunzclients?
3. how can i keep render the screen infinitely without causing a memory leak which leads to a crash in the end?

The person who helps will get a kind gift (represented as a code haha)

Thanks!
 
Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
Custom source im working on, im not sure what is it based on but i compared the code flow that i mentioned above to few other sources and it looks exactly the same..
 
Upvote 0
I'm retired, I'm already
Banned
Joined
Oct 3, 2011
Messages
832
Reaction score
155
You should not bother with that, we are in 2021 and everyone must have a nasa PC, on my PC I open up to 15 gunz clients at the same time and it does not cause me lag.

Answering your question because I have a friend who knows about that topic and I think I managed to lower the performance of gunz.
 
Upvote 0
Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
jorklenis i agree that the memory amount is not an issue, but the thing i want to solve is that it leads to a client crash after few hours if being openned.
 
Upvote 0
Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
Yes i tried on windows 10 and windows XP, it happens on both of them so its probably not related to the OS or the PC

Vs2019
 
Last edited by a moderator:
Upvote 0
Junior Spellweaver
Joined
Aug 26, 2020
Messages
145
Reaction score
18
LoL? my source is about 12-19 VS. and there is no problem about crashing or something increasing from memory.

I have both. You think every source that compiling from 2012 to 2019 vs is cause like that are you kidding me?
 
Last edited by a moderator:
Upvote 0
Experienced Elementalist
Joined
May 12, 2014
Messages
260
Reaction score
61
Try to place the original interface, in case you have an xml error that is creating an infinite error, it has happened to me a few times when I edit the configuration.xml and then the interface gets slow, it can also be a programming error, or structure of the functions, bad destruction of the elements that continue to be created despite the fact that it is no longer in the area where they are needed, that's why mint2 is badly built, the truth is I want to stop prescribing it
 
Upvote 0
Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
Updating that compiling with vs2012 instead of vs2019 did not change anything (of course)
but i had to test it..
 
Upvote 0
Experienced Elementalist
Joined
May 12, 2014
Messages
260
Reaction score
61
That would not have to be the problem, you have tried another source, a clean one, updating is nothing to write home about if you have basic programming knowledge, by the truth you just have to accommodate pure stupidities xddddxdxdxdxd
 
Upvote 0
Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
i tried original interface now and it didnt help. what else do you recommend me to check?
 
Upvote 0
Experienced Elementalist
Joined
May 12, 2014
Messages
260
Reaction score
61
I did not know how to tell you, if you do not touch this, what could it be, in visual stuido it has a debug function that lets you see how much ram the functions are consuming, for me this is a problem when touching the mint2, to add something, it happened when I wanted to obtain the soruce using override
 
Upvote 0
Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
Switching source every time you cant solve a single problem will lead to nowhere.
i work on this source for months, and im sure that like i solved anything else, i will also solve this issue.
but it might take time to debug. just wondered if someone else have struggled with such a thing and got any conclusions :)
 
Upvote 0
Junior Spellweaver
Joined
Apr 18, 2009
Messages
163
Reaction score
3
YEAH I FKNG FOUND IT :)
in some of my features, just for testing, i added to MDrawContextR2::Text code that allocates a new char array and duplicates the received text to it. this new array were not used, and i forgot to delete it after i finished with my testings.

thanks for everyone for trying to help :)

SOLVED!
 
Upvote 0
Back
Top