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 49405 - AssertionError during startup
Summary: AssertionError during startup
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-09-22 12:52 UTC by jadjong
Modified: 2004-10-22 14:44 UTC (History)
7 users (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 jadjong 2004-09-22 12:52:11 UTC
During startup the IDE complains that it cannot
create the build.properties file and throws the
following exception:

java.lang.AssertionError: Could not make
/home/strw/jdejong/.netbeans/4.0beta1/build.properties;
no masterfs?
        at
org.netbeans.spi.project.support.ant.PropertyUtils$2.run(PropertyUtils.java:135)
        at
org.openide.util.Mutex.writeAccess(Mutex.java:298)
        at
org.netbeans.spi.project.support.ant.PropertyUtils.putGlobalProperties(PropertyUtils.java:126)
        at
org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryTypeProvider$1.run(J2SELibraryTypeProvider.java:85)
        at
org.openide.util.Mutex.postRequest(Mutex.java:866)
        at
org.openide.util.Mutex.postWriteRequest(Mutex.java:364)
        at
org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryTypeProvider.libraryCreated(J2SELibraryTypeProvider.java:79)
        at
org.netbeans.modules.project.libraries.LibrariesStorage.loadFromStorage(LibrariesStorage.java:110)
        at
org.netbeans.modules.project.libraries.LibrariesStorage.<init>(LibrariesStorage.java:59)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at
java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at
org.openide.util.lookup.MetaInfServicesLookup$P.getInstance(MetaInfServicesLookup.java:346)
        at
org.openide.util.lookup.AbstractLookup$R.allInstances(AbstractLookup.java:696)
        at
org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:369)
        at
org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:320)
        at
org.netbeans.modules.project.libraries.LibrariesModule.restored(LibrariesModule.java:32)
        at
org.netbeans.core.modules.NbInstaller.loadCode(NbInstaller.java:322)
        at
org.netbeans.core.modules.NbInstaller.load(NbInstaller.java:240)
        at
org.netbeans.core.modules.ModuleManager.enable(ModuleManager.java:861)
        at
org.netbeans.core.modules.ModuleList.installNew(ModuleList.java:350)
        at
org.netbeans.core.modules.ModuleList.trigger(ModuleList.java:284)
        at
org.netbeans.core.modules.ModuleSystem.restore(ModuleSystem.java:253)
        at
org.netbeans.core.NonGui.run(NonGui.java:369)
        at org.netbeans.core.Main.run(Main.java:168)
        at
org.netbeans.core.NbTopManager.getNbTopManager(NbTopManager.java:232)
        at
org.netbeans.core.NbTopManager.get(NbTopManager.java:187)
        at org.netbeans.core.Main.start(Main.java:310)
[catch] at
org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
        at java.lang.Thread.run(Thread.java:595)


However, the $HOME/.netbeans/4.0beta1 directory is
present and contains the build.properties file.
The IDE hangs on this error.
Comment 1 _ ttran 2004-09-22 14:21:33 UTC
please attach your $HOME/.netbeans/4.0beta1/var/log/messages.log
Comment 2 Jesse Glick 2004-09-22 15:08:59 UTC
Same as issue #49037. No idea how to reproduce in that case.

Reporter, please mention anything vaguely unusual about your home
directory or NB $userdir - use of network drives, symlinks, etc.
Comment 3 rmatous 2004-09-22 15:52:17 UTC
Priority decreased to P3 because there isn't way how to reproduce.

Is it permanent problem, random or it occured just once ? Are there
any special steps how to reproduce ? 

Anyway please provide as much information as you can.
Comment 4 jadjong 2004-09-23 10:39:33 UTC
The problem is persistent and occurs at each startup of Netbeans.
Uninstalling Netbeans, deleting the $HOME/.netbeans directory and
re-installing Netbeans did not help. Since you cannot reproduce this
error it may have to do with my specific Linux configuration.
Therefore, I plan to download the source code to try to debug this
issue myself.
Comment 5 rmatous 2004-09-23 11:39:12 UTC
Great, I really apreciate it.

Maybe you could run unit tests for masterfs. There would be
interesting to see if some test fail. There is necessary :
1/ checkout sources 
2/ build IDE
3/ build xtest (in folder xtest launch ant build.xml)
4/ run tests for masterfs (in folder openide\masterfs\test launch ant
build.xml)
5/ results can be found in openide\masterfs\test\results\index.html



