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 15416 - serialization problem
Summary: serialization problem
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: David Simonek
URL:
Keywords:
: 15575 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-09-12 16:38 UTC by David Konecny
Modified: 2008-12-23 09:02 UTC (History)
1 user (show)

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 David Konecny 2001-09-12 16:38:06 UTC
First how to reproduce the problem:
1.) intall new IDE and clean userdir
2.) start IDE, open MemoryView.java file (new TopComponent is created),  
     close file (TopCOmponent is closed), close the IDE
3.) repeat step 2.) a few times 

The results of these steps are:
1.) in system\Projects\Default\system\windows\windowmanager\Editing\editor there
     are created many MemoryView_*.wstcref files
2.) opening of first file in IDE is much slower because each serialized instance is deserialized
     and for each is created new instance of NbDocument which is immediatelly thrown away
3.) the longer you are working with the IDE, the worse situation will be
Comment 1 David Simonek 2001-09-12 17:38:43 UTC
Difficult. Design problem. At this time I don't know how to solve this
issue. I'll need to talk to other core members to find possible ways
how to solve this issue. Expect fixing time longer then one week.
Comment 2 David Simonek 2001-09-19 10:40:36 UTC
*** Issue 15575 has been marked as a duplicate of this issue. ***
Comment 3 David Simonek 2001-09-19 10:57:42 UTC
Even more important then it seems from the first sight. System will be
nearly unusable after several weeks of using.
I'm trying to fix this with automatic removal of serialized components
which are not referenced or don't want to be persistent itself.
However, I'm facing problems with lazy loading - I can't find out if I
can discard component forever, because it can be stored somewhere in
the part that it not loaded in the memory at a time. I would need to
load all info about top component references to recognize that I can
delete settings file for sure, which is impossible due to lazy
loading. So, some kind of additional information or so is
required...I'm working on it.
Comment 4 David Konecny 2001-09-19 13:16:07 UTC
One interesting observation:
I have in Projects\Default\system\windows\windowmanager\Editing\editor 
directory three files for 'DocumentLine.java'.

In 'DocumentLine _LMod; 1.33_.wstcref'
is '<ui-type state="closed"  ....'

In 'DocumentLine _LMod; 1.33__1.wstcref'
is '<ui-type state="closed"  ....'

In 'DocumentLine _LMod; 1.33__2.wstcref'
is '<ui-type state="opened"  ....'

I'm not able to explain why, but what window system does is that it:
* loads the third wstcref file and open the topcomponent with the 
document
* then it parses also previous two files where is specified that state 
is -closed- and so it immediatelly tries to close the topcomponent 
with the document

Closing of the document in second step is not successful - document is 
not closed, only ChangeListeners are removed and UndoManager is 
removed. From that moment the document is still visible and can be 
editted, but undo does not work and file cannot be saved, etc.

I think once we fix the original serialization problem, the problem 
which I just described will disappear as well.
Comment 5 David Simonek 2001-09-25 14:43:58 UTC
Fixed, will be visible in tomorrow's build.
Comment 6 Marian Mirilovic 2001-11-05 13:21:13 UTC
verified in [nb_dev](20011102)

Serialized components which are not referenced are automatically
removed.
Comment 7 Quality Engineering 2003-07-01 16:39:34 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.