User forums > Help
crash while parsing source files
Jenna:
--- Quote from: jarro_2783 on April 07, 2009, 01:25:15 am ---www.cse.unsw.edu.au/~jarrydb/tl-0.1.4.tar.bz2
on 64 bit it seems to be crashing in RemoveToken, my 32 bit computer doesn't say anything useful in the backtrace.
change include/tl/types.hpp and save it and it should crash.
You will probably need boost 1.38 as from last time.
--- End quote ---
I just downloaded your project, and will have a look into it later.
Jenna:
Try the following patch and remove the comments around parent < 0 in TokenExists(...), that means revert the patch posted before:
--- Code: ---Index: src/plugins/codecompletion/parser/token.cpp
===================================================================
--- src/plugins/codecompletion/parser/token.cpp (Revision 5519)
+++ src/plugins/codecompletion/parser/token.cpp (Arbeitskopie)
@@ -598,7 +598,14 @@
// Step 4: Remove descendants
nodes = oldToken->m_Descendants; // Copy the list to avoid interference
for(it = nodes.begin();it!=nodes.end(); it++)
+ {
+ if(*it == idx) // that should not happen, we can not be our own descendant, but in fact that can happen with boost
+ {
+ Manager::Get()->GetLogManager()->DebugLog(_T("Break out the loop to remove descendants, to avoid a crash. We can not be our own descendant !!"));
+ break;
+ }
RemoveToken(*it);
+ }
// m_Descendants SHOULD be empty by now - but clear anyway.
oldToken->m_Descendants.clear();
--- End code ---
We seem to run in an endless recursive call of RemoveToken as you can see on the call-stack if it crashes.
It tries to remove the same Token over and over (same idx).
And so most likely corrupting our memory.
Why this only happens on 64-bit, I don't know.
jarro_2783:
it appears to work now, thanks.
MortenMacFly:
--- Quote from: jens on April 07, 2009, 07:35:19 am ---Try the following patch and remove the comments
--- End quote ---
--- Quote from: jens on April 07, 2009, 07:35:19 am ---Try the following patch
--- End quote ---
I got another example that (Jens: as discussed) probably has the same root. Luckily it's way simpler and smaller that boost. ;-)
Attached is a project that consists just of header files. For me (on Windows) if I do:
- open any of these files
- change something (I do space + delete all the time - so I *don't* change content)
- save
- change again something like above
- save again
--> C::B crashes.
It seems probably be to be related to:
- the folder structure and the class "C" appearing in different namespaces
- the live parser...?!
Strangely it happens only at the second save to me.
[attachment deleted by admin]
Jenna:
--- Quote from: MortenMacFly on April 19, 2009, 02:38:23 pm ---Strangely it happens only at the second save to me.
--- End quote ---
For me it happens at first save after the parser has finished for the first time.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version