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 15752 - Serious problems after importing 3.2.1 projects
Summary: Serious problems after importing 3.2.1 projects
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-21 11:12 UTC by Jan Becicka
Modified: 2008-12-23 09:37 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (1.83 KB, text/plain)
2001-09-21 11:13 UTC, Jan Becicka
Details
ide.log (149.16 KB, text/plain)
2001-09-21 11:15 UTC, Jan Becicka
Details
My NB 3.2.1 userdir (158.12 KB, application/octet-stream)
2001-09-21 13:29 UTC, Jan Becicka
Details
IllegalArgumentException (7.25 KB, text/plain)
2001-09-27 12:58 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2001-09-21 11:12:10 UTC
[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.
Comment 1 Jan Becicka 2001-09-21 11:13:24 UTC
Created attachment 2635 [details]
NPE
Comment 2 Jan Becicka 2001-09-21 11:15:08 UTC
Created attachment 2636 [details]
ide.log
Comment 3 Vitezslav Stejskal 2001-09-21 11:45:45 UTC
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.
Comment 4 David Simonek 2001-09-21 11:50:22 UTC
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)
Comment 5 Jan Becicka 2001-09-21 13:25:08 UTC
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.

Comment 6 Jan Becicka 2001-09-21 13:29:03 UTC
Created attachment 2643 [details]
My NB 3.2.1 userdir
Comment 7 mslama 2001-09-24 11:07:46 UTC
I look at it.
Comment 8 mslama 2001-09-26 14:10:55 UTC
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.
Comment 9 Jan Becicka 2001-09-27 12:52:04 UTC
[200109270100]
Now, IllegalArgumentException is thrown, when I'm switching between 
imported projects.
Comment 10 Jan Becicka 2001-09-27 12:58:16 UTC
Created attachment 2739 [details]
IllegalArgumentException
Comment 11 mslama 2001-09-27 13:16:29 UTC
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.
Comment 12 mslama 2001-09-27 14:28:32 UTC
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.
Comment 13 _ ttran 2001-10-01 07:43:30 UTC
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.
Comment 14 mslama 2001-10-01 08:56:44 UTC
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.
Comment 15 mslama 2001-10-01 09:37:49 UTC
Last problem is different. I opened new new issue #16044 for this.
Comment 16 Jan Becicka 2001-10-03 13:23:04 UTC
200109270100_qbe1
No exceptions are thrown now, when switching projects, but behavior 
is still very strange. See bug 16085 and bug 16157
Comment 17 Quality Engineering 2003-07-01 16:33:22 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.