Bug 269352 - endless loop in CppClassType::toString with template types e.g. from Eigen
Summary: endless loop in CppClassType::toString with template types e.g. from Eigen
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: VHI crash
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 275482 287380 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-25 00:34 UTC by Jean-Nicolas Artaud
Modified: 2012-03-30 14:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Calligra Loading Failed (146.46 KB, text/plain)
2011-03-25 00:34 UTC, Jean-Nicolas Artaud
Details
kDebug output of the loading fails of Calligra (123.73 KB, text/plain)
2011-04-06 18:34 UTC, Jean-Nicolas Artaud
Details
files to reproduce the issue (25.84 KB, application/x-bzip2)
2012-02-16 13:42 UTC, Milian Wolff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Nicolas Artaud 2011-03-25 00:34:45 UTC
Created attachment 58314 [details]
Calligra Loading Failed

Version:           git master (using KDE 4.6.1) 
OS:                Linux

I used kdevelop 4.2 and it worked the first time, and now every time i retry i fails. I removed all config files like .kdevduchain or so...
I made a fullbacktrace of all of this.

Reproducible: Always

Steps to Reproduce:
Open calligra suite c++
Wait 2% of loading.

Actual Results:  
deathlock kdevelop
Comment 1 Milian Wolff 2011-03-29 11:34:47 UTC
this is not a deadlock but maybe an infinite loop. please find out what file is getting parsed (kdebugdialog, language + cpp areas, then launch kdev from cli).
Comment 2 Jean-Nicolas Artaud 2011-04-06 18:34:32 UTC
Created attachment 58642 [details]
kDebug output of the loading fails of Calligra

Only the last lines are interesting.
Everything is providing from kdev* in kdebugdialog.
Comment 3 Milian Wolff 2011-04-08 13:51:27 UTC
it fails to parse this apparently:

/usr/include/eigen2/Eigen/src/Core/DiagonalMatrix.h

can you open just this file in a new session? same problem?
Comment 4 Milian Wolff 2011-04-08 13:52:03 UTC
btw are you sure that your git master is using git.kde.org and not still tracking gitorious?
Comment 5 Jean-Nicolas Artaud 2011-04-08 13:57:06 UTC
Same problem with a new session, even if I remove the calligra.kdev4 file or not.
I have the good git repo as I push code in an official branch.

I'll try to open only /usr/include/eigen2/Eigen/src/Core/DiagonalMatrix.h alone as soon as I'll be on the laptop I have the trouble on.
Comment 6 Milian Wolff 2011-04-08 21:24:37 UTC
personally I cannot reproduce this. using 2.0.15 eigen from http://eigen.tuxfamily.org and I can open it as a kdevelop project without any hang.
Comment 7 Milian Wolff 2011-04-15 12:00:21 UTC
I could reproduce, even with eigen 3 now. You need a file containing this (to make sure Eigen/Dense is parsed as C++...). And make sure the include path is correct.

test.cpp:
#include <Eigen/Dense>


