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.
Hello, I try to use new NetBeans 6.5 before I used 5.5.1. We use it on Windows XP SP2 and Vista and have same problems. Our source files are saved on SVN server. Our client is TortoiseSVN. We use JDK sun 1.6.0_u05. I work on layered project (Persistence, Business Objects, Business Layer, Web services server, Web services client, Rcp Swing-Jws) Each layer is separate in modules (common, planning, billing, ...) So I have many projects (25) and lot of classes (2850). Projects are linked with jar, they do not reference to an other project. We use libraries JideSoft, SwingX and MigCalendar and we also create our own library. When I work with Swing Editor (Matisse), IDE always freeze when I open Class (JPanel or JDialog or ...) or modify properties of components or add component or save Class. I can't switch to NetBeans 5.5.1 because it upgrade Swing class to new version. We are 5 developers and we lose a lot of time. I post messages, more details and log files at http://forums.netbeans.org/viewtopic.php?p=22022#22022 Thanks for your help Laurent
Created attachment 75983 [details] Netbeans log files
Thank you for your report. From your stacktraces I assume that designer freezes while renaming component and while closing a form. Am I right? Your log file is almost empty. Please start netbeans, open project and problematic form, force designer to freeze. Than generate thread dump http://wiki.netbeans.org/GenerateThreadDump and also add ide log file after these steps. Are you facing the same issue while you are using small standalone project or freshly generated JDA or simple java project with simple forms?
Created attachment 75991 [details] awt-thread-blocked-stacktrace-ActionManager.txt
Created attachment 75992 [details] awt-thread-blocked-stacktrace-RADComponent-rename.txt
Created attachment 75994 [details] log netbeans after freeze
Created attachment 75995 [details] ThreadDump at different time when netbeans (Matisse) freeze
From your stacktraces I assume that designer freezes while renaming component and while closing a form. Am I right? Yes it freeze when I click on component, or change property of component, close form (Jpanel or Jdialog) I post thread dump Are you facing the same issue while you are using small standalone project or freshly generated JDA or simple java project with simple forms? No with small project, it don't freeze.
I feel that is worse and worse as if it stacking cache
Thank you for your fast response. There is a living issue on refactoring of component variable name http://www.netbeans.org/issues/show_bug.cgi?id=154512 , it looks like you are facing the same problem. But freeze while closing a form ... we are going to investigate a little bit.
I verify the other issue and all Swing components are private and not protected in my classes.
Please, can you start for example rename component variable process and wait till the end? How long does it take?
Hello, It's not only when I rename a component variable. For example, I open JPanel and I have Properties Window" open on "Events" tab and I change tab to properties and it take 2min and 40s not at each time. Often I open JPanel, click on component to select it and it freeze between 2 mins. If I put netbeans window in taskbar and re-open it, it don't display window but only the window's headerbar
If you take control of my pc, can it help you?
Looking at the code corresponding to the thread stack trace, it looks like your project has the Swing Application Framework as one of its libraries - it is found on the classpath so it runs a scan to find the Application subclass in the sources. It is not clear to me why this happens repeatedly - this scan should happen only once for an opened GUI form. Could you take some thread dump during some of the subsequent freezes? Could you check if there is the Swing App Framework library somewhere on classpath of your project (or appframework-1.0.3.jar)? BTW how many sources does your project have (the one where you have the GUI form)? Thanks
Created attachment 76106 [details] Thread Dump of netbeasn during freezze
I put file with lot of thread dump during it freeze. I use AppFramework-1.01.jar We have 4 projects (1 container and 3 modules) with swing classes Container : 75 Java classes and 9 Swing classes included first module : 548 Java classes and 305 Swing classes included second module: 55 Java classes and 28 Swing classes included module: 15 Java classes and 10 Swing classes included
Thanks. All thread dumps show the same - scanning sources trying to find the Application class as it thinks it is an Swing App Framework based application. Still not clear why it does it repeatedly. How do you use the AppFramework-1.01.jar? Is your app a full app framework app? I.e. do you have your Application subclass, launching the app using it, etc? Could you search through your project.xml files (in all projects) if they contain "swingapp" element?
I used Swing Application Framework in my container project with : - start class which extends SingleFrameApplication to launch (startup), show and get instance of application - ApplicationContext to store and restore SessionStorage which contain window graphic option, position We use - Application Life Cycle = Yes - Resource Management = No - Actions = No - Tasks = No - Session State = Yes - Local Storage = Yes Here my project.xml of my container: <swingapp xmlns="http://www.netbeans.org/ns/form-swingapp/1"> <application-class name="com.mycompany.rcp.swing.container.StartApp"/> </swingapp> Other Swing projects (modules) don't have swingapp element, but they have container's JAR and swing application' JAR in ClassPath.
I'm having similar issues with Swing GUI Builder. See issue 157580.
Is 'com.mycompany.rcp.swing.container.StartApp' still a valid class in your container project? > Other Swing projects (modules) don't have swingapp element, but they have > container's JAR and swing application' JAR in ClassPath. Is it true that the long scan (freeze) happens only when you open a GUI form in those other projects (modules), but all is ok in the main (container) project? Can you try to copy the swingapp element to the project.xml of the other projects where you edit the forms - if that helps?
Class 'com.mycompany.rcp.swing.container.StartApp' and StartApp.properties are in container'JAR which is in classpath of all modules. GUI in container don't freeze. When I add swingapp element in project.xml of modules, GUI continue to freeze. If I open "Project properties" of modules and click on "Application" => "Desktop App" Netbeans freeze (very long more than 2 minutes) after field "Vendor ID", "Application ID" and "Look & feel" are disabled and project.xml is modified: swingapp element is deleted.
I've made a fix that should reduce the scanning for application class and actions in Swing App Framework based projects. I think I understood what the problem was in the described projects setup. Still I was not able to reproduce it completely and some of described behavior (repeated scanning) I can't explain. So - before I integrate the fix (for NB 7.0), could you test it to verify it really helps with the problem? I'm attaching a modified jar file for NB 6.5 - you need to replace with it the original file in the IDE installation/java2/modules folder. (Back up the original file.) Then delete *.dat files in the user dir under var/cache (according to the message log this should be C:\Documents and Settings\laurent.yhuel\.netbeans\6.5\var\cache on your machine). Then start NetBeans again and try to reproduce the original problem.
Created attachment 76844 [details] patched swingapp jar for NB 6.5
BTW I still wonder about the described project setup - I'd expect the application ("container") project to be the main one having the "modules" on classpath - not vice versa. If the dependency is from the modules to the application project, how the StartApp class when started can call any code from the modules?
Hello, I try your patch but when I run netbeans, i've this message: Warning - could not install some modules: GUI Builder - The module Swing Application Framework Support was requested in version >= 1.3.2 but only 1.3.1 was found. Now, Netbeans stop to freeze. We've installed last patches.
For your question about dependency. Project Container have main class. Project Container have modules's jar in classpath. Modules projects have container's jar in classpath. So when we launch : -from container: container + alls modules are used -from 1 module: container + the module are used. (I hope I was clear enough ) thanks laurent
I see, I need to prepare the JAR against the latest patches (I've made it for the original 6.5 release). In fact if you don't want to wait, you can simply unpack manifest.mf file from the attached swingapp.jar (the file is in META-INF directory) and change the spec version from 1.3.1 to 1.3.2. It should work.
Created attachment 76872 [details] swingapp module for NB 6.5 with latest patches
Integrated to main: http://hg.netbeans.org/main/rev/3f69504e9e01
Your patch works perfectly. Thank you very much, great job. Laurent
Integrated into 'main-golden', will be available in build *200902180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3f69504e9e01 User: Tomas Pavek <tpavek@netbeans.org> Log: #157060: eliminating scanning for application class, reducing rescans of changed files for actions, removing global list of actions
Good to know it works. Thanks for providing all the info needed to reslove this. Will be also in the upcomming M2 release.