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.
NB200405182245 & JDK 1.4.2 I have a little project. That project contains the build.xml I modified the build.xml file to have the following <import file="sanity-check.xml"/> <target name="post-init" depends="init-sanity-checks"> </target> <target name="run-all-sanity-check" description="run all sanity checks" depends="all-sanity-checks" /> I created another sanity-check.xml file that contains a target all-sanity-checks that depends of init. That sanity-check.xml is running checkstyle, pmd, jdepend, findbugs, cpd. I right click on build.xml and select target run-all-sanity-checks. I can run it how many times I want, until I have a OutOfMemory Exception. And GC indicates 24.8/48Mb Only thing I can do is restart NB and problems disappeared until the next time I reached somes limitation. Any idea what could be the problem ?
Missing steps to reproduce. Petr may know something about this.... permanent heap size again?
Do you want that I joined a zip file with all the project and external lib I use in the Ant Script file ? Then you will certainly be able to reproduce it.
Sure, if you can produce some ZIP file that I can unpack, mount in a dev build with a fresh user dir, and run over and over (specify which target(s)), that could be helpful I think.
Actually, this is a known problem but you may have easier/faster way to reproduce it. Please read issue 43113 and try starting visualgc (from jvmstat package) against your OOME-throwing JVM. Is should show the occupation ot the permanenet area of heap and also should show number of classes loaded and unloaded. Try gc() several times, again after few minutes and check the perm heap and the number of unloaded classes again, whether it improved. And tell us, of course ;-) *** This issue has been marked as a duplicate of 43113 ***
Petr, is visualgc even publicly available anywhere? Anyway Vincent if you have a good way to reproduce easily and quickly, that alone would be a big help.
Sure, it is: http://developers.sun.com/dev/coolstuff/jvmstat/
Vincent, have you reproduced the problem with some newer build?
I just installed the NB20040616 and I can't reproduce the same problem. I mean, I am not receiving the OOME. But I receive, under the same circonstances, the following errors: java.io.FileNotFoundException: D:\Test_20040518_NB4.0\Test Unitaire En Java\build.xml (Bad file descriptor) For your information, I received that message during the 7 temptatives, after 6 successfull run. So, I suppose that the under that exception we have the same problem than before. I tried visualgc, but seems that it's not working under win98. Sorry. I will clean my project and send it to you as zip file. Maybe next week. (Sorry for the delay, but I have a lot of work at my work, at home, and with refactoring issues I filled).
Re. the FileNotFoundException - strange, haven't heard of anything like this before. File it as a separate bug if you get a chance to pull together a test case. Thanks!
Hi Jesse. In fact, I think the problem was that NB runs on my JDK1.5 JVM (Beta 1). But no idea why NB ignore the netbeans.conf file (it's the trunk release 200406161800). Hereafter the content of netbeans.conf netbeans_default_userdir="${HOME}/.netbeans/20040616" netbeans_default_options="-J-Xms24m -J-Xmx160m -J-Dnetbeans.logger.console=true -J-ea" netbeans_j2sdkhome="C:/programfiles/javasoft/j2sdk1.4.2_01" After NB started, I checked the About Detail and see that Java Home is c:\j2sdk1.5.0\jre User Dir is c:\Windows\.netbeans\20040616 It means that the exec has well take into account the netbeans_default_userdir but not the netbeans_j2sdkhome Any idea why ?
netbeans_j2sdkhome="C:/programfiles/javasoft/j2sdk1.4.2_01" looks suspicious - '/' instead of '\', the lack of a ' ' in "programfiles". Please file a separate bug for this (core/code, assign to ttran@netbeans.org); if you know how to reproduce the problem (preferably starting with the Windows installer) certainly attach that information.
Anyway, I success to force JDK 1.4.2 by using the --jdkhome switch. And I success to have the OOME :-( Just after 10 minutes works. As said, I will prepare a zip therefore (somewhere next week). Could you clarify somes questions I have: 1. Is the Ant script running in another JVM than the netbeans one ? 2. Why, if I have a OOME, the Memory Meter is not indicating that memory is full (At this time, it indicates 38Mo / 78Mo)?
Hi Jesse, you said the following: netbeans_j2sdkhome="C:/programfiles/javasoft/j2sdk1.4.2_01" looks suspicious - '/' instead of '\', the lack of a ' ' in "programfiles". But the same netbeans.conf file is working like a charm with 20040525. And giving parameters with / to the exec file, is also working. As you said, I will therefore create a new issue. But I need to download the installer (I downloaded the zip and unzip it, as I always said in the past)
"1. Is the Ant script running in another JVM than the netbeans one?" - no, same JVM. "2. Why, if I have a OOME, the Memory Meter is not indicating that memory is full (At this time, it indicates 38Mo / 78Mo)?" - well that's what I would like to find out if I knew how to reproduce the problem! "But I need to download the installer (I downloaded the zip and unzip it, as I always said in the past)" - well if you encountered the problem without using the installer, then of course file steps not involving the installer. If the same netbeans.conf worked before and it does not now, that is probably a regression and should be investigated (unless the format was invalid for some reason and this was just not detected before). In any event, the issue should mention that the conf file is using the wrong separator; if the IDE generated this line for you, that may be a bug (in the installer or netbeans.exe, depending on what generated it).
Created attachment 16047 [details] Zip file of a stupid application + sanity check directory (light)
I attached my project + the sanity check. You just need to mount MyFirstProject and select the build file to execute the target run-all-sanity-check. You certainly need to modify the sanitycheck.properties file for the property sanitycheck.tools.dir that must point to the sanitycheck_tools directory. I created a menu shortcut of the task, and click 20-30 times one after another one until I receive the OOME. Enjoy
Vincent, thanks for the example script, it displays the problem pretty clearly. I've added you to cc of issue 43113, you can read partial explanation of the problem there. Summary: OOME is caused by "Permanent generation" overflow. PermGen size is not reported by the System.*Memory methods, so it can't be tracked by the memory metter. But once PermGen hits its limit (64MB), it OOMEs regardless of free java heap. PermGen is used by JVM to store classes, their metadata and interned Strings and redundant class loads are the culprit here.
How can I see the size of the PermGen in a JRE ? How can I give more size for the PermGen ?
closed