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.
System info: NetBeans RC3, j2sdk1.4.2_04 1. On [Missing] status nod, I invoked "PVCS | MERGE". This command was ok. 2. Some confilcts needed to be resolved. 3. After accepting some some possibility this exception raised. But I can't reproduce it. ava.lang.IndexOutOfBoundsException: Invalid line index=29 >= lineCount=29 at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:54) at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:631) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:883) at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:609) at org.openide.text.NbDocument.findLineOffset(NbDocument.java:142) at org.netbeans.modules.merge.builtin.visualizer.MergePanel.writeResult(MergePanel.java:1462) at org.netbeans.modules.merge.builtin.visualizer.MergeControl.vetoableChange(MergeControl.java:320) at org.openide.util.WeakListener$VetoableChange.vetoableChange(WeakListener.java:379) at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSupport.java:300) at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSupport.java:217) at javax.swing.JComponent.fireVetoableChange(JComponent.java:4093) at org.netbeans.modules.merge.builtin.visualizer.MergeDialogComponent.access$800(MergeDialogComponent.java:60) at org.netbeans.modules.merge.builtin.visualizer.MergeDialogComponent$MergeNode.save(MergeDialogComponent.java:419) at org.netbeans.modules.merge.builtin.visualizer.MergeDialogComponent.okButtonActionPerformed(MergeDialogComponent.java:210) at org.netbeans.modules.merge.builtin.visualizer.MergeDialogComponent.access$000(MergeDialogComponent.java:60) at org.netbeans.modules.merge.builtin.visualizer.MergeDialogComponent$1.actionPerformed(MergeDialogComponent.java:118) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
This looks like a bug in the diff module. It's probable that this exception is thrown only in some special situation. Try to repeat exactly the steps you made with the same file content. I'll not be able to easily find the cause of this without reproducible steps.
I need the files that were compared to reproduce this. Downgrading to P4 - not able to easily reproduce, the bug likely occurs very rarely.
This seems to be identical to an issue i have been looking at . hear is our reproduction scenario; Codeline, Buildnr, edition: NB 3.5.1 Description: When performing the Diff function on two files that differ much in content with each other an exception occurs. Steps to Reproduce: First you can create a class in the Domain model and update all models. 1. Select any java file and select [copy] from pop-up menu. 2. Paste copied java file to same package. 3. Open copied java file, and add some comment to FREE BLOCK. 4. Save Project. 5. Select original and copied java files and select [Diff] from pop-up menu. 6. Two files will be successfully compared. 7. Randomly select any two files that differ much in content and execute [Diff]. Observed behaviour: Annotation: Exception occurred in Request Processor java.lang.IndexOutOfBoundsException: Invalid line index=127 >= lineCount=127 at org.netbeans.editor.LineRootElement.getElement (LineRootElement.java:54) at org.openide.text.NbDocument.findLineOffset(NbDocument.java:127) at org.netbeans.modules.diff.builtin.visualizer.DiffPanel.setHighlight (DiffPanel.java:837) at org.netbeans.modules.diff.builtin.visualizer.DiffPanel.highlightRegion2 (DiffPanel.java:876) at org.netbeans.modules.diff.builtin.visualizer.DiffComponent.highlightRegion2 (DiffComponent.java:304) at org.netbeans.modules.diff.builtin.visualizer.DiffComponent.setDiffHighlight (DiffComponent.java:403) at org.netbeans.modules.diff.builtin.visualizer.DiffComponent.initContent (DiffComponent.java:153) at org.netbeans.modules.diff.builtin.visualizer.DiffComponent.<init> (DiffComponent.java:121) at org.netbeans.modules.diff.builtin.visualizer.GraphicalDiffVisualizer.createView (GraphicalDiffVisualizer.java:121) at org.netbeans.modules.diff.builtin.DiffPresenter.showDiff (DiffPresenter.java:271) at org.netbeans.modules.diff.builtin.DiffPresenter.showDiff (DiffPresenter.java:234) at org.netbeans.modules.diff.builtin.DiffPresenter.setVisualizer (DiffPresenter.java:229) at org.netbeans.modules.diff.builtin.DefaultDiff.createDiff (DefaultDiff.java:111) at org.netbeans.modules.diff.DiffAction.performAction (DiffAction.java:106) at org.netbeans.modules.diff.DiffAction.performAction (DiffAction.java:90) at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed (NodeAction.java:431) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328) [catch] at org.openide.util.RequestProcessor$Processor.run (RequestProcessor.java:670) Expected behaviour: No exception should occur but differences should be displayed. Reproducibility: Yes Regression: No Additional Builds and Platforms Tested On: Additional Information:
I've tried various files from NetBeans sourcebase, but I'm still not able to reproduce. Please, if you find two files that reliably generate this error and these files are not confidential, please attach them here (or send them to me). Thanks.
*** Issue 44911 has been marked as a duplicate of this issue. ***
Seems to be ok now.
Verified.