• Welcome to Valhalla Legends Archive.
 

BNCSutil Memory Problems?

Started by Archangel, March 27, 2005, 06:38 PM

Previous topic - Next topic

Archangel

Well, actually, when connecting with a single cdkey product (not war3) memory goes up to 2,000 kb,  when connecting using warcraft3 memory goes up to like 10,000 kb.

Each time i "reconnect" (SEXP) using BNCSUtil memory never goes down, and goes up by 2,000 kb. Its a problem im causing or a BNCSUtil.dll problem?
I'm not an Addict.

The-FooL

#1
I just tested with my bot(newly implemented BNCS util code).

Connecting via WAR3 causes the jump of over 10k mem vs connection with BNLS.  Every connection with sc/d2 causes a jump of 2,000k (these are cumulative.  Connecting a few times doubles the memory usage).

I am using the NLS_Free and kd_free method, and calling them as soon as the decoding is done/login sequence is finished.  I also noticed that I am getting a handle of zero for the decoder(though it still works).  What is the issue here?

Archangel

Ok, StealthBot Beta got same problem, so i suppose it must be the library.
I'm not an Addict.

UserLoser.

Does BNCSUtil cache all the file data for War3 game files?  Those are quite large, and may be the cause

The-FooL

It must be some sort of memory leak, because the increase is cumulative.

Networks

Quote from: The-FooL on March 27, 2005, 07:02 PM
I just tested with my bot(newly implemented BNCS util code).

Connecting via WAR3 causes the jump of over 10k mem vs connection with BNLS.  Every connection with sc/d2 causes a jump of 2,000k (these are cumulative.  Connecting a few times doubles the memory usage).

I am using the NLS_Free and kd_free method, and calling them as soon as the decoding is done/login sequence is finished.  I also noticed that I am getting a handle of zero for the decoder(though it still works).  What is the issue here?

Oh thank god, I thought I was just a poor programmer. whew, yes Archangel found this out in my moderation bot. I posted about this earlier and thought it got fixed but I guess I just connected using a different client than WAR3. I guess my topic is unresolved then. What ever occurs happens to me.

Archangel

I made test with 3 bots, Vanquish Bot, StealthBot and with one im currently developing. Im waiting for Cloaked answer or fix.
I'm not an Addict.

Kp

Rebuild with debugging symbols (dwarf-2 preferred), and run it in valgrind with --tool=memcheck.  Report what line(s) are leaking the memory.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Networks

Quote from: Kp on March 27, 2005, 09:28 PM
Rebuild with debugging symbols (dwarf-2 preferred), and run it in valgrind with --tool=memcheck.  Report what line(s) are leaking the memory.

Wow...I am sorry but I didn't really comprehend that but ok.

MyndFyre

Quote from: Networks on March 28, 2005, 07:55 AM
Quote from: Kp on March 27, 2005, 09:28 PM
Rebuild with debugging symbols (dwarf-2 preferred), and run it in valgrind with --tool=memcheck.  Report what line(s) are leaking the memory.

Wow...I am sorry but I didn't really comprehend that but ok.

What's hard about that statement?

Rebuild the library.  Make sure the compiler/linker emits debugging symbols (a debug build) into the PE file.
Get the utility called "valgrind" and run the program with that utility, using the command line option "--tool=memcheck".

It's English.  Do you speak it?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Arta

Relax. For someone not familiar with those tools and techniques, that advice would probably be rather difficult to follow.

No point in assuming that everyone's an expert :P

Archangel

[quote author=MyndFyre link=topic=11069.msg105976#msg105976

What's hard about that statement?

Rebuild the library.  Make sure the compiler/linker emits debugging symbols (a debug build) into the PE file.
Get the utility called "valgrind" and run the program with that utility, using the command line option "--tool=memcheck".

It's English.  Do you speak it?
Quote

Ok calm down, alot of people dont understand alot of stuff in here, so why being so damn agressive?
I'm not an Addict.

MyndFyre

Quote from: Archangel on March 28, 2005, 01:32 PM
Ok calm down, alot of people dont understand alot of stuff in here, so why being so damn agressive?
Quote from: Arta[vL] on March 28, 2005, 01:23 PM
Relax. For someone not familiar with those tools and techniques, that advice would probably be rather difficult to follow.
To clarify my last statement and then question:

I'm not familiar with the tool "valgrind".  I've never heard of it, nor do I know what it does.  My point was that there is a lot of information in the statement Kp made that you can read and understand if you try to think about the statement, and then there is a lot of implied information.

It's like the other day when I came home early to help my mom out with a party she was getting ready to have.  I told her that I came home to help.  Her response, "Help?  What do you mean, 'help'?"  Well wtf do you think I mean?  If she had thought about the context of the situation and my statement, it would have been pretty clear.  It's hardly an exercise in critical thinking.

Similarly, it's reasonable to expect that Networks would analyze the situation in terms of what Kp was suggesting; I understand if someone doesn't know what debugging symbols are.  However, the rest is quite clear: valgrind is a tool to obtain, and it uses the binary and debugging symbols file to figure out what lines in the source code are causing memory leaks.

Appropriate questions would have been "How do I build with debugging symbols?  What are dwarf-2 symbols, and how are they different?  Where do I get valgrind?"

The question was not meant to be aggressive, and for that, I apologize.  It's just frustrating when people don't try to figure something out.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

iago

I grant you what you said, but you have to admit that Kp goes out of his way to make what he says difficult to understand :P

And, to post a bit back on topic, I'll talk to the guy who wrote BNCSutil tonight and point him to this thread.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Networks

#14
Quote from: MyndFyre on March 28, 2005, 02:05 PM
Quote from: Archangel on March 28, 2005, 01:32 PM
Ok calm down, alot of people dont understand alot of stuff in here, so why being so damn agressive?
Quote from: Arta[vL] on March 28, 2005, 01:23 PM
Relax. For someone not familiar with those tools and techniques, that advice would probably be rather difficult to follow.
To clarify my last statement and then question:

I'm not familiar with the tool "valgrind".  I've never heard of it, nor do I know what it does.  My point was that there is a lot of information in the statement Kp made that you can read and understand if you try to think about the statement, and then there is a lot of implied information.

It's like the other day when I came home early to help my mom out with a party she was getting ready to have.  I told her that I came home to help.  Her response, "Help?  What do you mean, 'help'?"  Well wtf do you think I mean?  If she had thought about the context of the situation and my statement, it would have been pretty clear.  It's hardly an exercise in critical thinking.

Similarly, it's reasonable to expect that Networks would analyze the situation in terms of what Kp was suggesting; I understand if someone doesn't know what debugging symbols are.  However, the rest is quite clear: valgrind is a tool to obtain, and it uses the binary and debugging symbols file to figure out what lines in the source code are causing memory leaks.

Appropriate questions would have been "How do I build with debugging symbols?  What are dwarf-2 symbols, and how are they different?  Where do I get valgrind?"

The question was not meant to be aggressive, and for that, I apologize.  It's just frustrating when people don't try to figure something out.

Rebuild with debugging symbols (dwarf-2 preferred), and run it in valgrind with --tool=memcheck.  Report what line(s) are leaking the memory.

In bold are the only real lines I can fully comprehend. I understood what he was saying. Similarily when your mom says "help!", I understood that this was to help us find where the memory leaks are occuring. The method in which he is explaining is hard to comprehend.

Doing what Kp said isn't go to help us, it's up to Cloaked (ShadyPalm88) to fix it and he probably will be able to understand what Kp stated. =)