then use e.g. duchainify on it, but twice and with --force-update-recursive. It will sooner or later hang up in CwiseBinaryOp.h (at least for me). It was an endless loop in CppClassType::toString() / declarationId().specialization()).information().applyToIdentifier(id). I'll try to add more information later, just noting this from a machine where I don't have my debug stuff on. I was not able to come up with a fix btw.
Comment 8 Milian Wolff 2011-06-20 12:07:31 UTC
*** Bug 275482 has been marked as a duplicate of this bug. ***
Comment 9 Bart Janssens 2011-06-21 00:07:56 UTC
Just made some crude changes (without understanding what's going on) but it breaks out of the loop. In particular, I don't know what the commented out lines did, and what breaks by removing them. The diffs for kdevelop and kdevplatform:


diff --git a/languages/cpp/cppduchain/cpptypes.cpp b/languages/cpp/cppduchain/cpptypes.cpp
index 04c880d..7485671 100644
--- a/languages/cpp/cppduchain/cpptypes.cpp
+++ b/languages/cpp/cppduchain/cpptypes.cpp
@@ -51,8 +51,9 @@ QString CppClassType::toString() const
 {
   QualifiedIdentifier id = qualifiedIdentifier();
   if (!id.isEmpty()) {
-    if(declarationId().specialization().index())
-      return AbstractType::toString() + Cpp::IndexedInstantiationInformation(declarationId().specialization()).information().applyToIdentifier(id).toString();
+    const QualifiedIdentifier other_id = Cpp::IndexedInstantiationInformation(declarationId().specialization()).information().applyToIdentifier(id);
+    if(declarationId().specialization().index() && other_id != id)
+      return AbstractType::toString() + other_id.toString();
     else
     return AbstractType::toString() + id.toString();
   }


diff --git a/language/duchain/instantiationinformation.cpp b/language/duchain/instantiationinformation.cpp
index dbc236d..da89b40 100644
--- a/language/duchain/instantiationinformation.cpp
+++ b/language/duchain/instantiationinformation.cpp
@@ -46,11 +46,11 @@ QualifiedIdentifier InstantiationInformation::applyToIdentifier(const QualifiedI
   lastId.clearTemplateIdentifiers();
 
   for(uint a = 0; a < templateParametersSize(); ++a) {
-    if(templateParameters()[a].abstractType()) {
-      lastId.appendTemplateIdentifier(IndexedTypeIdentifier(templateParameters()[a].abstractType()->toString(), true));
-    }else{
+//     if(templateParameters()[a].abstractType()) {
+//       lastId.appendTemplateIdentifier(IndexedTypeIdentifier(templateParameters()[a].abstractType()->toString(), true));
+//     }else{
       lastId.appendTemplateIdentifier((uint) oldTemplateIdentifiers.size() > a ? oldTemplateIdentifiers[a] : IndexedTypeIdentifier());
-    }
+//     }
   }
 
   for(int a = templateParametersSize(); a < oldTemplateIdentifiers.size(); ++a)
Comment 10 Olivier.jg 2011-08-17 06:52:30 UTC
Tried millian's snippet and a few other things repeatedly, cannot reproduce this. Can this still be reproduced with master? Does anyone have an easy way to do so?
Comment 11 Jean-Nicolas Artaud 2011-08-17 17:24:48 UTC
I tried tonight to pull the master and compile every thing again, the problem is still exactly the same.
It's not easy I know, so I don't blame, I just answer your question :-)
Comment 12 Milian Wolff 2011-08-27 01:51:11 UTC
Olivier: definitely still an issue and often hit when trying to open projects that depend on Eigen3...

I wonder why you cannot reproduce my issue. Did you follow the exact steps I outlined below?
Comment 13 Milian Wolff 2011-11-23 16:45:56 UTC
*** Bug 287380 has been marked as a duplicate of this bug. ***
Comment 14 Milian Wolff 2011-11-23 16:46:34 UTC
bug 287380 contains four header files which presumable reproduce this issue, lets try to write a unit test!
Comment 15 Milian Wolff 2012-02-16 13:42:26 UTC
Created attachment 68847 [details]
files to reproduce the issue

the files to reproduce, I've furthermore added .kdev_include_paths files and can now easily reproduce the issue using:

cd testinclude
duchainify --verbose -d test.cpp

it will die building the chain for testinclude/polymake/internal/modified_containers.h, more specifically when visiting the very last class in that file:

template <typename Container>
struct default_enforce_features<Container, _reversed, object_classifier::is_constant> {
   typedef Container container;
};

strange though is that it seems *heavily* dependent on what comes before in that file. Even if I remove seemingly unrelated stuff the hang disappears... So we need to do more testing...

The backtrace of the parse thread follows. Note the repeated calls to TemplateDeclaration::instantiate with the same this pointer, I think this is the main culprit/loop.

Thread 6 (Thread 0x7fffdeffd700 (LWP 22493)):
#0  0x00007ffff711e431 in KDevelop::identifierRepository () at /home/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:132
#1  0x00007ffff711e568 in KDevelop::emptyConstantIdentifierPrivate () at /home/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:147
#2  0x00007ffff711ebfc in KDevelop::Identifier::Identifier (this=0x7fffdefb7ae0) at /home/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:355
#3  0x00007ffff711f586 in KDevelop::QualifiedIdentifier::QualifiedIdentifier (this=0x7fffdefb7b40, id="pm::Container", isExpression=true)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:547
#4  0x00007ffff7120f78 in KDevelop::IndexedTypeIdentifier::IndexedTypeIdentifier (this=0x7fffdefb8400, identifier="pm::Container", isExpression=true)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/identifier.cpp:1071
#5  0x00007ffff717f781 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d917c8, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#6  0x00007fffe50d0faa in CppClassType::toString (this=0x7fffd20bc970) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:55
#7  0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d942a2, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#8  0x00007fffe50d0faa in CppClassType::toString (this=0x7fffd20bc2d0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:55
#9  0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d9462c, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#10 0x00007fffe50d0faa in CppClassType::toString (this=0x7fffd20bc080) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:55
#11 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d946a4, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#12 0x00007ffff7148883 in KDevelop::DeclarationId::qualifiedIdentifier (this=0x7fffd24c0be8)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/declarationid.cpp:198
#13 0x00007ffff718b2db in KDevelop::IdentifiedType::qualifiedIdentifier (this=0x7fffd20ba3e8)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/types/identifiedtype.cpp:54
#14 0x00007fffe50d0ebf in CppClassType::toString (this=0x7fffd20ba3d0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:52
#15 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d9471c, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#16 0x00007ffff7148883 in KDevelop::DeclarationId::qualifiedIdentifier (this=0x7fffd24c0c5c)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/declarationid.cpp:198
#17 0x00007ffff718b2db in KDevelop::IdentifiedType::qualifiedIdentifier (this=0x7fffd20bbf78)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/types/identifiedtype.cpp:54
#18 0x00007fffe50d0ebf in CppClassType::toString (this=0x7fffd20bbf60) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:52
#19 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d94794, id=...)
---Type <return> to continue, or q <return> to quit---
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#20 0x00007fffe50d0faa in CppClassType::toString (this=0x7fffd20bbe40) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:55
#21 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d9480c, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#22 0x00007ffff7148883 in KDevelop::DeclarationId::qualifiedIdentifier (this=0x7fffd24c0d44)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/declarationid.cpp:198
#23 0x00007ffff718b2db in KDevelop::IdentifiedType::qualifiedIdentifier (this=0x7fffd20bbd38)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/types/identifiedtype.cpp:54
#24 0x00007fffe50d0ebf in CppClassType::toString (this=0x7fffd20bbd20) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:52
#25 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d94884, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#26 0x00007fffe50d0faa in CppClassType::toString (this=0x7fffd20bd3a0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:55
#27 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d948fc, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#28 0x00007ffff7148883 in KDevelop::DeclarationId::qualifiedIdentifier (this=0x7fffd24c0e2c)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/declarationid.cpp:198
#29 0x00007ffff718b2db in KDevelop::IdentifiedType::qualifiedIdentifier (this=0x7fffd20bd298)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/types/identifiedtype.cpp:54
#30 0x00007fffe50d0ebf in CppClassType::toString (this=0x7fffd20bd280) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:52
#31 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d94974, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#32 0x00007fffe50d0faa in CppClassType::toString (this=0x7fffd20bd160) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:55
#33 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d949ec, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#34 0x00007ffff7148883 in KDevelop::DeclarationId::qualifiedIdentifier (this=0x7fffd24c0f14)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/declarationid.cpp:198
#35 0x00007ffff718b2db in KDevelop::IdentifiedType::qualifiedIdentifier (this=0x7fffd20bd8b8)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/types/identifiedtype.cpp:54
#36 0x00007fffe50d0ebf in CppClassType::toString (this=0x7fffd20bd8a0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:52
#37 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d94a64, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#38 0x00007fffe50d0faa in CppClassType::toString (this=0x7fffd20bdea0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:55
#39 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d94adc, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#40 0x00007ffff7148883 in KDevelop::DeclarationId::qualifiedIdentifier (this=0x7fffd24c0ffc)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/declarationid.cpp:198
#41 0x00007ffff718b2db in KDevelop::IdentifiedType::qualifiedIdentifier (this=0x7fffd20be3d8)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/types/identifiedtype.cpp:54
#42 0x00007fffe50d0ebf in CppClassType::toString (this=0x7fffd20be3c0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cpptypes.cpp:52
#43 0x00007ffff717f769 in KDevelop::InstantiationInformation::applyToIdentifier (this=0x7fffd0d94b54, id=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/instantiationinformation.cpp:50
#44 0x00007ffff7148883 in KDevelop::DeclarationId::qualifiedIdentifier (this=0x7fffd24c1070)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/declarationid.cpp:198
#45 0x00007ffff718b2db in KDevelop::IdentifiedType::qualifiedIdentifier (this=0x7fffd20bd4f8)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/types/identifiedtype.cpp:54
---Type <return> to continue, or q <return> to quit---
#46 0x00007fffe5086f20 in Cpp::CppDUContext<KDevelop::DUContext>::setInstantiatedFrom (this=0x7fffd20be380, context=0x7fffd1c76080, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:519
#47 0x00007fffe5101a7c in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd1b6bca0, source=0x7fffd187e440, context=0x7fffd1c76080, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20b86b0, instantiatedFrom=0x7fffd1c72710, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:597
#48 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1c72740, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#49 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd1c72740, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#50 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#51 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefc3eb0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#52 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefc3eb0, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#53 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20b9a00, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#54 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20b9a00, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#55 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefc5110, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#56 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20b8610, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#57 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#58 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#59 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#60 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefc79f0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#61 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefc79f0, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#62 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20b6110, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#63 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20b6110, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#64 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefc8c50, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#65 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20b61f0, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#66 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
---Type <return> to continue, or q <return> to quit---
#67 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#68 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#69 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefcb530, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#70 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefcb530, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#71 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20b28f0, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#72 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20b28f0, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#73 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefcc790, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#74 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20b18c0, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#75 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#76 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#77 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#78 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefcf070, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#79 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefcf070, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#80 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20ad340, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#81 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20ad340, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#82 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefd02d0, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#83 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20ae130, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#84 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#85 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#86 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#87 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefd2bb0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#88 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefd2bb0, isFinalIdentifier=true)
---Type <return> to continue, or q <return> to quit---
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#89 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20aaf60, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#90 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20aaf60, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#91 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefd3e10, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#92 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20aaf00, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#93 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#94 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#95 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#96 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefd66f0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#97 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefd66f0, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#98 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20aad10, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#99 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20aad10, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#100 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefd7950, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#101 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20a9810, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#102 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#103 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#104 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#105 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefda230, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#106 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefda230, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#107 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20a5de0, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#108 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20a5de0, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#109 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefdb490, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
---Type <return> to continue, or q <return> to quit---
#110 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20a6120, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#111 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#112 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#113 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#114 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefddd70, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#115 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefddd70, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#116 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20a4000, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#117 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20a4000, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#118 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefdefd0, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#119 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd20a2b50, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#120 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#121 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#122 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#123 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefe18b0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#124 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefe18b0, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#125 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd209f060, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#126 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd209f060, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#127 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefe2b10, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#128 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd209f000, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#129 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#130 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
---Type <return> to continue, or q <return> to quit---
#131 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#132 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefe53f0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#133 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefe53f0, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#134 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd209bf10, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#135 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd209bf10, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#136 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefe6650, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#137 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd209bad0, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#138 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#139 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#140 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#141 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefe8f30, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#142 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefe8f30, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#143 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20989a0, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#144 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd20989a0, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#145 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefea190, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#146 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd2098560, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#147 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#148 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#149 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#150 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdefeca70, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#151 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdefeca70, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#152 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd2094a80, identifier=..., position=..., dataType=..., ret=..., 
---Type <return> to continue, or q <return> to quit---
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#153 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd2094a80, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#154 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdefedcd0, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#155 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd2094b40, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#156 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#157 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#158 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#159 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdeff05b0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#160 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdeff05b0, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#161 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd2091d60, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#162 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd2091d60, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#163 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdeff1810, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#164 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd2092010, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#165 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#166 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#167 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#168 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdeff40f0, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#169 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdeff40f0, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#170 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd2089e50, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#171 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd2089e50, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#172 0x00007fffe5105ea5 in DelayedTypeResolver::exchange (this=0x7fffdeff5350, type=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:184
#173 0x00007fffe5101690 in Cpp::instantiateDeclarationAndContext (parentContext=0x7fffd10b49e0, source=0x7fffd187e440, context=0x7fffd208b400, templateArguments=..., 
    instantiatedDeclaration=0x7fffd208a340, instantiatedFrom=0x7fffd208a4d0, doNotRegister=false)
---Type <return> to continue, or q <return> to quit---
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:564
#174 0x00007fffe5104b94 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd208a500, _templateArguments=..., source=0x7fffd187e440, forceLocal=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:1007
#175 0x00007fffe510338b in Cpp::TemplateDeclaration::matchTemplateParameters (this=0x7fffd208a500, info=..., source=0x7fffd187e440)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:793
#176 0x00007fffe51046d1 in Cpp::TemplateDeclaration::instantiate (this=0x7fffd1bfe2c0, _templateArguments=..., source=0x7fffd187e440, forceLocal=false)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/templatedeclaration.cpp:968
#177 0x00007fffe50f67ad in Cpp::FindDeclaration::instantiateDeclaration (this=0x7fffdeff7c30, decl=0x7fffd1bfe290, templateArguments=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:125
#178 0x00007fffe50f791d in Cpp::FindDeclaration::closeIdentifier (this=0x7fffdeff7c30, isFinalIdentifier=true)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.cpp:273
#179 0x00007fffe5090bda in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd10b49e0, identifier=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=...) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:363
#180 0x00007fffe508d078 in Cpp::CppDUContext<KDevelop::DUContext>::findDeclarationsInternal (this=0x7fffd10b49e0, identifiers=..., position=..., dataType=..., ret=..., 
    source=0x7fffd187e440, basicFlags=..., depth=0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppducontext.h:286
#181 0x00007ffff70d6d27 in KDevelop::DUContext::findDeclarations (this=0x7fffd10b49e0, identifier=..., position=..., dataType=..., topContext=0x0, flags=...)
    at /home/milian/projects/kde4/kdevplatform/language/duchain/ducontext.cpp:857
#182 0x00007fffe50ec9a6 in Cpp::findDeclarationsSameLevel (context=0x7fffd10b49e0, identifier=..., position=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/cppduchain.cpp:175
#183 0x00007fffe50973f5 in DeclarationBuilder::visitClassSpecifier (this=0x7fffdeff97c0, node=0x7fffd248b630)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/declarationbuilder.cpp:1100
#184 0x00007fffe4fad6bf in Visitor::visit (this=0x7fffdeff9820, node=0x7fffd248b630) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.cpp:123
#185 0x00007fffe50c8518 in TypeBuilder::visitSimpleDeclaration (this=0x7fffdeff97c0, node=0x7fffd248ba18)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/typebuilder.cpp:611
#186 0x00007fffe50941c6 in DeclarationBuilder::visitSimpleDeclaration (this=0x7fffdeff97c0, node=0x7fffd248ba18)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/declarationbuilder.cpp:379
#187 0x00007fffe4fad6bf in Visitor::visit (this=0x7fffdeff9820, node=0x7fffd248ba18) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.cpp:123
#188 0x00007fffe507e576 in ContextBuilder::visitTemplateDeclaration (this=0x7fffdeff97c0, ast=0x7fffd248ba60)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/contextbuilder.cpp:292
#189 0x00007fffe4fad6bf in Visitor::visit (this=0x7fffdeff9820, node=0x7fffd248ba60) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.cpp:123
#190 0x00007fffe4faab3a in visitNodes<DeclarationAST*> (v=0x7fffdeff9820, nodes=0x7fffd248ba98) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.h:138
#191 0x00007fffe4fa9a1b in DefaultVisitor::visitLinkageBody (this=0x7fffdeff9820, node=0x7fffd1736640)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/default_visitor.cpp:238
#192 0x00007fffe4fad6bf in Visitor::visit (this=0x7fffdeff9820, node=0x7fffd1736640) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.cpp:123
#193 0x00007fffe4fa9b48 in DefaultVisitor::visitNamespace (this=0x7fffdeff9820, node=0x7fffd1736608)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/default_visitor.cpp:261
#194 0x00007fffe507fa86 in ContextBuilder::visitNamespace (this=0x7fffdeff97c0, node=0x7fffd1736608)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/contextbuilder.cpp:472
#195 0x00007fffe5096ff5 in DeclarationBuilder::visitNamespace (this=0x7fffdeff97c0, ast=0x7fffd1736608)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/declarationbuilder.cpp:1050
#196 0x00007fffe4fad6bf in Visitor::visit (this=0x7fffdeff9820, node=0x7fffd1736608) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.cpp:123
#197 0x00007fffe4faab3a in visitNodes<DeclarationAST*> (v=0x7fffdeff9820, nodes=0x7fffd248bab0) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.h:138
#198 0x00007fffe4faa31b in DefaultVisitor::visitTranslationUnit (this=0x7fffdeff9820, node=0x7fffd17365c0)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/default_visitor.cpp:411
#199 0x00007fffe4fad6bf in Visitor::visit (this=0x7fffdeff9820, node=0x7fffd17365c0) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/visitor.cpp:123
---Type <return> to continue, or q <return> to quit---
#200 0x00007fffe507dc9f in ContextBuilder::startVisiting (this=0x7fffdeff97c0, node=0x7fffd17365c0)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/contextbuilder.cpp:186
#201 0x00007fffe508494f in KDevelop::AbstractContextBuilder<AST, NameAST>::supportBuild (this=0x7fffdeff97c0, node=0x7fffd17365c0, context=0x7fffd187e440)
    at /home/milian/projects/compiled/kde4/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:133
#202 0x00007fffe507f62a in ContextBuilder::buildContexts (this=0x7fffdeff97c0, file=..., node=0x7fffd17365c0, includes=0x7fffdeffa070, updateContext=..., 
    removeOldImports=false) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/contextbuilder.cpp:421
