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.
[200109210100] I've imported my projects from NB 3.2.1. When I'm switching between projects, NPE is thrown java.lang.NullPointerException at org.netbeans.core.windows.layers.TCRefImpl.fillBuffer (TCRefImpl.java:198) see attchmnt fo details I've tried to delete those imported projects and lot of exceptions were thrown. (java.io.FileNotFoundException) see ide.log After that, all workspaces except "Running", has disappeared.
Created attachment 2635 [details] NPE
Created attachment 2636 [details] ide.log
Primarily this problem occures in window system. Dafe, let me know if there is anything you would need from projects to make switching of winsys more robust.
Yes Vita, there is. Let's don't save winsys in projects :-) (I'm joking, but it's true that it would solve all problems that we have now)
More details: There were 4 projects in NB 3.2.1: 1. Default: (only default windows opened: Explorer and properties) 2. NewProject: (default windows opened:Explorer and properties + Options) 3. NewProject2: (default windows opened:Explorer and properties) 4. NewProject3: (default windows opened:Explorer and properties) Each project has different set of filesystems mounted. In NB 3.3: I've imported all projects using project manager. I means I've imported system/projects/cpanel.xml and system asked me, if I want to import all projects. Then I was switching between projects until NPE was thrown. Then I switched to Default projects and then I;ve deleted all remaining projects. After a while java.io.FileNotFoundExceptions was thrown and workspaces was lost.
Created attachment 2643 [details] My NB 3.2.1 userdir
I look at it.
Fixed in org.netbeans.core.windows.PersistenceManager in method createNewPair added check if new component id is unique including cache of invalid id's. It is necessary to avoid situation that the same component id is used for two different top components - first in invalid cache and second in main cache. The reason why it happens here is that during opening old NB 3.2.1 project new component is created. Then during save of window system original component is deleted and reused from invalid cache => it replaces new component in main cache however old component is not already present in window system - mode so query of its constraint fails during save.
[200109270100] Now, IllegalArgumentException is thrown, when I'm switching between imported projects.
Created attachment 2739 [details] IllegalArgumentException
Confirmed, it must be something new of course I tested it yesterday and it worked fine without this exception. I am looking at it now.
Problem is that we merge default XML workspace layout with window system layout from NB 3.2 project. Generally there can be conflict because one constraint can be populated just one mode (except CENTER). I start discussion how to merge window systems - what WS should have higher priority when conflict arises.
mslama is right. The problem is not limited to projects imported from 3.2.1. This is what to do with window system when switching projects in general. I think #15758 is a duplicate of this one.
Merging as described happens only when loading/importing old projects (old deserialization is performed). It means that switching new project is fine and this problem does not happen. I already sent question to nbui on Friday however so far no response. Perhaps I will solve it in simple way by deleting modes from default XML workspace layout to avoid conflicts/exceptions. Later if it will appear not sufficient we can add some more logic into merging.
Last problem is different. I opened new new issue #16044 for this.
200109270100_qbe1 No exceptions are thrown now, when switching projects, but behavior is still very strange. See bug 16085 and bug 16157
Resolved for 3.4.x or earlier, no new info since then -> closing.