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 249242 - False Error Reporting
Summary: False Error Reporting
Status: REOPENED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-09 19:54 UTC by aschwarz1309
Modified: 2017-04-05 11:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (36.56 KB, text/plain)
2014-12-09 19:54 UTC, aschwarz1309
Details
Project created by your problem descripton (5.73 KB, application/octet-stream)
2015-02-02 15:28 UTC, Alexander Simon
Details
Project source. Errors are prominent. (65.21 KB, application/octet-stream)
2015-02-03 14:18 UTC, aschwarz1309
Details
Required toolset. Install headers in /usr/local/include/slip (266.76 KB, application/octet-stream)
2015-02-03 14:26 UTC, aschwarz1309
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aschwarz1309 2014-12-09 19:54:09 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_40
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.0-b56
gcc 4.8.3

False errors are reported. This is a continuous problem with NB. In the last 2 or 3 years this has been a continuous issue where each NB releae has some errors repaired and new one crop up. In this case I have:

A header file: FrontEnd.h
A header file: Generation.h
A source file: Generation.cpp

In Generation.cpp false errors are reported. The program compiles and builds correctly (error free).

A truncated example is:

FRONTEND.H

class FrontEnd {
private:
   long    optionFlags;                               //!< options
   long    fileNdx;                                   //!< index to filename list
   size_t  maxStringSize;                             //!< maximum size of any keyword
   string  filename;                                  //!< current filename
   bool    inputFlag;                                 //!< output input flag
   bool    optionInput;                               //!< input debug flag
   vector<string*>& vec;                              //!< keyword list
   vector<string*>& filenames;                        //!< list of filenames
private:
   FrontEnd(const FrontEnd& orig) : vec(*new vector<string*>) 
                                  , filenames(*new vector<string*>)
                                  , fileNdx(0)
                                  , maxStringSize(0)
   { };
   static
   int     compar (const void* p1, const void* p2);
   bool    getopt(int argc, char** argv);
   bool    input(filebuf& fb);
   size_t  maxString();
   bool    open(filebuf* fb);
   void    uniqueSort();   
public:
   FrontEnd(int argc, char** argv);
   virtual ~FrontEnd();
   bool    openFile();
   string  getFilename()   { return filename; }
   long    getOptions()    { return optionFlags; }
   vector<string*>& getInput() { return vec; }
   size_t  getStringSize() { return maxStringSize; }
   bool    getSuccess()    { return inputFlag; }
}; // class FrontEnd

GENERATE.H

class FrontEnd;

class Generate {
public:
   struct tuple {
      string   partition;
      long     ndx;                                     //<! index of keyword string
   };
private:
   const  long numberInputStrings;                      //!< number of input strings
   const  size_t maxStringSize;                         //!< maximum string size
   const  bool maxFlag;                                 //!< generate maximal MPHF
   const  bool minFlag;                                 //!< generate minimal MPHF
   const  vector<string*>& vec;                         //!< pointer to keywords
   tuple* mapping;                                      //!< <partition, keyword>

public:

       /*************************************************
        *           Constructors & Destructors          *
        ************************************************/
   Generate( FrontEnd& fr );
   virtual ~Generate() { delete mapping; }
   
private:
   Generate(const Generate& orig) : vec(orig.vec)
                                  , numberInputStrings(0)
                                  , maxStringSize(0)
                                  , maxFlag(false)
                                  , minFlag(false)
                                  , mapping(NULL)
                                  { };

       /*************************************************
        *                 Private Methods               *
        ************************************************/
   void driver();

};


GENERATE.CPP

Generate::Generate( FrontEnd& fr ) : vec(fr.getInput())                               // MARKED AS ERROR
                                   , numberInputStrings(vec.size())
                                   , maxStringSize(fr.getStringSize())                         // MARKED AS ERROR
                                   , maxFlag(fr.getOptions() && OPTION_MAX)          // MARKED AS ERROR
                                   , minFlag(fr.getOptions() && OPTION_MIN)          // MARKED AS ERROR
{
Comment 1 aschwarz1309 2014-12-09 19:54:12 UTC
Created attachment 150994 [details]
IDE log
Comment 2 aschwarz1309 2014-12-11 18:55:26 UTC
Any chance that the priority can be elevated? It's really annoying. I am back up to 100's of false errors / file. It's extremely annoying. Not to be too much of a pimple, this seems to be a recurring problem within NB. It never really goes away. It just becomes either more or less annoying.

As an example, in the following structure all names have an "Unable to resolve identifier" error associated with them {Tuple, var, singleton, col}.

     struct Tuple {
         double var;
         long   singleton;
         long   col;
      };
Comment 3 aschwarz1309 2014-12-11 21:11:59 UTC
I just noticed that 'Navigator' does not list C++ methods when false errors are reported. That is, when a class source file shows one or more false errors, the Navigator window no longer shows class members. A feature.
Comment 4 Alexander Simon 2015-02-02 15:15:19 UTC
Please provide all compiled sources.
It is impossible to understand the bug.
Comment 5 Alexander Simon 2015-02-02 15:28:23 UTC
Created attachment 151781 [details]
Project created by your problem descripton

I do not see any problem.
Comment 6 aschwarz1309 2015-02-03 14:17:05 UTC
The issues are sporadic. There is no definite prelude so that it is difficult for (me) to say because of this, that happened (causation is faulty). However, here are the sources. 

There are two distinct projects. SLIP, a toolset, and MPHASH, the project.
Comment 7 aschwarz1309 2015-02-03 14:18:37 UTC
Created attachment 151791 [details]
Project source. Errors are prominent.
Comment 8 aschwarz1309 2015-02-03 14:26:07 UTC
Created attachment 151792 [details]
Required toolset. Install headers in /usr/local/include/slip