Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
CodeCompletion freezes C::B after project drag'n drop
christobal:
Recently, I have problems loading projects via drag and drop to the workspace. At first it looks like Code::Blocks loads the project just fine (the project is shown in the workspace tree and marked as active project), but then Code::Blocks freezes.
After some research I could find out, that the DoFullParsing routine doesn't exit when a new Parser is created during the "OnProjectActivated" event. It seems that the loop, which handles the parsing of the priority_files does never exit (nativeparser.cpp line ~1400).
It looks to me like some kind of race condition, because the problem only arises when:
1. no other project has been loaded before
2. the project exceeds a certain size (maybe filenumber, option settings etc. I can't really tell...)
If a project is loaded from the "recent project list", everything works just fine.
How to reproduce:
1. Start Code::Blocks (Win32 svn rev. 7694)
2. Drag and Drop the CodeBlocks.cbp file to the empty Default Workspace
Can anyone confirm this?
AndyJ:
I've seen this quite often going back some while now. I even reported it here:
http://forums.codeblocks.org/index.php/topic,13766.msg95051.html#msg95051
Andy
MortenMacFly:
--- Quote from: christobal on January 16, 2012, 05:11:13 pm ---How to reproduce:
1. Start Code::Blocks (Win32 svn rev. 7694)
2. Drag and Drop the CodeBlocks.cbp file to the empty Default Workspace
--- End quote ---
--- Quote from: AndyJ on January 16, 2012, 05:37:07 pm ---http://forums.codeblocks.org/index.php/topic,13766.msg95051.html#msg95051
--- End quote ---
I cannot confirm both, this is just working fine for me on Windows. I tried several times, re-starting C::B in between. I even tried with a complete C::B workspace, so having ~80 projects, including the core project.
ollydbg:
--- Quote from: christobal on January 16, 2012, 05:11:13 pm ---Recently, I have problems loading projects via drag and drop to the workspace. At first it looks like Code::Blocks loads the project just fine (the project is shown in the workspace tree and marked as active project), but then Code::Blocks freezes.
--- End quote ---
Sometimes, My C::B hangs when loading a large project. But it has a very low happening rate, maybe 1%.
--- Quote ---After some research I could find out, that the DoFullParsing routine doesn't exit when a new Parser is created during the "OnProjectActivated" event. It seems that the loop, which handles the parsing of the priority_files does never exit (nativeparser.cpp line ~1400).
--- End quote ---
DoFullParsing() function just prepare a full parsing (the function name "DoFullParsing" it not quite good I think), it add many thread tasks, and real parsing is done in other working threads. So, I think there are some bugs, but those bugs are hard to track. I don't think we have a good way to debug all the parsing threads.
christobal:
I solved my problem by renaming default.conf and let Code::Blocks create a new one. The old file has grown over the years up to roughly 550 kB :o. After that I started to play with my old one to figure out which entry made Code::Blocks misbehave, but I couldn't detect any entry in particular. It seems to me that the whole plugin loading process is getting unstable if a certain amount of data has to be loaded from the default.conf.
I figured that the Header Fixup plugin is responsible for about 75% of the default.conf data. The project loading worked again after I removed the <HeaderFixup> section in the default.conf. Alternatively the deactivation of the plugin did also work. I will deactivate it for now because I have no use for it anyway...
This workaround is of course no solution, but maybe you could figure out what's wrong. I'm happy to test any patches.
Navigation
[0] Message Index
[#] Next page
Go to full version