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.
Build: NetBeans IDE Dev (Build nbms-and-javadoc-1921-on-20140717) VM: Java HotSpot(TM) 64-Bit Server VM, 25.11-b03, Java(TM) SE Runtime Environment, 1.8.0_11-b12 OS: Windows 7 User Comments: MackSix: Running Inspect & Transform on Apache Commons Collection 4 (commons-collections4-4.0-src.zip) http://commons.apache.org/proper/commons-collections/download_collections.cgi GUEST: changing sourcefiles from another program GUEST: . Stacktrace: javax.swing.text.BadLocationException: Invalid offset=8571 > (docLen+1)=8453 at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetInContent(EditorDocumentContent.java:286) at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.createPosition(EditorDocumentContent.java:198) at javax.swing.text.AbstractDocument.createPosition(AbstractDocument.java:829) at org.netbeans.modules.editor.indent.TaskHandler.setCaretOffset(TaskHandler.java:129) at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:259) at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:171)
Created attachment 148123 [details] stacktrace
Created attachment 148124 [details] stacktrace Repeatable
Created attachment 148141 [details] stacktrace Running the first 11 Inspect & Transform Analyzers on Apache Commons Collection 4 source code. http://commons.apache.org/proper/commons-collections/download_collections.cgi
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=210732
There is a bunch of dump files in the log directory and the log file is full of source code. See attached zip file with the log file directory.
Created attachment 148142 [details] Zipped log file directory
I encountered that exception several times using the new dev build 201407200001 javax.swing.text.BadLocationException: Invalid offset=104335 > (docLen+1)=103675 at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.checkOffsetInContent(EditorDocumentContent.java:286) at org.netbeans.modules.editor.lib2.document.EditorDocumentContent.createPosition(EditorDocumentContent.java:198) at javax.swing.text.AbstractDocument.createPosition(AbstractDocument.java:829) at org.netbeans.modules.editor.indent.TaskHandler.setCaretOffset(TaskHandler.java:129) at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:259) at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:171) [catch] at org.netbeans.modules.java.source.save.CasualDiff$1.run(CasualDiff.java:386) at org.netbeans.editor.BaseDocument.runAtomicAsUser(BaseDocument.java:1416) at org.netbeans.editor.BaseDocument.runAtomic(BaseDocument.java:1405) at org.netbeans.modules.java.source.save.CasualDiff.diff(CasualDiff.java:382) at org.netbeans.api.java.source.WorkingCopy.processCurrentCompilationUnit(WorkingCopy.java:849) at org.netbeans.api.java.source.WorkingCopy.getChanges(WorkingCopy.java:1170) at org.netbeans.api.java.source.ModificationResult$1.run(ModificationResult.java:155) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:598) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:155) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:139) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:206) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:203) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:176) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:74) at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:203) at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:106) at org.netbeans.api.java.source.ModificationResult.runModificationTask(ModificationResult.java:137) at org.netbeans.modules.java.hints.OrganizeMembers.checkMembers(OrganizeMembers.java:109) at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:336) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:790) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.access$400(HintsInvoker.java:111) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.runAndAdd(HintsInvoker.java:657) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:676) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:614) at com.sun.source.util.TreeScanner.scan(TreeScanner.java:91) at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:103) at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:99) at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:120) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:551) at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:50) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker$ScannerImpl.scan(HintsInvoker.java:701) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:256) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:239) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:209) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:182) at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:149) at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:114) at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:83) at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:298) at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:573) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:744) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) Product Version: NetBeans IDE Dev (Build 201407200001) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Runtime: Java(TM) SE Runtime Environment 1.8.0-b132 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)
BTW: Very annoying. It happens even at a small change in the java editor. It also happens usign 201407090001
@mmetelka: See your mail inbox. I send you a file, which may reproduce this issue.
It's likely java related - reassigning to java/editor (@markiewb I'll forward the file too).
Created attachment 148400 [details] stacktrace .
Created attachment 149654 [details] stacktrace Exception occured after/while Updating Files vom cvs or while java-editing.
Created attachment 149866 [details] stacktrace ....
Created attachment 149920 [details] stacktrace Inserted code in a java-file with crtl-v.
Created attachment 153073 [details] stacktrace Opening java files
Still happens in the newest build Product Version: NetBeans IDE Dev (Build 201504070001) Java: 1.8.0_20; Java HotSpot(TM) 64-Bit Server VM 25.20-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE
Created attachment 153077 [details] File for reproduction Here a file for reproduction. It happens every time I switch to this file and set the caret. (FYI File does not compile - I removed sensitive information)
Created attachment 153700 [details] stacktrace Formatted a class..Invoked organize members,,
93 exception reporter duplicates--at least P2.
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/644450a24495
Integrated into 'main-silver', will be available in build *201506240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/644450a24495 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #245776 - javax.swing.text.BadLocationException: Invalid offset - fixed.