Skip to content

Commit 588b18e

Browse files
committed
issue #8704: Doxygen 1.9.1 hangs when msc issue is detected instead of terminating, also CTRL+C does not work
1 parent f0218cd commit 588b18e

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

src/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11087,7 +11087,7 @@ void generateOutputViaTemplate()
1108711087
}
1108811088

1108911089
// clear all cached data in Definition objects.
11090-
for (const auto &kv : Doxygen::symbolMap)
11090+
for (const auto &kv : *Doxygen::symbolMap)
1109111091
{
1109211092
kv.second->setCookie(0);
1109311093
}

src/definition.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,15 @@ static void addToMap(const QCString &name,Definition *d)
210210
if (!vhdlOpt && index!=-1) symbolName=symbolName.mid(index+2);
211211
if (!symbolName.isEmpty())
212212
{
213-
Doxygen::symbolMap.add(symbolName,d);
213+
Doxygen::symbolMap->add(symbolName,d);
214214

215215
d->_setSymbolName(symbolName);
216216
}
217217
}
218218

219219
static void removeFromMap(const QCString &name,Definition *d)
220220
{
221-
Doxygen::symbolMap.remove(name,d);
221+
Doxygen::symbolMap->remove(name,d);
222222
}
223223

224224
DefinitionImpl::DefinitionImpl(Definition *def,

src/doxygen.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ bool Doxygen::insideMainPage = FALSE; // are we generating docs
150150
NamespaceDefMutable *Doxygen::globalScope = 0;
151151
bool Doxygen::parseSourcesNeeded = FALSE;
152152
SearchIndexIntf *Doxygen::searchIndex=0;
153-
SymbolMap<Definition> Doxygen::symbolMap;
153+
SymbolMap<Definition>*Doxygen::symbolMap;
154154
ClangUsrMap *Doxygen::clangUsrMap = 0;
155155
Cache<std::string,LookupInfo> *Doxygen::lookupCache;
156156
DirLinkedMap *Doxygen::dirLinkedMap;
@@ -8166,7 +8166,7 @@ static bool isSymbolHidden(const Definition *d)
81668166

81678167
static void computeTooltipTexts()
81688168
{
8169-
for (const auto &kv : Doxygen::symbolMap)
8169+
for (const auto &kv : *Doxygen::symbolMap)
81708170
{
81718171
DefinitionMutable *dm = toDefinitionMutable(kv.second);
81728172
if (dm && !isSymbolHidden(toDefinition(dm)) && toDefinition(dm)->isLinkableInProject())
@@ -10155,7 +10155,7 @@ static void dumpSymbolMap()
1015510155
if (f.is_open())
1015610156
{
1015710157
TextStream t(&f);
10158-
for (const auto &kv : Doxygen::symbolMap)
10158+
for (const auto &kv : *Doxygen::symbolMap)
1015910159
{
1016010160
dumpSymbol(t,kv.second);
1016110161
}
@@ -10285,6 +10285,8 @@ void initDoxygen()
1028510285
std::setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
1028610286
std::setlocale(LC_NUMERIC,"C");
1028710287

10288+
Doxygen::symbolMap = new SymbolMap<Definition>;
10289+
1028810290
Portable::correct_path();
1028910291

1029010292
Debug::startTimer();
@@ -10385,6 +10387,7 @@ void cleanUpDoxygen()
1038510387
delete Doxygen::groupLinkedMap;
1038610388
delete Doxygen::namespaceLinkedMap;
1038710389
delete Doxygen::dirLinkedMap;
10390+
delete Doxygen::symbolMap;
1038810391

1038910392
DotManager::deleteInstance();
1039010393
}
@@ -10909,6 +10912,7 @@ static void stopDoxygen(int)
1090910912
thisDir.remove(Doxygen::filterDBFileName.str());
1091010913
}
1091110914
killpg(0,SIGINT);
10915+
cleanUpDoxygen();
1091210916
exit(1);
1091310917
}
1091410918
#endif

src/doxygen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class Doxygen
103103
static QCString htmlFileExtension;
104104
static bool parseSourcesNeeded;
105105
static SearchIndexIntf *searchIndex;
106-
static SymbolMap<Definition> symbolMap;
106+
static SymbolMap<Definition> *symbolMap;
107107
static ClangUsrMap *clangUsrMap;
108108
static Cache<std::string,LookupInfo> *lookupCache;
109109
static DirLinkedMap *dirLinkedMap;

src/pycode.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ static void findMemberLink(yyscan_t yyscanner,
15131513
// );
15141514
if (yyextra->currentDefinition)
15151515
{
1516-
auto range = Doxygen::symbolMap.find(symName);
1516+
auto range = Doxygen::symbolMap->find(symName);
15171517
for (auto it = range.first; it!=range.second; ++it)
15181518
{
15191519
findMemberLink(yyscanner,ol,it->second,symName);

src/symbolresolver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
202202
}
203203

204204
//printf("Looking for symbol %s\n",qPrint(name));
205-
auto range = Doxygen::symbolMap.find(name);
205+
auto range = Doxygen::symbolMap->find(name);
206206
// the -g (for C# generics) and -p (for ObjC protocols) are now already
207207
// stripped from the key used in the symbolMap, so that is not needed here.
208208
if (range.first==range.second)
209209
{
210-
range = Doxygen::symbolMap.find(name+"-p");
210+
range = Doxygen::symbolMap->find(name+"-p");
211211
if (range.first==range.second)
212212
{
213213
//fprintf(stderr,"%d ] no such symbol!\n",--level);
@@ -973,7 +973,7 @@ QCString SymbolResolver::Private::substTypedef(
973973
QCString result=name;
974974
if (name.isEmpty()) return result;
975975

976-
auto range = Doxygen::symbolMap.find(name);
976+
auto range = Doxygen::symbolMap->find(name);
977977
if (range.first==range.second)
978978
return result; // no matches
979979

src/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5616,7 +5616,7 @@ static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fil
56165616
if (name.isEmpty())
56175617
return 0; // no name was given
56185618

5619-
auto range = Doxygen::symbolMap.find(name);
5619+
auto range = Doxygen::symbolMap->find(name);
56205620
if (range.first==range.second)
56215621
return 0; // could not find any matching symbols
56225622

0 commit comments

Comments
 (0)