| Summary: | I create Fortran project, add long source files, close gideon. Open gideon - it crashes on fortran parser. | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Evgeniy Shapiro <shellinux> |
| Component: | general | Assignee: | KDevelop Developers <kdevelop-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | raphael, shel |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Evgeniy Shapiro
2003-09-09 19:38:08 UTC
Can you retest with CVS HEAD? *** Bug 69433 has been marked as a duplicate of this bug. *** Re: Can you retest with CVS HEAD? Have not done it yet, but tried beta 1 of kdevelop - same problem. *** Bug 76273 has been marked as a duplicate of this bug. *** Tried the same trick with 3.0.2:
Platform: Slackware 9.1/gcc 3.2.3
Installed from contributed tgz package
Crash when I try to add the following fortran file an empty fortran project:
c interface for xns inibs
SUBROUTINE XNS_INIB(NG,X,Y,Z, USB,IE,JE,KE)
INCLUDE 'xcominc3.f'
INCLUDE 'block.f'
real, dimension (0:IE,0:JE,0:KE,NBLO) :: X,Y,Z
real, dimension (0:JE,0:KE,NBLO) :: USB
print *,"I2D = ",i2d
if(i2d.eq.0) then
print *, "Initializing 3D"
call XNS_INIB3D(NG,X,Y,Z, USB,IE,JE,KE)
else
print *, "Initializing 2D"
call XNS_INIB2D(NG,X,Y,Z, USB,IE,JE,KE)
end if
return
end
:(
Fixed in CVS. CVS commit by dagerbo: Use QRegExp instead of the deprecated KRegExp. Hopefully fixing a few crashes in the process.. CCMAIL: 63973@bugs.kde.org M +12 -10 fixedformparser.cpp 1.11.2.1 M +2 -2 fixedformparser.h 1.3.2.1 --- kdevelop/languages/fortran/fixedformparser.cpp #1.11:1.11.2.1 @@ -22,7 +22,10 @@ FixedFormParser::FixedFormParser(CodeMod m_model = model; - functionre.compile("(integer|real|logical|complex|character|" + functionre.setPattern("(integer|real|logical|complex|character|" "double(precision)?)function([^(]+).*"); - subroutinere.compile("subroutine([^(]+).*"); + subroutinere.setPattern("subroutine([^(]+).*"); + + functionre.setCaseSensitive( false ); + subroutinere.setCaseSensitive( false ); } @@ -30,7 +33,4 @@ FixedFormParser::FixedFormParser(CodeMod void FixedFormParser::process(const QCString &line, const QString &fileName, int lineNum) { - if (line.isEmpty()) - return; - QCString simplified; int l = line.length(); @@ -39,9 +39,11 @@ void FixedFormParser::process(const QCSt simplified += line[i]; - QCString name; - if (functionre.match(simplified)) - name = functionre.group(3); - else if (subroutinere.match(simplified)) - name = subroutinere.group(1); + if ( simplified.isEmpty() ) return; + + QString name; + if (functionre.search(simplified) != -1) + name = functionre.cap(3); + else if (subroutinere.search(simplified) != -1) + name = subroutinere.cap(1); else return; --- kdevelop/languages/fortran/fixedformparser.h #1.3:1.3.2.1 @@ -15,5 +15,5 @@ #include <qstring.h> #include <qtextstream.h> -#include <kregexp.h> +#include <qregexp.h> #include <codemodel.h> @@ -30,5 +30,5 @@ private: CodeModel* m_model; FileDom m_file; - KRegExp functionre, subroutinere; + QRegExp functionre, subroutinere; }; |