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 256770 - Changing toolchain on multiple projects causes problems
Summary: Changing toolchain on multiple projects causes problems
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-25 04:16 UTC by MackSix
Modified: 2016-02-03 11:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
logfile (445.46 KB, text/plain)
2015-11-25 04:16 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2015-11-25 04:16:50 UTC
Created attachment 157487 [details]
logfile

First, if multiple C++ projects are open and I change the toolchain on one of them, all projects are parsed. This takes a long time to parse other projects for no good reason.

Second, if I change toolchain on multiple open projects at the same time, it causes problems and all sorts of exceptions and warnings can happen. It may also cause open files in a project fail to resolve identifiers. It may take 2 reparses to resolve them, or they won't resolve at all without restarting NetBeans.

Product Version: NetBeans IDE Dev (Build 201511240002)
Java: 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM 25.66-b17
Runtime: Java(TM) SE Runtime Environment 1.8.0_66-b17
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)
Comment 1 Alexander Simon 2015-12-16 09:33:02 UTC
A lot of exceptions in log.
Comment 2 Vladimir Kvashin 2015-12-21 13:46:11 UTC
I can easily reproduce reparsing all projects when tool chain is changed for only one of them.

The stack that forgets, which project is changed is:

"Configurations events"
	at org.netbeans.modules.cnd.modelimpl.platform.CsmEventDispatcher$ItemListener.filesPropertiesChanged(CsmEventDispatcher.java:451)
	at org.netbeans.modules.cnd.makeproject.NativeProjectProvider.fireFilesPropertiesChanged(NativeProjectProvider.java:343)
	at org.netbeans.modules.cnd.makeproject.NativeProjectProvider.checkConfigurationChangedWorker(NativeProjectProvider.java:467)
	at org.netbeans.modules.cnd.makeproject.NativeProjectProvider.checkConfigurationChanged(NativeProjectProvider.java:414)
	at org.netbeans.modules.cnd.makeproject.NativeProjectProvider.propertyChange(NativeProjectProvider.java:590)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
...

This seems to be a regression caused by 
hg.netbeans.org/cnd-main/rev/b45362ca9870
Comment 3 Vladimir Kvashin 2015-12-22 16:03:44 UTC
Pushed to enum:
  5e7927b7bc9c
  2e6b7f219fb3
Comment 4 Vladimir Kvashin 2015-12-23 12:54:14 UTC
Additional fix on enum
  686abd77101a

Some files from other open projects can still be parsed when you change tool chain. This happens because of our "parse once" optimization and the fact that compilation units that were supposed the "best context" for a particular header can change.
Comment 5 Quality Engineering 2016-01-12 02:28:04 UTC
Integrated into 'main-silver', will be available in build *201601120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/828892c4e8f6
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: Changes in NativeProjectListener that are needed to fix #256770 - Changing toolchain on multiple projects causes problems
(transplanted from 5e7927b7bc9c3bc1f9e6f6c36c57cc9ae8c12054)
Comment 6 MackSix 2016-01-13 01:08:31 UTC
verified fixed in:

Product Version: NetBeans IDE Dev (Build 201601120002)
Java: 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM 25.66-b17
Runtime: Java(TM) SE Runtime Environment 1.8.0_66-b17
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)
Comment 8 soldatov 2016-02-03 11:08:33 UTC
Verified in NetBeans 8.1 patch1