Bug 471067

Summary: IronPython Windows Form application window closes but the process does not exit
Product: [Mono] UI Automation Reporter: Brian Merrell <bgmerrell>
Component: Winforms - GeneralAssignee: E-mail List <mono-a11y-bugs>
Status: NEW --- QA Contact: E-mail List <mono-a11y-qa>
Severity: Major    
Priority: P3 - Medium CC: cachen
Version: Release 0.9.1   
Target Milestone: Release 1.1   
Hardware: All   
OS: Linux   
Whiteboard:
Found By: Integration Test Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Strongwind test log
ps ax output
IRC log discussing the problem

Description Brian Merrell 2009-01-30 18:16:33 UTC
PROBLEM STATEMENT

When i try to quit a winforms application with Strongwind (usually using Alt+F4), the application process doesn't exit. The application window closes, but Strongwind just waits and eventually times out, which causes the test to fail.

REPRO

Run the smoke test suite until the problem occurs:  

uia2atk/test/harness/local_run.py -s 

The problem seems to randomly occur, running the smoke test suite a few times should reproduce the problem, but it might take more.

RESULTS

Often, after an application window closes, the test will appear to hang.  However, Strongwind is waiting for the application's process to exit.  

The Strongwind output will look something like this:

Action: Press <Alt>F4.
Expected result: The Button_Label_LinkLabel controls window disappears.
Watchdog timeout reached; exiting
Screenshot: screen07.png

`ps ax` will show you that the button_label_linklabel.py application is still actual running (even though the window has closed):

27814 pts/0    Sl+    0:01 /usr/bin/mono /usr/lib/IPCE/ipy/ipy.exe /home/a11y/tests/samples/button_label_linklabel.py

EXPECTED RESULTS

When the application window closes the process should end and the Strongwind test should continue.

COMMENTS

I will attach the entire Strongwind output, the entire ps ax output, and a IRC chat log discussing the problem.
Comment 1 Brian Merrell 2009-01-30 18:59:58 UTC
Created attachment 268995 [details]
Strongwind test log

This log shows Strongwind timing out after closing an application window (see line 68)
Comment 2 Brian Merrell 2009-01-30 19:01:41 UTC
Created attachment 268996 [details]
ps ax output

This is the ps ax output about a minute *after* the application window was closed.  The output shows that the button_label_linklabel.py process is still running (see line 112).
Comment 3 Brian Merrell 2009-01-30 19:06:30 UTC
Created attachment 268999 [details]
IRC log discussing the problem
Comment 4 Brad Taylor 2009-03-04 15:22:11 UTC
Changing priority, adding hours.
Comment 5 Brian Merrell 2009-03-10 16:15:34 UTC
Why the priority change?  This is absolutely murdering the reliability of our automated test results.
Comment 6 Brad Taylor 2009-03-10 16:30:01 UTC
I assumed that since you hadn't raised the issue recently that you had figured out a workaround.  I'll put it back to P2, and make it a priority for this week.

Andres, if you're not planning on finishing this by Friday, please assign it to me so that we can make some progress on it.
Comment 7 Andres Aragoneses 2009-03-11 14:36:05 UTC
I'm on it, I'll estimate if it's too much effort to need help or not. Thanks.
Comment 8 Brad Taylor 2009-03-12 16:26:03 UTC
09:01 <@brad> bgmerrell: so I had an idea.  a dream, really.  I rewrote the 
              statusbar sample in C#, and made the test use it
09:01 <@bgmerrell> :)
09:01 <@brad> bgmerrell: I've run it 40 times now, and no hanging
09:02 <@bgmerrell> interesting...
09:02 <@brad> I was getting about a hang every 5-10 runs
09:02 <@brad> previously
09:05 <@bgmerrell> brad: what OS are you testing on?
09:05 <@brad> bgmerrell: 11.0
09:05 <@bgmerrell> knocte: what OS were you testing on?
09:06 <@knocte> 11.0 as well
09:06 <@bgmerrell> brad: knocte: IPCE versions?
09:06 <@knocte> 1.1
09:07 <@knocte> r87 I believe
09:07 <@brad> bgmerrell: 2.0.0.0
09:08 <@bgmerrell> well, i'll upgrade to 2.0.1 and see if that fixes the problem
09:11 <@brad> bgmerrell: hmm, ipy 2.0.1 reports v2.0.0.0
09:12 <@brad> bgmerrell: I'll run 10 iterations to verify
09:16 <@brad> bgmerrell: yep, same thing
09:17 <@brad> bgmerrell: so I don't know how you want to proceed with this.  I 
              could probably rewrite a good portion of the samples today if you 
              were interested
09:18 <@brad> bgmerrell: I think the original gains (ipy is easier to learn) 
              are moot, as calen, ray and neville have all learned C# by now
09:19 <@bgmerrell> brad: yeah, i agree, it just sucks to redo the work
09:19 <@brad> I agree
09:19 <@brad> I could probably automate it a bit though
09:20 <@brad> bgmerrell: so do you want me to go forward with that, or do we 
              care for the 1.0 release?
09:21 <@bgmerrell> brad: yeah, i don't care too much for the 1.0 release
09:22 <@brad> bgmerrell: ok
Comment 9 Brad Taylor 2009-03-12 21:46:01 UTC
Taking this out of the Release 1.0 bin, and lowering the priority.  Our options are to rewrite all of the samples to C# or to hack on Mono and Iron Python to get our samples to run more reliably.  I'm more of a fan of the first option, but I'm willing to hear the pros and cons of the second.

In any event, this isn't something that needs fixing in UIA, so I'm punting this to 1.1 and dropping the priority and severity.