Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
MervBot Memory-Leak Checking
Goto page Previous  1, 2
 
Post new topic   Reply to topic Printable version
 View previous topic  i need a scoring bot <3 Post :: Post LVZ toggling with mervbot  View next topic  
Author Message
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Mon May 30, 2005 1:25 pm    Post subject: Reply to topic Reply with quote

Cypher used v45 there, heh, maybe that's a difference between v45 and v46? I don't know, v38 was my latest. sa_tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Mon May 30, 2005 1:35 pm    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:
Ok. There are no leaks in the core. (Or at least none that the CRT detected.)


client.cpp
Code: Show/Hide

int _cdecl main(int argc, char *argv[])
{
   /*
      argv[0] Commandline to exe
      argv[1] First argument
   */
      _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
      _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT );
      _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );
      _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT );
      _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );
      _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT );

//...


   _CrtDumpMemoryLeaks( );

   system("PAUSE");
   return 0;
}


Output:
http://cypherjf.sscentral.com/uploads/output2.txt
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Tue May 31, 2005 6:05 am    Post subject: Reply to topic Reply with quote

Which version is this, Cypher?

Does the newest version show any difference?
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Tue May 31, 2005 1:12 pm    Post subject: Reply to topic Reply with quote

It's build 46- the actual plugin src code I use is b45 - however, there is no major differences between these two builds.
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Wed Jun 01, 2005 4:41 am    Post subject: Reply to topic Reply with quote

It seems like many "console" messages are leaking, the messages it puts in the console.
Maybe there's something wrong with that?
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Fri Jun 03, 2005 8:10 am    Post subject: Reply to topic Reply with quote

Let's get our common sense (yes!) to work and find out why it's reporting memory leaks in the core.

In the main function we can find
Code: Show/Hide
   // Create bot database
   BOT_DATABASE botDatabase;


Which will construct botDatabase, now, where does it deconstruct it? sa_tongue.gif

If you'd rename the main function and make an alternative main function which you call the original main function from you will see _CrtDumpMemoryLeaks() doesn't dump anything and return FALSE.

I think this must be a false positive, as MSDN called it.
Back to top
View users profile Send private message Add User to Ignore List
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Fri Jun 03, 2005 3:08 pm    Post subject: Reply to topic Reply with quote

public/static objects are constructed when the app starts and destructed when the app stops. Whether or not the CRT debug functions correctly see this I don't know.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Fri Jun 03, 2005 5:07 pm    Post subject: Reply to topic Reply with quote

I was just saying there is no memory leak detected in MERVBot's core by _CrtDumpMemoryLeaks(). But you have to make sure you call the _CrtDumpMemoryleaks(); after botDatabase was deconstructed, otherwise botDatabase will be seen as a memory leak by it, which it isn't because it will get deconstructed as soon as the main function returns.
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Fri Jun 03, 2005 6:54 pm    Post subject: Reply to topic Reply with quote

Yeah, I guess that really makes sense. Ugg. Again I feel dumb. lol. icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 119 page(s) served in previous 5 minutes.

phpBB Created this page in 0.432670 seconds : 33 queries executed (93.7%): GZIP compression disabled