#203 0x00007fffe509276f in DeclarationBuilder::buildDeclarations (this=0x7fffdeff97c0, file=..., node=0x7fffd17365c0, includes=0x7fffdeffa070, updateContext=..., 
    removeOldImports=false) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppduchain/declarationbuilder.cpp:94
#204 0x00007fffe5200bac in CPPInternalParseJob::run (this=0x7fffd00187c0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppparsejob.cpp:637
#205 0x00007fffe51fd900 in CPPParseJob::parseForeground (this=0x7fffd00182e0) at /home/milian/projects/kde4/kdevelop/languages/cpp/cppparsejob.cpp:175
#206 0x00007fffe520c5e2 in PreprocessJob::sourceNeeded (this=0x1c71840, _fileName="polymake/internal/modified_containers.h", type=rpp::Preprocessor::IncludeLocal, 
    sourceLine=0, skipCurrentPath=false) at /home/milian/projects/kde4/kdevelop/languages/cpp/preprocessjob.cpp:579
#207 0x00007fffe51a35de in rpp::pp::handle_include (this=0x7fffdeffb790, skip_current_path=false, input=..., output=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:213
#208 0x00007fffe51a2c7b in rpp::pp::handle_directive (this=0x7fffdeffb790, directive=72291, input=..., output=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:131
#209 0x00007fffe51a38c6 in rpp::pp::operator() (this=0x7fffdeffb790, input=..., output=...)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:266
#210 0x00007fffe51a27d7 in rpp::pp::processFileInternal (this=0x7fffdeffb790, fileName="/home/milian/projects/testinclude/test.cpp", 
    fileContents="#include \"polymake/internal/modified_containers.h\"\n" = {...}, result=empty QVector<unsigned int>)
    at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:98