Comment 6 Jesse Glick 2004-09-23 18:34:44 UTC
Also try a different user directory. Just try with e.g.

..../netbeans --userdir /tmp/test49405

(a not-yet-existent dir) and see if you still have the same problem.
If so, then I have no clue what could be wrong. If not, then something
about your home dir is breaking masterfs.
Comment 7 jadjong 2004-09-24 12:11:03 UTC
I just tried your suggestion last night:

..../netbeans --userdir /tmp/test49405

The same AssertionError came back. Also reinstalling with an older
VM (1.4.2 in stead of 1.5.0-rc1) did not help. So, there is apparently
some special strange configuration on my machine. I'll look more into
this during the coming week.
Comment 8 _ gtzabari 2004-10-07 03:24:57 UTC
I get this too on startup. Dev build 200409281800.

I just installed the Subversion profile into Netbeans. Not sure if
that has anything to do with it. Other than that, everything runs like
normal.
Comment 9 rmatous 2004-10-18 16:38:28 UTC
Observed and reported to me by word of mouth many times. 

Reassigned to Jarda because this issue seems to be caused by
AbstractLookup.ISE. I would say that URLMapper doesn't get proper set
of providers (espicially the one provided by MasterFileSystem).

Jarda, please look at it.
Comment 10 Jesse Glick 2004-10-18 20:02:48 UTC
Milan, your test failures may be related to this.
Comment 11 Milan Kubec 2004-10-19 11:45:51 UTC
If it's really the issue I'm facing then I'm able to reproduce it when
running projects/projectui tests. In that test call of
FileUtil.toFileObject(getWorkDir())
returns null, despite getWorkDir() returns existing File object.
Comment 12 Jesse Glick 2004-10-19 16:36:31 UTC
Re. Milan's last comment - he reports that masterfs.jar was
accidentally left off the classpath in his case, so that is the
explanation.
Comment 13 Milan Kubec 2004-10-19 16:40:57 UTC
Jesse, thanks for explanation, I was about to write it here.
Comment 14 Jaroslav Tulach 2004-10-19 18:05:07 UTC
Is it really necessary to do all the work in constructor of
LibraryStorage? The lookup is a bit fragile for bunch of operations
from its constructor, as it is not reentrant. The lookup tries to
recover from reentrant access, but we have recently had few failures
in filesystems as the interaction between lookup and filesystems needs
to be very close and happens very early in the startup sequence.

So if I can ask, please fix the LibraryStorge constructor.
Comment 15 Jesse Glick 2004-10-19 18:19:08 UTC
Has to be run during startup, though not necessarily in that
particular constructor.
Comment 16 Tomas Zezula 2004-10-20 13:20:38 UTC
I can move it from the constructor, but it has to be done during start
up (ModuleInstall.restore ()).
Jardo, will it help?
Comment 17 Jaroslav Tulach 2004-10-20 13:46:58 UTC
yes, it will help. The reentrancy problem in lookup is caused by
calling lookup once more from the lookup. What is likely happening in
this case is that lookup calls constructor of LibrariesStorage and it
calls PropertiesUtils and they call URLMapper and it calls lookup and
the lookup is not able to answer the question.

If the LibrariesStrorage constructor was more lightweight, then the
lookup called the constructor and that is all. Later someone would
call a method on LibrariesStorages and then the rest of the
initialization should be ok. 
Comment 18 Tomas Zezula 2004-10-20 14:08:05 UTC
Ok.
Comment 19 Tomas Zezula 2004-10-22 14:44:39 UTC
Checking in
libraries/src/org/netbeans/modules/project/libraries/LibrariesModule.java;
/cvs/projects/libraries/src/org/netbeans/modules/project/libraries/LibrariesModule.java,v
 <--  LibrariesModule.java
new revision: 1.5; previous revision: 1.4
done
Checking in
libraries/src/org/netbeans/modules/project/libraries/LibrariesStorage.java;
/cvs/projects/libraries/src/org/netbeans/modules/project/libraries/LibrariesStorage.java,v
 <--  LibrariesStorage.java
new revision: 1.15; previous revision: 1.14
done