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 245924 - IllegalStateException: Given file ("Program", data object is instance of class org.netbeans.modules.ide.ergonomics.fod.FodDataObjectFactory$Cookies) does not have EditorCookie.
Summary: IllegalStateException: Given file ("Program", data object is instance of clas...
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-23 17:37 UTC by Alexander Simon
Modified: 2015-09-23 22:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 210869


Attachments
stacktrace (2.11 KB, text/plain)
2014-07-23 17:37 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2014-07-23 17:37:44 UTC
Build: NetBeans IDE Dev (Build 20140723-d428d2a618e8)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b69, Java(TM) SE Runtime Environment, 1.8.0-b129
OS: Linux

User Comments:
alexvsimon: expand call graph nodes




Stacktrace: 
java.lang.IllegalStateException: Given file ("Program", data object is instance of class org.netbeans.modules.ide.ergonomics.fod.FodDataObjectFactory$Cookies) does not have EditorCookie.
   at org.netbeans.modules.cnd.api.model.xref.CsmReferenceRepository.getBaseDocument(CsmReferenceRepository.java:153)
   at org.netbeans.modules.cnd.api.model.xref.CsmReferenceRepository.getDocument(CsmReferenceRepository.java:137)
   at org.netbeans.modules.cnd.completion.impl.xref.FileReferencesImpl._accept(FileReferencesImpl.java:130)
   at org.netbeans.modules.cnd.completion.impl.xref.FileReferencesImpl.accept(FileReferencesImpl.java:109)
   at org.netbeans.modules.cnd.navigation.callgraph.CallModelImpl.getCallees(CallModelImpl.java:242)
   at org.netbeans.modules.cnd.callgraph.impl.CallGraphState.getCallees(CallGraphState.java:75)
Comment 1 Alexander Simon 2014-07-23 17:37:47 UTC
Created attachment 148243 [details]
stacktrace
Comment 2 Quality Engineering 2014-07-25 02:37:51 UTC
Integrated into 'main-silver', will be available in build *201407250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/dfef72b92113
User: Alexander Simon <alexvsimon@netbeans.org>
Log: Bug 245924 IllegalStateException: Given file ("Program", data object is instance of class org.netbeans.modules.ide.ergonomics.fod.FodDataObjectFactory$Cookies) does not have EditorCookie.
- print file path instead file name.
Comment 3 Alexander Simon 2014-07-29 06:34:05 UTC
Extended log shows:
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.cnd.callgraph.impl.CallChildren$1
java.lang.IllegalStateException: Given file ("/home/alsimon/NetBeansProjects/qq.inc", data object is instance of class org.netbeans.modules.ide.ergonomics.fod.FodDataObjectFactory$Cookies) does not have EditorCookie.
	at org.netbeans.modules.cnd.api.model.xref.CsmReferenceRepository.getBaseDocument(CsmReferenceRepository.java:153)
	at org.netbeans.modules.cnd.api.model.xref.CsmReferenceRepository.getDocument(CsmReferenceRepository.java:137)
	at org.netbeans.modules.cnd.completion.impl.xref.FileReferencesImpl._accept(FileReferencesImpl.java:132)
Comment 4 Alexander Simon 2014-07-29 06:48:03 UTC
Exception is thrown in conditions:
1. IDE is in ergonomics mode
2. Activated only C/C++ plug-in
3. Opened a C/C++ project
4. The project has a compilation unit that includes a header file with extension "inc"
5. Extension "inc" is not registered as C/C++ header extension.
As result, we have:
PHP have a registered "inc" extension as PHP file (see class org.netbeans.modules.php.editor.index.PHPIndexer).
PHP is not activated => ergonomics creates proxy data object for file with extension "inc". The proxy data object does not have EditorCookie in lookup.
C/C++ plug-in cannot create document by the proxy data object.

Work around is: add "inc" extension as C/C++ headers extensions.
Comment 5 Alexander Simon 2014-07-29 11:46:53 UTC
change message level severe->warning:
http://hg.netbeans.org/cnd-main/rev/6af00bd7b6b4
Comment 6 Quality Engineering 2014-07-31 08:58:43 UTC
Integrated into 'main-silver', will be available in build *201407310738* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6af00bd7b6b4
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #245924 IllegalStateException: Given file ("Program", data object is instance of class org.netbeans.modules.ide.ergonomics.fod.FodDataObjectFactory$Cookies) does not have EditorCookie.
- change level severe->warning
Comment 7 Vladimir Kvashin 2015-09-23 22:22:47 UTC
Silence within more than a year... closing as worksforme.