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 255370

Summary: Unpredictable forward class registration
Product: cnd Reporter: Alexander Simon <alexvsimon>
Component: Code ModelAssignee: petrk
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 250075    

Description Alexander Simon 2015-09-17 14:27:17 UTC
I'm investigating failed test:
org.netbeans.modules.cnd.repository.impl.ReopenRepositoryValidationFinal

The reason of failure is:
#diff ./testRepository/ModelBuiltFromRepository.out ./testRepository-2/ModelBuiltFromRepository.out
156403c156403
< 		DUMMY_FORWARD STRUCT _GMutex[ 2677:9/84433 - 2677:23/84447 ][glib.h 2677:9-2677:23] from /var/tmp/alsimon-cnd-test-downloads/pkg-config-0.25/glib-1.2.10/glib.h
---
> 		DUMMY_FORWARD STRUCT _GMutex[ 80:3/1778 - 80:17/1792 ][glibconfig.h 80:3-80:17] from /var/tmp/alsimon-cnd-test-downloads/pkg-config-0.25/glib-1.2.10/glibconfig.h

The forward class declaration is registered in the project container (if real class declaration have not been registered yet).
As result registration of _GMutex from glib.h or _GMutex from glibconfig.h depends on parsing order of headers.
This unpredictable behavior prevents creating test that checks on equals code model in two different parsing/reparsing sessions.