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 145719 - AssertionError: ModCount already updated
Summary: AssertionError: ModCount already updated
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Miloslav Metelka
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2008-08-31 16:24 UTC by Lukas Jungmann
Modified: 2009-11-05 14:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 102473


Attachments
stacktrace (2.72 KB, text/plain)
2008-08-31 16:24 UTC, Lukas Jungmann
Details
stacktrace (4.36 KB, text/plain)
2009-11-02 13:37 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-08-31 16:24:38 UTC
Build: NetBeans IDE Dev (Build 20080831125309)
VM: Java HotSpot(TM) Client VM, 1.5.0_16-rev-b03, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-rev-b03
OS: Windows 2003, 5.2, x86

User Comments: 
-create new webapp for GF
-create new JSP there
-d'n'd flicker's setMeta into a body of the jsp
-d'n'd flicker's setPerms into a body of the jsp before //TODO comment

Stacktrace: 
java.lang.AssertionError: ModCount already updated
        at org.netbeans.lib.lexer.inc.IncTokenList.replaceTokens(IncTokenList.java:304)
        at org.netbeans.lib.lexer.inc.TokenListUpdater.updateRegular(TokenListUpdater.java:269)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:346)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:221)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:193)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.update(TokenHierarchyUpdate.java:130)
Comment 1 Lukas Jungmann 2008-08-31 16:24:43 UTC
Created attachment 68728 [details]
stacktrace
Comment 2 Miloslav Metelka 2008-09-03 16:48:43 UTC
That's likely because there's some thread in parallel inspecting token hierarchy. When run with
-J-Dorg.netbeans.spi.lexer.MutableTextInput.level=FINE
there's a SAAS code reformatting thread without a write lock. I'll try to propose a patch for SAAS code.
Comment 3 Miloslav Metelka 2008-09-04 13:53:50 UTC
I was not able to reproduce the exception. I suppose the issue is random, right?
Anyway I have added write-locking of the reformatting in saas. If the problem would persist please reopen the issue.

http://hg.netbeans.org/main/rev/e3ad00aee5f6
Comment 4 Quality Engineering 2008-09-05 06:05:54 UTC
Integrated into 'main-golden', will be available in build *200809050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e3ad00aee5f6
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #145719 - AssertionError: ModCount already updated.
Comment 5 Alexander Simon 2009-11-02 13:37:00 UTC
Build: NetBeans IDE Dev (Build 091030)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: SunOS, 5.10, x86

User Comments: 


Stacktrace: 
java.lang.AssertionError: ModCount already updated
        at org.netbeans.lib.lexer.inc.IncTokenList.replaceTokens(IncTokenList.java:304)
        at org.netbeans.lib.lexer.inc.TokenListUpdater.updateRegular(TokenListUpdater.java:279)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:345)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:220)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:192)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.update(TokenHierarchyUpdate.java:130)
Comment 6 Alexander Simon 2009-11-02 13:37:04 UTC
Created attachment 90425 [details]
stacktrace
Comment 7 Miloslav Metelka 2009-11-02 14:09:52 UTC
alexvsimon: Any steps to reproduce the problem? Thanks.
Comment 8 Alexander Simon 2009-11-02 14:20:47 UTC
Create C/C++ sample project, open source file in editor, select file comment and #include directives, press backspace.
I do not sure that backspace was before exception.
Comment 9 Alexander Simon 2009-11-02 14:22:15 UTC
IDE info:
  Product Version         = NetBeans IDE Dev (Build 091030) (#b2b30bd97c68)
  Operating System        = SunOS version 5.10 running on x86
  Java; VM; Vendor        = 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_14-b08
  Java Home               = /usr/jdk/instances/jdk1.6.0_14/jre
  System Locale; Encoding = en (nb); ISO646-US
Comment 10 Quality Engineering 2009-11-05 10:17:01 UTC
Integrated into 'main-golden', will be available in build *200911050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8e4f32f07c61
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #145719 - AssertionError: ModCount already updated - Fixed missing readlocks in CndTokenUtilities.
Comment 11 Miloslav Metelka 2009-11-05 14:20:30 UTC
Fixed.