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 255560 - [newcodemodel] Exception: Invalid file in the directive: [3822-3848] annotation=null/usr/include/iso/stdio_iso.h #define stderr
Summary: [newcodemodel] Exception: Invalid file in the directive: [3822-3848] annotati...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P1 normal (vote)
Assignee: Alexander Simon
URL:
Keywords: 81_HR_FIX
: 255767 255772 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-25 10:01 UTC by soldatov
Modified: 2015-10-26 12:58 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 220191


Attachments
stacktrace (1.98 KB, text/plain)
2015-09-25 10:01 UTC, soldatov
Details
Logfile (72.19 KB, text/plain)
2015-10-03 02:54 UTC, MackSix
Details
Logfile with additional exceptions. (548.01 KB, text/plain)
2015-10-03 03:00 UTC, MackSix
Details
Logfile2 (68.17 KB, text/plain)
2015-10-03 03:12 UTC, MackSix
Details
Logfile2 with additional exceptions. (557.41 KB, text/plain)
2015-10-03 03:18 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2015-09-25 10:01:09 UTC
Build: NetBeans IDE Dev (Build 201509250002)
VM: Java HotSpot(TM) Client VM, 24.85-b07, Java(TM) SE Runtime Environment, 1.7.0_85-b33
OS: SunOS

User Comments:
soldatov: IDE has been restarted




Stacktrace: 
java.lang.Exception: Invalid file in the directive: [3822-3848] annotation=null/usr/include/iso/stdio_iso.h #define stderr
   at org.netbeans.modules.cnd.utils.CndUtils.severe(CndUtils.java:206)
   at org.netbeans.modules.cnd.utils.CndUtils.assertTrue(CndUtils.java:191)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.MacroReference.createMacroReference(MacroReference.java:101)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankMacroUsagesSupport.addMacroExpansions(ClankMacroUsagesSupport.java:94)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankMacroUsagesSupport.getMacroUsages(ClankMacroUsagesSupport.java:69)
   at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankTokenStreamProducer.getMacroUsages(ClankTokenStreamProducer.java:200)
Comment 1 soldatov 2015-09-25 10:01:10 UTC
Created attachment 156423 [details]
stacktrace
Comment 2 Vladimir Voskresensky 2015-09-25 10:44:10 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=255419?
Comment 3 Vladimir Voskresensky 2015-09-25 10:45:54 UTC
+
https://netbeans.org/bugzilla/show_bug.cgi?id=255256
Comment 4 soldatov 2015-09-25 11:05:19 UTC
My scenario:
- Call "C/C++ Application" wizard
- Select "C" standard
- Push Finish
- Open main.c
==> exception
Comment 5 Vladimir Kvashin 2015-09-25 13:35:36 UTC
fixed:
http://hg.netbeans.org/cnd-main/rev/759b0e9b4db6
Comment 6 Vladimir Kvashin 2015-09-25 13:35:53 UTC
*** Bug 255419 has been marked as a duplicate of this bug. ***
Comment 7 petrk 2015-09-29 12:40:32 UTC
Reopened. Steps to reproduce:
1) Create Cpp project.
2) Set Cpp11 standard and add boost 1.55 into additional include directories.
3) Create new header file (do not include it from main.cpp, let it be orphan)
3) Place the following #include directive into the header file.
#include <boost/spirit/home/classic/utility/lists.hpp>
4) Navigate into "lists.hpp" and wait until exception happens


java.lang.Exception: Invalid file in the directive: [14956-14997] annotation=null/export/devarea/boost_1_55/boost_1_55_0/boost/config/suffix.hpp #define BOOST_DEDUCED_TYPENAME
	at org.netbeans.modules.cnd.utils.CndUtils.severe(CndUtils.java:206)
	at org.netbeans.modules.cnd.utils.CndUtils.assertTrue(CndUtils.java:191)
	at org.netbeans.modules.cnd.modelimpl.parser.clank.MacroReference.createMacroReference(MacroReference.java:101)
	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankMacroUsagesSupport.addMacroExpansions(ClankMacroUsagesSupport.java:94)
	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankMacroUsagesSupport.getMacroUsages(ClankMacroUsagesSupport.java:69)
	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankTokenStreamProducer.getMacroUsages(ClankTokenStreamProducer.java:199)
	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankTokenStreamProducer.getMacroUsages(ClankTokenStreamProducer.java:111)
	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankFileInfoQuerySupport.getMacroUsages(ClankFileInfoQuerySupport.java:82)
	at org.netbeans.modules.cnd.modelimpl.impl.services.FileInfoQueryImpl.getMacroUsages(FileInfoQueryImpl.java:331)
	at org.netbeans.modules.cnd.highlight.semantic.ModelUtils.getMacroBlocks(ModelUtils.java:120)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticEntitiesProvider$MacrosCodeProvider.getBlocks(SemanticEntitiesProvider.java:354)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.updateImpl(SemanticHighlighter.java:205)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter.access$500(SemanticHighlighter.java:91)
	at org.netbeans.modules.cnd.highlight.semantic.SemanticHighlighter$TaskContext.run(SemanticHighlighter.java:433)
	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 8 DimaZh 2015-09-30 14:54:25 UTC
