User forums > General (but related to Code::Blocks)

Crashing on editor

<< < (3/4) > >>

awsdert:
Found the cause, it was the parser. I noticed after opening a project it started a thread for the parser so I tried turning off process complex macros and it stopped freezing.

On another note why are threads doing the job of something that should be passed to an executable?
An executable can write the info to a temporary file that the thread can then read WITHOUT freezing up.
Can just use a simple bool at start of each file to confirm weather it is ready for thread to use, in mean time thread can use old file.
E.g.
parser.exe FILE_PATH~parserINDEX~
where INDEX refers to 0 - 9 (when hit 9 just reset to 0)
parserThread:

--- Code: ---FILE *useParserFile = oldParserFile;
// oldParserFile will use INDEX - 1 or 9 if INDEX = 0
bool nxtParser = false;
fseek( nxtParserFile, 0, SEEK_SET );
fread( nxtParserFile, &nxtParser, 1, 1 );
if ( nxtParser )
  useParserFile = nxtParserFile;
if ( !useParserFile )
  return;
// Continue as normal

--- End code ---

ollydbg:
Hi, awsdert, thanks for the research. If the parser (thread) get crashed, then the whole C::B process get crashed. So, I think it it better to fix the bug in the parser (thread), especially in handling macro expansion. Because there are a lot of recursive calls when we do the macro expansion when you have “handle complex macros" option enabled.

Can you supply a simple project which can lead the crash? Thanks.


awsdert:
This is a project I only just recently started and it crashed on that one (let alone my custom framework project), it should be small enough.

ollydbg:

--- Quote from: awsdert on April 22, 2014, 08:42:01 am ---This is a project I only just recently started and it crashed on that one (let alone my custom framework project), it should be small enough.

--- End quote ---
It does not crash on my computer. I see that your project use MSVC compiler, but I don't have such compiler in my computer. I guess the parser hangs when it try to parse the header files from your MSVC compiler suite. I'm not sure how to help you further, since I don't have those include files from MSVC.  :-[

awsdert:
Why not install VS2013, copy the VC folder elsewhere, uninstall VS and use the copied folder?

Edit:  Just retried the complex macro setting and CB didn't freeze, perhaps it had something todo with my global paths? but if so the parser should have recognised that and skipped them. Seems I've lost a step somewhere that caused the parser to freeze the ui, but it is definitely safe to say part of the problem lies in the parser because th ui only ever freezed when I opened a file or click somewhere on a pre-opened file.

Edit: Deliberately broke VC tool chain path and there was no freeze either, dunno what else the missing step could be.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version