#211 0x00007fffe51a2694 in rpp::pp::processFile (this=0x7fffdeffb790, fileName="/home/milian/projects/testinclude/test.cpp", 
    data="#include \"polymake/internal/modified_containers.h\"\n" = {...}) at /home/milian/projects/kde4/kdevelop/languages/cpp/parser/rpp/pp-engine.cpp:85
#212 0x00007fffe5209f2f in PreprocessJob::run (this=0x1c71840) at /home/milian/projects/kde4/kdevelop/languages/cpp/preprocessjob.cpp:245
#213 0x00007ffff72d2d4b in ?? () from /usr/lib/libthreadweaver.so.4
#214 0x00007ffff72d2ebc in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib/libthreadweaver.so.4
#215 0x00007ffff72d3ec3 in ?? () from /usr/lib/libthreadweaver.so.4
#216 0x00007ffff72d250f in ?? () from /usr/lib/libthreadweaver.so.4
#217 0x00007ffff72d25cb in ThreadWeaver::Thread::run() () from /usr/lib/libthreadweaver.so.4
#218 0x00007ffff7987d3b in ?? () from /usr/lib/libQtCore.so.4
#219 0x00007ffff76f7daa in start_thread () from /lib/libpthread.so.0
#220 0x00007ffff31e455d in clone () from /lib/libc.so.6
#221 0x0000000000000000 in ?? ()
Comment 16 Milian Wolff 2012-03-08 22:37:02 UTC
ok, more information:

