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 270878

Summary: java.lang.NegativeArraySizeException when opening a huge file
Product: editor Reporter: scanti <scanti>
Component: -- Other --Assignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description scanti 2017-06-14 14:33:20 UTC
A colleague of mine tried to open a 18Gb file inside out RCP application and got this:

java.lang.NegativeArraySizeException
	at org.netbeans.modules.editor.lib2.document.ReadWriteUtils.read(ReadWriteUtils.java:74)
	at org.netbeans.editor.BaseDocument.read(BaseDocument.java:1436)
	at org.netbeans.editor.BaseKit.read(BaseKit.java:668)
	at org.openide.text.DataEditorSupport.loadFromStreamToKit(DataEditorSupport.java:492)
	at org.openide.text.DocumentOpenClose$DocumentLoad.atomicLockedRun(DocumentOpenClose.java:764)
	at org.openide.text.DocumentOpenClose$DocumentLoad.run(DocumentOpenClose.java:615)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:323)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:436)
	at org.openide.text.DocumentOpenClose$DocumentLoad.run(DocumentOpenClose.java:655)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)