Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

HUGE MEMORY LEAK pinpointed!

<< < (17/21) > >>

Der Meister:
No, I had no problem with your first version of the patch. I never tested your changed versions.
But I only did a rather small check: Starting Code::Blocks, loading the Code::Blocks workspace, waiting until the parser finished and then closing Code::Blocks. This worked. After that I did the same procedure in valgrind to check whether the memory leak was really gone.

I just did another quick test: Opening and closing several projects without waiting for the parser to finish its work. No crash. But still I use revision 4161 with the first version of your patch on Linux.

rickg22:

--- Quote from: thomas on June 25, 2007, 04:54:51 pm ---
Something is not good with that, I think... I am getting access violations at startup from within BackgroundThread::Entry with r4170 now, but only if CC is enabled, and if I had a project open when closing Code::Blocks in the previous session.
I'm not sure what it is (something being deleted too early?), but it's strange, and it didn't happen before...  :(

--- End quote ---

I confirm, it happened to me only once - 1 or 2 days ago. But I couldn't reproduce it :(. Perhaps it had something to do with some changes i did to CC parsing startup (I don't use a timer anymore). But it's strange indeed (The other times I get segfaults are if i close / open projects TOO FAST and/or close the app before the parser finishes, but i have to be real quick to get them and doesn't happen always).

With Revision 4168 (without the patch applied) I couldn't reproduce the backgroundthread crash. Thomas, can you confirm that the crash does NOT occur if the patch is _NOT_ applied? (i.e. changing it like it was)

Another test: Apply the patch to revision 4163 (before my changes) and test.

I'll test tonight, since i only have 4168 in my machine.
BTW... i have the hunch it has to do with building the class browser. Thomas, here's a quick test. Comment the part that invokes the building of class browser, and see if the crash remains.

EDIT: The code belongs to the loader, not the class browser (class browser is wxThread,not Backgroundthread). Thomas, I recall you saying that you added a Delete part to BackgroundThread, right? Perhaps this new part is the cause of the conflict? i.e. trying to delete something that isn't there, or not initializing the deleted field correctly?
Also, a stack log (codeblocks.RPT) could help.

rickg22:

--- Quote from: thomas on June 25, 2007, 04:54:51 pm ---...but only if CC is enabled,

--- End quote ---

with CC you mean the plugin, or the code completion functionality ONLY?

thomas:
The plugin.

Steps to reproduce:
1. load Code::Blocks
2. click on codeblocks.cbp on the start here page to open it
3. wait a few seconds
4. close Code::Blocks
5. load Code::Blocks ---> access violation
6. load Code::Blocks ---> works fine
7. try (6) any number of times ---> works fine
8. try again from step (2) ---> access violation

Disable the CC plugin, and there is never any crash.

I've been using r4120 before, and never had any visible issues.

rickg22:
Thanks, I'll test it tonight. OH, btw, can you post a copy of codeblocks.RPT here?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version