This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258891 - StringIndexOutOfBoundsException: String index out of range: 0
Summary: StringIndexOutOfBoundsException: String index out of range: 0
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-18 13:24 UTC by Exceptions Reporter
Modified: 2016-05-24 10:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 223595


Attachments
stacktrace (1.35 KB, text/plain)
2016-04-18 13:24 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2016-04-18 13:24:14 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.74-b02, Java(TM) SE Runtime Environment, 1.8.0_74-b02
OS: Linux

User Comments:
GUEST: during project parsing....




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
   at java.lang.String.charAt(String.java:658)
   at org.netbeans.modules.cnd.apt.support.lang.APTFortranFilterEx$FilterStream.nextToken(APTFortranFilterEx.java:101)
   at org.netbeans.modules.cnd.apt.utils.APTCommentsFilter.nextToken(APTCommentsFilter.java:68)
   at org.netbeans.modules.cnd.apt.utils.APTCommentsFilter.nextToken(APTCommentsFilter.java:57)
   at org.netbeans.modules.cnd.modelimpl.impl.services.ReferenceRepositoryImpl.getTokensToResolve(ReferenceRepositoryImpl.java:412)
   at org.netbeans.modules.cnd.modelimpl.impl.services.ReferenceRepositoryImpl.getReferences(ReferenceRepositoryImpl.java:269)
Comment 1 Exceptions Reporter 2016-04-18 13:24:16 UTC
Created attachment 159304 [details]
stacktrace
Comment 2 Alexander Simon 2016-04-19 10:28:21 UTC
Steps:
- create Fortran Hello Word sample application
- create C main file
- modify C main function:

int main(int argc, char** argv) {
    bar();
    return (EXIT_SUCCESS);
}

- reparse project
- invoke Find Usages on bar() in C main function
See exception in message log
Comment 3 Alexander Simon 2016-04-19 10:43:27 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/58f1d15a18f6
Comment 4 Quality Engineering 2016-04-25 19:57:07 UTC
Integrated into 'main-silver', will be available in build *201604251813* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/58f1d15a18f6
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #258891 StringIndexOutOfBoundsException: String index out of range: 0