this is actually *not* a deadlock, but our code scales very badly (I'll have to investigate why) with the template recursion depth. If you add debug output of the depth_counter (DelayedTypeResolver::exchange in templatedeclaration.cpp), you'll notice that it gets quickly up to say ~15 but then gets slower and slower, until it reaches (on my machine) about 21 where it takes like a minute already.

So, as a workaround I consider reducing the allowed template recursion depth to 20. Anyone opposed?
Comment 17 Milian Wolff 2012-03-08 22:44:38 UTC
If I add another recursion detector to TemplateDeclaration::instantiate and output what it tries to instantiate (instantiationinformation) as well as the previously instantiated information (i.e. keys of m_instantiations) I get the following output, using the test-case supplied in comment 15:

"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > > > > > > > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > > > > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::Container, pm::_reversed, pm::object_classifier::is_constant>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > > > > > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::Container >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > > > > > > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > > > > >, pm::_reversed, pm::object_classifier::is_manip>" 
"<pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::construct_sequence_indexed< pm::Container > > > >, pm::_reversed, pm::object_classifier::is_manip>"
Comment 18 Milian Wolff 2012-03-30 14:33:49 UTC
Git commit c7633cdca8c7558720804b42cd91e77bc9043100 by Milian Wolff.
Committed on 30/03/2012 at 16:30.
Pushed by mwolff into branch '4.3'.

workaround infinite loop in template instantiation (fixes e.g. Eigen code)

some template code trips up our instantiation code leading to an
infinite recursion. this patch adds a depth counter to prevent
this.

furthermore, a unit test is added which reproduces this issues reliably
so someone with more knowledge can write a proper fix

M  +15   -3    languages/cpp/cppduchain/templatedeclaration.cpp
M  +2    -0    languages/cpp/cppduchain/templatedeclaration.h
M  +17   -0    languages/cpp/cppduchain/tests/test_duchain.cpp
M  +1    -0    languages/cpp/cppduchain/tests/test_duchain.h

http://commits.kde.org/kdevelop/c7633cdca8c7558720804b42cd91e77bc9043100