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 141440 - [65cat] GUI freeze during JUnit test
Summary: [65cat] GUI freeze during JUnit test
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 23:35 UTC by ulfzibis
Modified: 2008-12-22 14:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ant Settings button (33.90 KB, image/jpeg)
2008-07-23 23:36 UTC, ulfzibis
Details
Thred Dump (33.82 KB, text/plain)
2008-07-24 10:19 UTC, ulfzibis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2008-07-23 23:35:10 UTC
[ JDK VERSION : 1.6.0_07 ]

I was running a longer JUnit test (1..2 minutes).
During this, I clicked Ant Settings in the output window.
After this the GUI was frozen for several minutes, but later the
settings window was opend, and the test was successful.
Comment 1 ulfzibis 2008-07-23 23:36:57 UTC
Created attachment 65440 [details]
Ant Settings button
Comment 2 Lukas Hasik 2008-07-24 08:03:06 UTC
do I understand it correctly that you run a test on the IDE AND you are using it for work in the same time?
Does the test to do with the IDE or is it just run from IDE and then it test on your application? 
The main concern of this question is that if you run tests (mainly GUI tests) on the IDE you should not use the IDE
during the test because it can influence the results.
Comment 3 Marian Mirilovic 2008-07-24 10:00:48 UTC
Ulf, could you please generate thread-dump during freeze and attach the output to this issue ?
http://wiki.netbeans.org/GenerateThreadDump
Thanks in advance.
Comment 4 ulfzibis 2008-07-24 10:09:55 UTC
> ... you are using it for work in the same time?
What do you mean by this?

Try to make it clear:
In my project I selected a JUnit 4.1 compatible class located in the Test Packages folder, and started it by right click
"Run File". It's not a GUI test, the only output is System.out.print*().
After start of the test, output window is opened, and the print output is displayed.
During this run, I curiously clicked on "Ant Settings" button, and from this the IDE's GUI was frozen for several minutes.
For reproducing, you need a long running (1..2 minutes) JUnit test class which produces much print output, so you can
see, if the output window is growing during the time.
Example:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/milestone1/test/sun/nio/cs/MapCalculator.java?rev=&view=markup
Comment 5 ulfzibis 2008-07-24 10:19:41 UTC
Created attachment 65499 [details]
Thred Dump
Comment 6 Marian Petras 2008-07-24 13:20:06 UTC
The AWT is blocked by the Options dialogue:

"AWT-EventQueue-1" prio=6 tid=0x03ab7c00 nid=0x9bfc in Object.wait() [0x07eaf000..0x07eafd94]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at org.openide.util.Task.waitFinished(Task.java:130)
	- locked <0x140f1d20> (a org.openide.util.RequestProcessor$Task)
	at org.openide.util.RequestProcessor$Task.waitFinished(RequestProcessor.java:745)
	at org.netbeans.modules.options.CategoryModel.getCategoryIDs(CategoryModel.java:172)
	at org.netbeans.api.options.OptionsDisplayer$1.run(OptionsDisplayer.java:132)
	at org.netbeans.api.options.OptionsDisplayer$1.run(OptionsDisplayer.java:128)
        ...

Reassigned back to "core".
Comment 7 Jiri Skrivanek 2008-09-23 15:14:07 UTC
It is true that AWT is blocked while opening options dialog. But for me it was opened within couple seconds even when
unit test was running. I have never experienced IDE frozen for several minutes. Your computer was probably overloaded. I
am afraid with current API I cannot re-plan actions from AWT thread. Closing as wontfix.