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 255176 - do not open documents during parse phase
Summary: do not open documents during parse phase
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-10 12:36 UTC by Vladimir Voskresensky
Modified: 2015-09-28 16:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
look for CloneableEditorSupport.openDocument (58.01 KB, text/plain)
2015-09-10 12:37 UTC, Vladimir Voskresensky
Details
Draft version of patch (30.38 KB, patch)
2015-09-16 17:04 UTC, petrk
Details | Diff
Improvement of processTokensInExpression method (2.82 KB, patch)
2015-09-16 17:10 UTC, petrk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2015-09-10 12:36:52 UTC
CloneableEditorSupport.openDocument is requested from 8 threads at once during initial parse project (4 parser threads)
Comment 1 Vladimir Voskresensky 2015-09-10 12:37:17 UTC
Created attachment 156054 [details]
look for CloneableEditorSupport.openDocument
Comment 2 Vladimir Voskresensky 2015-09-10 12:52:06 UTC
Btw, this is displayed in console during parse
org.openide.text.DataEditorSupport$Env$ME: The file sqlite3.c seems to be too large (4 Mb) to safely open. 
Opening the file could cause OutOfMemoryError, which would make the IDE unusable. Do you really want to open it?
	at org.openide.text.DataEditorSupport$Env.inputStream(DataEditorSupport.java:887)
	at org.openide.text.DocumentOpenClose$DocumentLoad.atomicLockedRun(DocumentOpenClose.java:759)
	at org.openide.text.DocumentOpenClose$DocumentLoad.run(DocumentOpenClose.java:613)
	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:653)
	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)
org.openide.text.DataEditorSupport$Env$ME: The file sqlite3.c seems to be too large (4 Mb) to safely open. 
Opening the file could cause OutOfMemoryError, which would make the IDE unusable. Do you really want to open it?
	at org.openide.text.DataEditorSupport$Env.inputStream(DataEditorSupport.java:887)
	at org.openide.text.DocumentOpenClose$DocumentLoad.atomicLockedRun(DocumentOpenClose.java:759)
	at org.openide.text.DocumentOpenClose$DocumentLoad.run(DocumentOpenClose.java:613)
	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:653)
	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)
org.openide.text.DataEditorSupport$Env$ME: The file sqlite3.c seems to be too large (4 Mb) to safely open. 
Opening the file could cause OutOfMemoryError, which would make the IDE unusable. Do you really want to open it?
	at org.openide.text.DataEditorSupport$Env.inputStream(DataEditorSupport.java:887)
	at org.openide.text.DocumentOpenClose$DocumentLoad.atomicLockedRun(DocumentOpenClose.java:759)
	at org.openide.text.DocumentOpenClose$DocumentLoad.run(DocumentOpenClose.java:613)
	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:653)
	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)
Comment 3 petrk 2015-09-16 17:04:38 UTC
Created attachment 156217 [details]
Draft version of patch
Comment 4 petrk 2015-09-16 17:10:41 UTC
Created attachment 156219 [details]
Improvement of processTokensInExpression method