Menu

#160 Parser issue with large files => ArrayIndexOutOfBoundsExce

open
nobody
None
6
2008-04-25
2008-04-25
No

Larger Files (like the one I use here with about 3500 lines of code) seem to have problems with the C#codeparser:

During typing of code (like System.Console.xyz), e.g. the code completion is very slow.
It seems that the CodeCompletion-Job gets no resources, as other jobs in the background (C#codeparser) require too much processor time. (Maybe typing with usage of backspace and re-typing is needed)
Finally, it leads to an ArrayIndexOutOfBoundsException caused by CSharpCodeParser.checkForCommentedOut.

Any ideas?

-----------
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:516)
at java.lang.StringBuffer.append(StringBuffer.java:306)
at org.eclipse.jface.text.GapTextStore.get(GapTextStore.java:163)
at org.eclipse.jface.text.CopyOnWriteTextStore.get(CopyOnWriteTextStore.java:125)
at org.eclipse.jface.text.AbstractDocument.get(AbstractDocument.java:966)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.get(SynchronizableDocument.java:93)
at org.emonic.base.infostructure.CSharpCodeParser.checkForCommentedOut(CSharpCodeParser.java:1208)
at org.emonic.base.infostructure.CSharpCodeParser.parseDocument(CSharpCodeParser.java:168)
at org.emonic.base.infostructure.CSharpEditorExamineJob.run(CSharpEditorExamineJob.java:108)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Discussion

  • Remy Chi Jian Suen

    Logged In: YES
    user_id=1299552
    Originator: NO

    Please attach the C# file that reproduces the problem.

     
  • Dominik Ertl

    Dominik Ertl - 2008-05-05

    Logged In: YES
    user_id=1858080
    Originator: YES

    File Added: MegaClass.cs

     
  • Dominik Ertl

    Dominik Ertl - 2008-05-05

    File where error is reproducable

     
  • Remy Chi Jian Suen

    Logged In: YES
    user_id=1299552
    Originator: NO

    I tried using 'System' and then pressing the '.' and also tried using Ctrl+Space after 'System.' but I cannot reproduce the AIOOBE on Eclipse 3.2.2.

    It is, however, definitely very slow. :p After some simple tests, it seems that parseDocument() is taking about 1.4 to 1.5 seconds.

    The 'Outline' view also keeps refreshing, which is quite annoying.

     

Log in to post a comment.