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.
We are seeing problems with termination of the IDE under XTest on 2 CPU XP systems. The problem seems to be that the external browser DDE server does not terminate gracefully. XTest hangs waiting for tasks to complete. Closing the external browser launched by the IDE clears the hang causing the IDE to exit gracefully and XTest to terminate. It appears that there needs to be a way for the DDE server to close the connection to the external browser and terminate when the IDE is terminating under XTest control. This causes problems for automated tests. We have a workaround which is to under automated test control "exec/kill" the external browsers, but this is not so good long term because it assumes the test gets to the point where the browsers are "killed".
I've got the same problem on one CPU PC under Win2000SP3
What task is it waiting for? Can you attach ide.log? Possible way how to fix this is to add some entry points for uninitialization of browser into extbrowser module that will reset DDE communication (namely call DdeUninitialize or what is correct name).
This is kind of a funny one. All IDE tasks get terminated ok, at least as far as the Execution window shows. The test case I am running creates a Web Services test client which launches an external browser when executed. Your fix sounds promising. The test case I have is pretty complex. If you like I would be happy to take a pre-integration jar with a fix candidate and test it for you. But if it needs to be implemented by the task using DDE, see discussion in next paragraph. As an aside, I think that the Web Services test client doesn't really need to maintain the DDE connection. It seems like all it does is open the web browser to one URL and then it is done. I was planning to talk with the test client developers as well, but I started out with the core because it seemed like a more general solution, but I am not sure how shutdown/task logic works in NB. If I am correct about the web services test client logic then they would presumeably want an API something like "I am done now" which would terminate DDE. This is probably also useful if a user was doing lots of test client executions, since it would free up resources that were no longer needed.
I haven't time to implement any hook. What about disabling extbrowser module during your tests? Or set IDe browser to Swing browser before performing the test? Something like import org.netbeans.core.IDESettings; import org.netbeans.core.ui.SwingBrowser; import org.openide.awt.HtmlBrowser; import org.openide.util.Lookup; ... HtmlBrowser.Factory f = (SwingBrowser)Lookup.getDefault().lookup(SwingBrowser.class); IDESettings s = (IDESettings)IDESettings.findObject(IDESettings.class, true); s.setWWWBrowser (f); Or even better solution is to use you own HtmlBrowser.Factory that will create your HtmlBrowser.Impl. This will give you possibility to check content of stream when setURL is called
Hi Radim, Unfortunately the browser is opened as part of the web services Test Client function we are testing...
Yes, that's OK. I assume that it uses TopManager.showUrl or new org.openide.awt.HtmlBrowser. Attached code does the same as you would go into Tools | Options and change your settings for web browser to Swing HTML browser.
Steve is it still a problem (using latest S1S builds)? What task is XTest waiting for?
Since there is no response and this is not user problem I am closing this as wontfix.
Problem is still there, we need a fix ASAP after Nevada. Raising priority since tests cannot run unattended until this is fixed.
where can I find test sources to reproduce this? Did anyone tried suggested solution?
Just to make more clear, we're interested in this being fixed in a post Nevada release. Setting release to future. Since there is some urgency, setting priority back to P2. Problem is seen on all windows platforms, not just XP. Test includes browsers, so can't disable this function. Can't use swing browser because we are testing browsers (such as Netscape/Explorer).
Should try to call DdeUnitialize during module closing.
Requesting waiver for S1S5.
drop down to P3, will raise to P2 after Nevada FCS. Send note to Honza regarding dashboard should filter out bugs not targetted for Nevada.
Steve, can you give me advice how to run your tests to reproduce this problem? Another questions: is the browser launched from IDE or separately? Does the behaviour differ? Is the IDE process finished? If it is not can you attach tread dump? The native sources release DDE though we can uncomment atexit(ClearDDE).
Hi Radim, Here is a test for you to run. If you have any difficulty, let me know and I'll give some pointers. You may have some DNS problems. If so you could edit your localhosts file to use the following: humor 129.149.75.62 Humor is a machine that is running an application server used by the test for deploying a web service. Steps: 1. Checkout closed source cvs module "jot" 2. edit file jot/testws/src/ws/WebServiceSimple.java and comment out line 247 This is a workaround that attempts to kill the browser when the test is done. 2. cd jot/test 3. edit build.xml to set property "netbeans.home" for where you have build S1S 4. run "ant ws" This creates and deploys a web service and a test client. When the test client is executed it automatically invokes a web browser via DDE.
changing version to current, putting priority back to P2 (it was lowered to help out Nevada dashboard glitches)
Created attachment 10683 [details] AntRunner output
Steve, I can't run the test due to SQLException (see attached output). Any help what needs to be configured?
Created attachment 10792 [details] AntRunner output
I've updated my hosts file with new IP address of humor but still can't execute tests due to NCDFE org/apache/xml/serialize/BaseMarkupSerializer Any idea what is wrong? I have fresh sources taken from trunk.
Steve, is it possible that the problem you have reported is related to Ant bug 5003 that is mentioned on our xtest.netbeans.org site? Do you run your tests will patches applied? BTW: another possible way how to avoid this is to check for netbeans.full.hack property and kill the browser on IDE shutdown. It is not very nice but can work.
I get no feedback on my last comment written a month ago. Is this still a problem?
Is this still a problem?
Looks like we may be seeing this on Rave.
If you are using Ant 1.4.*, make sure you incorporate a patch, which fixes stdout/stderr handling problems. More information on XTest and this is here: <http://xtest.netbeans.org/XTest_installation.html#trouble_shooting> and Ant bug and patch is described here: <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5003>
Is this still a problem? Did you try the Ant patch? Without response I'm gonna close the issue as invalid.
No response - closing.