Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
HUGE MEMORY LEAK pinpointed!
darthdespotism:
--- Quote from: rickg22 on June 25, 2007, 09:17:12 pm ---
LoaderBase* seems to be the culprit, but having the source line numbers would be better.
Can you do us a favor? On your codeblocks directory, there should be a file called "codeblocks.RPT".
Open it with a text editor and browse to the latest entry. Can you copy and paste the lines here, please? Thanks! :)
--- End quote ---
If I could locate the file I would post it.
Can you guide me to the location with Ubuntu/Linux?
EDIT://
I'll be off for today.
Trying to locate it tomorrow
Ceniza:
Useless to locate it... it's NOT created on *nix, only Windows. The XML file is what you get on *nix.
dmoore:
line 170 of backgroundthread.h causes the problem (delete job), so presumably job is being deleted twice...
--- Code: ---class BackgroundThread ...
ExitCode Entry()
{
AbstractJob* job;
for(;;)
{
semaphore->Wait();
if(die)
break;
job = queue->Pop();
if(job->deleted)
{
delete job;
continue;
}
(*job)();
job->done = true;
if(job->deleted || ownsJobs)
{
****** delete job; // CRASH
}
}
return 0;
};
--- End code ---
The recent svn history for that file might help:
http://svn.berlios.de/wsvn/codeblocks/trunk/src/include/backgroundthread.h?op=diff&rev=0&sc=0
rickg22:
dmoore, if you turn off codecompletion, the crash goes away? Because i hadn't modified that code yet after those changes in LoaderBase were introduced, and there's a part in Code completion that does a Delete( ... ). But then again, what about that crash reported by darthdespotism?
Der Meister:
Well, I don't think that this is the cause for the crash here but I think we have a possible race condition here: After the job has finished and job->done is set to true it is possible to delete the job using AbstractJob::Delete() (which will be called from a different thread). This will set AbstractJob::deleted to true which in case allows the BackgroundThread to delete the job. Now we have two deletes for just one piece of memory.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version