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 108813 - NB hangs when uncommenting 2 times
Summary: NB hangs when uncommenting 2 times
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-03 21:39 UTC by rolandhalder
Modified: 2007-07-23 14:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rolandhalder 2007-07-03 21:39:46 UTC
I select a few lines of text in a Ruby source file and then comment out this selection 2 times via the appropriate button.
When I try to remove the second comment, jave.exe gets 99% of CPU and NetBeans hangs
Comment 1 Torbjorn Norbye 2007-07-03 21:45:51 UTC
This is a bug in the editor/lexer. I think this is a duplicate of another P1 bug that I analyzed and reassigned to the lexer but I don't have the bug id.
Comment 2 rolandhalder 2007-07-03 21:47:27 UTC
The problem was in M9 and is still in M10
Comment 3 Torbjorn Norbye 2007-07-04 18:00:06 UTC
Possibly a duplicate of issue 106547
Comment 4 rolandhalder 2007-07-04 21:06:33 UTC
I dont think so, because it doesnt matter, what the lines contain before inserting comments and removing them twice.
Comment 5 Miloslav Metelka 2007-07-20 13:58:51 UTC
I'm already working on this, there is a problem with updating of embedded token lists.
I was not able to reproduce a hang but with the same steps I get a AIOOBE. I was able to simplify the steps to just have
a single line with

# a

and press Ctrl+Shift+T to comment line. The embedded token is incorrectly past the modification point.
I have added some extra logging and I'm working on a fix.
Comment 6 Miloslav Metelka 2007-07-23 14:26:35 UTC
Added failing test:
Checking in TokenListUpdaterExtraTest.java;
/cvs/lexer/test/unit/src/org/netbeans/lib/lexer/test/inc/TokenListUpdaterExtraTest.java,v  <-- 
TokenListUpdaterExtraTest.java
new revision: 1.2; previous revision: 1.1
Comment 7 Miloslav Metelka 2007-07-23 14:45:40 UTC
Fixed.
Checking in lib/lexer/inc/OriginalText.java;
/cvs/lexer/src/org/netbeans/lib/lexer/inc/OriginalText.java,v  <--  OriginalText.java
new revision: 1.4; previous revision: 1.3
done
Checking in lib/lexer/inc/TokenListChange.java;
/cvs/lexer/src/org/netbeans/lib/lexer/inc/TokenListChange.java,v  <--  TokenListChange.java
new revision: 1.10; previous revision: 1.9
done
Checking in lib/lexer/inc/IncTokenList.java;
/cvs/lexer/src/org/netbeans/lib/lexer/inc/IncTokenList.java,v  <--  IncTokenList.java
new revision: 1.9; previous revision: 1.8
done
Checking in lib/lexer/inc/TokenListUpdater.java;
/cvs/lexer/src/org/netbeans/lib/lexer/inc/TokenListUpdater.java,v  <--  TokenListUpdater.java
new revision: 1.14; previous revision: 1.13
done
Checking in api/lexer/TokenHierarchy.java;
/cvs/lexer/src/org/netbeans/api/lexer/TokenHierarchy.java,v  <--  TokenHierarchy.java
new revision: 1.9; previous revision: 1.8
done
Checking in lib/lexer/TokenHierarchyOperation.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenHierarchyOperation.java,v  <--  TokenHierarchyOperation.java
new revision: 1.15; previous revision: 1.14
done
Checking in lib/lexer/LexerUtilsConstants.java;
/cvs/lexer/src/org/netbeans/lib/lexer/LexerUtilsConstants.java,v  <--  LexerUtilsConstants.java
new revision: 1.13; previous revision: 1.12