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 250075 - Finishing interrupted parsing produces broken code model
Summary: Finishing interrupted parsing produces broken code model
Status: REOPENED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on: 255370 255337
Blocks:
  Show dependency tree
 
Reported: 2015-01-28 16:30 UTC by henk89
Modified: 2015-10-28 12:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description henk89 2015-01-28 16:30:51 UTC

    
Comment 1 Alexander Simon 2015-02-14 08:35:31 UTC
The bug is about finishing interrupted parsing.
I.e.
- open project, wait start parsing.
- exit from IDE while parsing
- confirm exit in spite of not finished parsing.
- start IDE, IDE finishing parsing
Result: code model is broken in unpredictable places.
The test IncrementalParseRepositoryValidationFinal proves it fact.
Comment 2 Quality Engineering 2015-02-15 06:51:08 UTC
Integrated into 'main-silver', will be available in build *201502150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/41abaf58e61b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: Code model has a bug:
Bug 250075 - Finishing interrupted parsing produces broken code model
The test IncrementalParseRepositoryValidationFinal proves it.
The nature of the test is "random failures".
So author of the test annotated the test by "@RandomlyFails" annotation.
It is true.
But the test can be ran only in test suite (IncrementalParseRepositoryValidationTest).
Separately started the test is 100% failed because previous two test from suite had prepared golden data.
CND has "Unstable tests" hudson job that starts all tests marked as "@RandomlyFails".
It does not work for the IncrementalParseRepositoryValidationFinal test.
This fix is a work around that skips the test in "Unstable tests" hudson job.
Comment 3 Alexander Simon 2015-07-09 05:48:16 UTC
make working randomly failed annotation:
http://hg.netbeans.org/cnd-main/rev/3336aa7ece74
Comment 4 Quality Engineering 2015-09-11 01:23:28 UTC
Integrated into 'main-silver', will be available in build *201509110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5c5abbd07f60
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #250075 Finishing interrupted parsing produces broken code model
Comment 5 Quality Engineering 2015-09-12 03:06:29 UTC
Integrated into 'main-silver', will be available in build *201509120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6ac3f268018e
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #250075 Finishing interrupted parsing produces broken code model
Comment 6 Alexander Simon 2015-09-17 14:32:09 UTC
work around of the issue blocker Bug #255370
http://hg.netbeans.org/cnd-main/rev/1c49afef4aa3
Comment 7 Quality Engineering 2015-09-18 01:40:57 UTC
Integrated into 'main-silver', will be available in build *201509180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1c49afef4aa3
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #250075 Finishing interrupted parsing produces broken code model
- work around of issue blocker Bug #255370
Comment 8 Alexander Simon 2015-09-18 15:51:45 UTC
work around of the blocker Bug #255337 [newcodemodel] preprocessor states differ on 1
It seems new code model do not use file owner query and always assume UTF-8 encoding.
Provide default owner query for test which returns UTF-8 
Change set:
http://hg.netbeans.org/cnd-main/rev/7121a799ed9b

So isolating the blockers problem should fix this issue.
Comment 9 Quality Engineering 2015-09-19 03:05:14 UTC
Integrated into 'main-silver', will be available in build *201509190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9a5ca2c5267e
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #250075 Finishing interrupted parsing produces broken code model
- switch on by default interrupted test
- use buffered input/output stream
Comment 10 Vladimir Voskresensky 2015-09-21 16:24:10 UTC
It still fails on my machine
	  10001 - FUNCTION DEFINITION g_bit_storage  [1613:1/49193-1625:2/49365] FunctionDDImpl SCOPE: $Global$ 
	        + FUNCTION DEFINITION g_bit_storage  [1613:1/49193-1625:2/49365] FunctionDDImpl SCOPE: glib.h
	  10002       SIGNATURE g_bit_storage(guint)
	  10003       UNIQUE NAME f:g_bit_storage(guint)
	  10004 -     DECLARATION: g_bit_storage  [1611:1/49123-1611:54/49172]
	        +     DECLARATION: g_bit_storage  [1613:1/49193-1625:2/49365]
	  10005       PARAMETERS:
	  10006           number [1614:16/49228-1614:28/49240]  TYPE: guint TEXT=guint  [1614:16/49228-1614:21/49233]  INIT: null  SCOPE: g_bit_storage 
	  10007       RETURNS guint TEXT=guint  [1613:15/49207-1613:20/49212]
	  11347       G_SEEK_END
	  11348   TYPEDEF GSeekType  [2351:3/74215-2351:12/74224] TYPE:  TEXT=typedef enum { G_SEEK_CUR G_SEEK_SET G_SEEK_END } GSeekType ;  [2346:1/74157-2351:13/74225] SCOPE: $Global$ 
	  11349   ENUM  [2352:1/74226-2360:2/74433] SCOPE: $Global$ 
	  11350 -     G_IO_IN
	        + TYPEDEF GIOCondition  [2360:3/74434-2360:15/74446] TYPE:  TEXT=typedef enum { } GIOCondition ;  [2352:1/74226-2360:16/74447] SCOPE: $Global$ 
	  11351 -     G_IO_OUT
	  11352 -     G_IO_PRI
	  11353 -     G_IO_ERR
	  11354 -     G_IO_HUP
	  11355 -     G_IO_NVAL
	  11356 - TYPEDEF GIOCondition  [2360:3/74434-2360:15/74446] TYPE:  TEXT=typedef enum { G_IO_IN = 1 G_IO_OUT = 4 G_IO_PRI = 2 G_IO_ERR = 8 G_IO_HUP = 16 G_IO_NVAL = 32 } GIOCondition ;  [2352:1/74226-2360:16/74447] SCOPE: $Global$
Comment 11 DimaZh 2015-09-25 16:19:15 UTC
It looks like occasional issue at this moment, should be P3