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 181562 - Code Formatting throws AssertionError: ModCount already updated
Summary: Code Formatting throws AssertionError: ModCount already updated
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC All
: P2 normal (vote)
Assignee: Anton Chechel
URL:
Keywords: REGRESSION
Depends on: 181436
Blocks: 173487
  Show dependency tree
 
Reported: 2010-03-05 04:00 UTC by Alexandr Scherbatiy
Modified: 2010-03-15 11:02 UTC (History)
0 users

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 Alexandr Scherbatiy 2010-03-05 04:00:05 UTC
NetBeans-JavaFX-Soma:  #177

Product Version         = NetBeans IDE Dev (Build 201003050200) (#23fe99f03599)
  Operating System        = Mac OS X version 10.5.6 running on x86_64
  Java; VM; Vendor        = 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 1.6.0_07-b06-57; Apple Inc.


Steps to reproduce:

- Create a JavaFX project
- Format the Main file
 The exception pops up:

java.lang.AssertionError: ModCount already updated
	at org.netbeans.lib.lexer.inc.IncTokenList.replaceTokens(IncTokenList.java:304)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.setActiveImpl(TokenHierarchyOperation.java:309)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.setActive(TokenHierarchyOperation.java:286)
	at org.netbeans.spi.lexer.TokenHierarchyControl.setActive(TokenHierarchyControl.java:112)
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask.reformatImpl(JFXReformatTask.java:196)
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask.reformat(JFXReformatTask.java:116)
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:547)
	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:314)
	at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:317)
	at org.netbeans.modules.editor.indent.FormatterImpl.reformat(FormatterImpl.java:187)
	at org.netbeans.editor.ActionFactory$FormatAction$1$1.run(ActionFactory.java:1677)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:341)
	at org.netbeans.editor.ActionFactory$FormatAction$1.run(ActionFactory.java:1645)
	at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:156)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1356)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1894)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:355)
[catch] at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThreadImpl(RunOffEDTImpl.java:150)
	at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThread(RunOffEDTImpl.java:112)
	at org.netbeans.api.progress.ProgressUtils.runOffEventDispatchThread(ProgressUtils.java:86)
	at org.netbeans.editor.ActionFactory$FormatAction.actionPerformed(ActionFactory.java:1637)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:336)
	at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:137)
	at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:92)
	at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:113)
	at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:96)
	at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:140)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
	at apple.laf.CUIAquaMenuItem.doClick(CUIAquaMenuItem.java:119)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1261)
	at java.awt.Component.processMouseEvent(Component.java:6126)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5891)
	at java.awt.Container.processEvent(Container.java:2102)
	at java.awt.Component.dispatchEventImpl(Component.java:4497)
	at java.awt.Container.dispatchEventImpl(Container.java:2160)
	at java.awt.Component.dispatchEvent(Component.java:4327)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4366)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4030)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3960)
	at java.awt.Container.dispatchEventImpl(Container.java:2146)
	at java.awt.Window.dispatchEventImpl(Window.java:2440)
	at java.awt.Component.dispatchEvent(Component.java:4327)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:131)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:195)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:187)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Anton Chechel 2010-03-05 04:12:13 UTC
Editor guys should fix it asap.
As a temporary solution you can disable asertion removing -Jea from netbeans.conf.
Comment 2 Anton Chechel 2010-03-12 09:54:22 UTC
fixed
Comment 3 Alexandr Scherbatiy 2010-03-15 11:02:56 UTC
verified in NetBeans-JavaFX-Soma: #185