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 31974 - [completion] Parser DB is deleted when switching Project
Summary: [completion] Parser DB is deleted when switching Project
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2003-03-13 11:31 UTC by tkellerer
Modified: 2007-11-05 13:44 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
cvs log of changes (1.64 KB, text/plain)
2003-03-14 18:18 UTC, Vitezslav Stejskal
Details
Patch for release35. (35.80 KB, application/octet-stream)
2003-04-02 09:48 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tkellerer 2003-03-13 11:31:12 UTC
Create/Update the parser database for one project.
The .jcb and .jcs files are created in
<userdir>/system/ParserDB. Switch to a different
project -> the files are gone.

When the files are copied to a different location
before switching the project and then copied into
the ParserDB directory afterwards, they won't be
deleted even if the project is switched again.


3.5 Dev build 200303102350 
JDK 1.4.1_02
Windows 2000 SP2
Comment 1 Milan Kubec 2003-03-13 15:04:05 UTC
The same happens if user creates new project too.
Comment 2 Milan Kubec 2003-03-14 16:04:16 UTC
Lowering prio to P2. It's indeed data loss, but not permanent, since
parserDB is recreated as background task after mounting new filesystem
(= opening/creating project). Reassigning to editor, the bug is
actually in editor code, but Vita agreed to fix.
Comment 3 Vitezslav Stejskal 2003-03-14 18:17:48 UTC
Fixed in main trunk. The parser DB is stored in projects layer. It is
not synchronized with Repository during the projects switch. Also it
is neccessary to filter out parser DB files when importing userdir
from older version of IDE, because these files were stored in session
and couldn't be stored in the project now. I've added this filter to
Import Settings Wizard. Hopefully this isn't big deal.

Let's wait some time and test it before merging this fix to release35.
Thomas could you please test it on your side as well? Thanks.
Comment 4 Vitezslav Stejskal 2003-03-14 18:18:29 UTC
Created attachment 9412 [details]
cvs log of changes
Comment 5 Martin Roskanin 2003-03-18 12:59:14 UTC
Some problems occured after switching projects while the parsing
process was running. The parsing should be interrupted  before
switching to another project. 

/cvs/editor/src/org/netbeans/modules/editor/java/JCStorage.java,v  <--
 JCStorage.java
new revision: 1.47; previous revision: 1.46

Comment 6 Martin Roskanin 2003-03-18 14:44:23 UTC
The same for foreground parsing...
Interrupt foreground parsing process during projects switching

/cvs/editor/src/org/netbeans/modules/editor/java/JCStorage.java,v  <--
 JCStorage.java
new revision: 1.48; previous revision: 1.47

/cvs/editor/src/org/netbeans/modules/editor/java/JCUpdater.java,v  <--
 JCUpdater.java
new revision: 1.57; previous revision: 1.56
Comment 7 Martin Roskanin 2003-03-19 16:16:34 UTC
Recreating parser DB files after settings imports

/cvs/editor/src/org/netbeans/modules/editor/java/JCStorage.java,v  <--
 JCStorage.java
new revision: 1.49; previous revision: 1.48
Comment 8 Vitezslav Stejskal 2003-03-20 10:50:51 UTC
Corrected filter for filtering parser databases when importing user
directory from older versions.

/cvs/core/ide/src/org/netbeans/core/upgrade/userdir.cfg
new revision: 1.7; previous revision: 1.6