A show-stopper.
Comment 9 Jiri Kovalsky 2015-10-01 15:21:51 UTC
Updating TM accordingly.
Comment 10 MackSix 2015-10-01 16:04:32 UTC
Are these exceptions the same bug? A new issue failed to be created for them. 

http://statistics.netbeans.org/analytics/detail.do?id=220302
Comment 11 Vladimir Voskresensky 2015-10-02 14:15:45 UTC
Hello MackSix,

We need you help to get more information. The problem might be system dependent (i.e. Windows specific), so I've added extra logging.

Could you, please, download dev build with my extra logging and try to reproduce this exceptions again. 
It might be that exception appears only in message.log file, which you can see in IDE using View->IDE Log menu item.
http://deadlock.netbeans.org/job/cnd-main/2924/artifact/nbbuild/NetBeans-dev-cnd-main-2924-on-20151002-full.zip

Thank you very much.
Vladimir.
Comment 12 MackSix 2015-10-03 02:54:03 UTC
Created attachment 156495 [details]
Logfile

I did all sorts of things to get this to happen with no luck and then I activated Java SE & JavaFX and after they were activated I opened up a CPP source file in one of the 6 C/C++ projects I had open and it happened. I may have viewed the properties of the project when it happened. I forget now. I will try again. 

Product Version: NetBeans IDE Dev (Build cnd-main-2924-on-20151002)
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)
Comment 13 Quality Engineering 2015-10-03 02:59:47 UTC
Integrated into 'main-silver', will be available in build *201510030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c47bb535a892
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixing #255560 - [newcodemodel] Exception: Invalid file in the directive
- more information in assert
Comment 14 MackSix 2015-10-03 03:00:39 UTC
Created attachment 156496 [details]
Logfile with additional exceptions.

I opened up a source file from the next project with #include <GL/glut.h> and it happened again. I then opened up 2 files in other non-GL projects and they opened up ok. Then I opened up another source with #include <GL/glut.h>  in it and it happened again.

This is the same Logfile with the additional occurrences in it.
Comment 15 MackSix 2015-10-03 03:12:28 UTC
Created attachment 156497 [details]
Logfile2

I restarted NetBeans and this exception was in the logfile:

java.lang.IllegalStateException: Bundle "reference:file:ide/modules/com-jcraft-jsch.jar" has been uninstalled

See attached Logfile2
Comment 16 MackSix 2015-10-03 03:18:36 UTC
Created attachment 156498 [details]
Logfile2 with additional exceptions.

This is a continuation after the previous Logfile2. I opened up the source files with #include <GL/glut.h> in them and got the originally reported exceptions again.

It seems this started after activating Java SE and JavaFX for some reason? Maybe just a coincidence?
Comment 17 Vladimir Voskresensky 2015-10-05 12:05:23 UTC
Alexander, could you, please, try to reproduce the issue on Windows?
Comment 18 Alexander Simon 2015-10-06 16:05:09 UTC
I have found reproducible test case on Solaris + GNU tool collection:
1. Create C++ application with main.cpp file:

//#include "status.h"
int foo() {
    return INT_MAX;
}

2. Reparse project.
3. Uncomment first include directive (do not save file).

See exception in log.
Comment 19 Alexander Simon 2015-10-07 13:42:03 UTC
create library file while preprocessing, change set:
http://hg.netbeans.org/cnd-main/rev/869c27691372
Comment 20 Vladimir Voskresensky 2015-10-07 16:26:50 UTC
*** Bug 255772 has been marked as a duplicate of this bug. ***
Comment 21 Alexander Simon 2015-10-07 16:44:19 UTC
create library file while preprocessing, additional change set:
http://hg.netbeans.org/cnd-main/rev/bd79f9b84f47
Comment 22 Jiri Kovalsky 2015-10-08 12:18:09 UTC
Can you guys someone please verify this in the next development build? Thanks a lot!
Comment 23 Vladimir Voskresensky 2015-10-08 13:31:21 UTC
*** Bug 255767 has been marked as a duplicate of this bug. ***
Comment 24 Alexander Simon 2015-10-08 15:03:18 UTC
Valera,
please, verify the fix.
Vladimir V.,
please, review the fix.
Comment 25 soldatov 2015-10-08 15:19:13 UTC
Verified.
I don't see any exceptions if I check scenarios from Comment 4 and Comment 18.
Comment 26 Quality Engineering 2015-10-09 01:21:59 UTC
Integrated into 'main-silver', will be available in build *201510090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/869c27691372
User: Alexander Simon <tester@netbeans.org>
Log: fixing Bug #255560 [newcodemodel] Exception: Invalid file in the directive: [3822-3848] annotation=null/usr/include/iso/stdio_iso.h #define stder
Comment 27 Vladimir Voskresensky 2015-10-12 16:30:16 UTC
Fix is reviewed. It is correct
Comment 29 soldatov 2015-10-26 12:58:59 UTC
Verified in NetBeans IDE 8.1 (Build 201510222201)