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 183992 - Maven: Swing Master/Detail form wizard hangs and is finished with OutOfMemory after 10 minutes
Summary: Maven: Swing Master/Detail form wizard hangs and is finished with OutOfMemory...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 11:31 UTC by Sergey Petrov
Modified: 2010-04-20 09:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
OutOfMemory and assertion from issue 178976 (16.03 KB, text/plain)
2010-04-13 11:32 UTC, Sergey Petrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2010-04-13 11:31:44 UTC
I have fresh ide, create maven j2se and create master/detail. It hangs for at
least 10-15 minutes, finally I have out of memory.
Comment 1 Sergey Petrov 2010-04-13 11:32:21 UTC
Created attachment 97171 [details]
OutOfMemory and assertion from issue 178976
Comment 2 Tomas Pavek 2010-04-13 13:17:00 UTC
Seeing the selfprofiling on the stacktrace, I guess the OOME is related to the current problems with self-profiling, e.g. bug 183832, bug 183993 or bug 183201.

*** This bug has been marked as a duplicate of bug 183832 ***
Comment 3 Sergey Petrov 2010-04-16 10:46:07 UTC
183832 is fixed but the issue is still reproducible.
also use case isn't related to 1 hour wait, so may be it's a duplicate of another issue, or one of fixed need to be reopened, any ideas?
Comment 4 Tomas Pavek 2010-04-19 16:09:50 UTC
So same thing as bug 184345. The self-profiling takes much CPU and memory when saving a long snapshot. The OOME is from that. See also bug 183993.

Since the self-profiling bugs are filed elsewhere, we could use this one for tracking the original problem - AWT blocked for long time by the wizard (that's why the IDE tried to create snapshot).

Below is the problematic stacktrace. I agree this should not be called in AWT, OTOH the other option is to show a modal dialog (e.g. like the "Opening Project" one) and in fact block the user anyway. I wonder if adding the maven dependency should not be done asynchronously in this case.

java.lang.AssertionError:  Not to be called from AWT, can take significant amount ot time to download dependencies from the network.
        at org.netbeans.modules.maven.api.NbMavenProject.synchronousDependencyDownload(NbMavenProject.java:335)
        at org.netbeans.modules.maven.api.NbMavenProject.downloadDependencyAndJavadocSource(NbMavenProject.java:348)
        at org.netbeans.modules.maven.j2ee.ContainerCPModifierImpl.extendClasspath(ContainerCPModifierImpl.java:132)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator.generateBeans(JavaPersistenceGenerator.java:196)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator.generateBeans(JavaPersistenceGenerator.java:177)
        at org.netbeans.modules.j2ee.persistence.api.entity.generator.EntitiesFromDBGenerator.generate(EntitiesFromDBGenerator.java:210)
        at org.netbeans.modules.form.j2ee.J2EEUtils.generateEntityClass(J2EEUtils.java:479)
        at org.netbeans.modules.form.j2ee.J2EEUtils.createEntity(J2EEUtils.java:592)
        at org.netbeans.modules.form.j2ee.wizard.MasterDetailWizard.instantiatePersitence(MasterDetailWizard.java:467)
        at org.netbeans.modules.form.j2ee.wizard.MasterDetailWizard.instantiate(MasterDetailWizard.java:348)
...
Comment 5 Jan Stola 2010-04-20 09:51:12 UTC
The creation of master/detail form has been moved outside AWT thread and an indefinite progress bar blocks the UI while the form is being generated.

The exception is no longer thrown but the creation still takes several minutes. The duration is not a problem of GUI builder. It is a problem (or feature) of Maven project. It seems that it has a lot to do - including download of indexes of both Central and Java.net repositories.

Modified files: http://hg.netbeans.org/cdev/rev/3db1c808d478