Martine, your last patch seems to work good. Milane, could you please
test this once more, if there will not be any problems I will merge it
in release35 branch tommorow.
Comment 9 Milan Kubec 2003-03-21 11:15:12 UTC
"Project part" verified. Can be merged to release35.
Comment 10 Vitezslav Stejskal 2003-03-21 15:20:45 UTC
merged to release35
Comment 11 Petr Nejedly 2003-03-31 13:55:07 UTC
The fix causes big startup time regression as it fully initializes
(parses) JCStorage during the startup. Please improve the fix
to not have this side effect.
Comment 13 Vitezslav Stejskal 2003-04-01 08:42:40 UTC
Martine, the fix seems correct to me.
Comment 14 Martin Roskanin 2003-04-02 09:48:06 UTC
Created attachment 9646 [details]
Patch for release35.
Comment 15 Martin Roskanin 2003-04-02 09:50:30 UTC
Eman could you please verify the patch?
Copy the attached editor.jar to
<NB-install>/modules/patches/org-netbeans-modules-editor folder. Thanks.

Comment 16 ehucka 2003-04-02 14:02:30 UTC
Verified in NB 3.5 build 200304012350.
Comment 17 _ ttran 2003-04-04 11:01:01 UTC
approved for 3.5
Comment 18 Martin Roskanin 2003-04-04 11:20:04 UTC
integrated into [release35]

/cvs/editor/src/org/netbeans/modules/editor/EditorModule.java,v  <-- 
EditorModule.java
new revision: 1.97.2.2; previous revision: 1.97.2.1

/cvs/editor/src/org/netbeans/modules/editor/EditorWarmUpTask.java,v 
<--  EditorWarmUpTask.java
new revision: 1.4.2.1; previous revision: 1.4

/cvs/editor/src/org/netbeans/modules/editor/java/JCStorage.java,v  <--
 JCStorage.java
new revision: 1.45.2.3; previous revision: 1.45.2.2
Comment 19 pfelenda 2003-09-09 13:27:20 UTC
Verified in build 200306022350 release35.
Comment 20 bht 2003-10-26 09:43:15 UTC
Please refer to issue 32042 where I described a testcase. It's not fixed.
When I switch projects, then the parser DB files are deleted.
I can re-build them ok. When I switch again, then they are lost again.
I realise that the parser DB files are now in project directories.

System Info: 
Product Version = NetBeans IDE Dev (Build 200310221740)
Operating System = Windows 98 version 4.10 running on x86
Java; VM; Vendor      = 1.4.1; Java HotSpot(TM) Client VM 1.4.1-b21;
Sun Microsystems Inc.
Comment 21 Vitezslav Stejskal 2003-11-04 17:09:57 UTC
It seems to work fine on my machine. Parser DBs are preserved during
projects switch (also the issue #32042 was closed as worksforme).
Comment 22 pfelenda 2003-11-20 14:26:21 UTC
Verified in release 35 and dev build 200311191900.

I tried reproduce the scenario described in original message on last dev 
 and r35 builds.
Result of my test is that the Parser DB is not removed when switching
projects.
Comment 23 bht 2003-11-20 20:53:53 UTC
I would agree that this has morphed from the original issue into
something else that is more difficult to reproduce. However,
description and symptoms are exactly the same.
I find it hard to reproduce myself because at present I am not
switching projects that often.
One additional observation could probably explain why this happens:

When I opened an alternate project today after a long time, one file
system was mounted in explorer as "Duplicate " + <original file system
name> although it was NOT duplicate except the last directory name in
the path. Files in the editor also had the "Duplicate " prefixes in
the tabs. Without making any changes, I re-opened the project and the
"Duplicate" file system was mounted normally. However, the code
completion did not work any more.
Comment 24 Martin Roskanin 2003-11-24 15:34:50 UTC
I cannot reproduce it.
Which build do you use?
Comment 25 bht 2003-11-24 19:18:08 UTC
I find this difficult to reproduce myself.
It happened with q-build 2003-10-31-2030.
Comment 26 Martin Roskanin 2003-11-25 13:50:02 UTC
Because the problem is not reproducible always as it was in this issue
I have created another issue (issue #37481) with lower priority to
track the problem you described. 
Comment 27 pfelenda 2004-01-27 00:03:06 UTC
Verified - The original issue was fixed and the scenario from B.T. is 
described in issue #37481.