Bug 494034 - Some tests hang
Summary: Some tests hang
Status: CONFIRMED
Alias: None
Product: UI Automation
Classification: Mono
Component: Winforms - General (show other bugs)
Version: Release 1.0
Hardware: x86 openSUSE 11.1
: P2 - High : Critical
Target Milestone: Release 1.1
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on: 515507
Blocks: 490130
  Show dependency treegraph
 
Reported: 2009-04-10 18:10 UTC by Brian Merrell
Modified: 2011-03-26 18:01 UTC (History)
0 users

See Also:
Found By: Integration Test
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
trace acquired by remotely running 'kill -s QUIT' on the Mono process while the test was hung (4.57 KB, text/plain)
2009-04-10 18:13 UTC, Brian Merrell
Details
trace from 'kill -s QUIT' being issued during listview_detail_ops.py hang (7.73 KB, text/plain)
2009-06-14 08:03 UTC, Brian Merrell
Details
work in progress (215.67 KB, patch)
2009-07-09 16:10 UTC, Mario Carrion
Details | Diff
work in progress (338.00 KB, patch)
2009-07-09 17:31 UTC, Mario Carrion
Details | Diff
work in progress (354.89 KB, patch)
2009-07-10 18:38 UTC, Mario Carrion
Details | Diff
Final patch (356.76 KB, patch)
2009-07-10 19:45 UTC, Mario Carrion
Details | Diff
Updated to latest revision (355.34 KB, patch)
2009-07-28 15:02 UTC, Mario Carrion
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Merrell 2009-04-10 18:10:19 UTC
PROBLEM STATEMENT

The NumericUpDown test checks the value of several accessibles by querying "queryValue().currentValue".  However, at two places in the test, it appears that this query hangs the test.  If the mouse is moved, the test usually resumes and the query seems to return the correct value.  Issuing a 'kill -s QUIT' on the Mono process also resumes the test and prints a trace, which I will attach to this bug.

REPRO

0.  Prepare your machine to run Strongwind tests if it is not already (http://mono-project.com/Accessibility:_Testing_Howto#Requirements).
1.  Run uia2atk/test/testers/numericupdown_basic_ops.py

RESULTS

The test will hang at two points.  The first one is here:

"
Action: Enter "2501" into Examples for: NumericUpDown spin button.
Action: Assert that the accessible value of Examples for: NumericUpDown spin button is correct
"

You can move the mouse (sometimes you need to move it around for a couple of seconds) to resume the test.  Alternatively, you can ssh into the machine running the test and run 'kill -s QUIT <process>' on the Mono process.  This will print a trace in the terminal running the test.

The second point where the test hangs is here:

"
Action: Enter "-101" into Examples for: NumericUpDown spin button.
Action: Assert that the accessible value of Examples for: NumericUpDown spin button is correct
"

Again, you can move the mouse or remotely issue a 'kill -s QUIT' on the Mono process.

The exact code where the test hangs is on line 60 of uia2atk/test/testers/numericupdown/numericupdownframe.py.  The 'accessible.value' is the reference that causes the "queryValue().currentValue" query to occur, which in turn seems to cause the hang.

EXPECTED RESULTS

The test should not hang at all

COMMENTS

I will attach the trace
Comment 1 Brian Merrell 2009-04-10 18:13:56 UTC
Created attachment 285248 [details]
trace acquired by remotely running 'kill -s QUIT' on the Mono process while the test was hung
Comment 2 Sanford Armstrong 2009-04-10 18:16:50 UTC
Setting target to 1.1.  Basically, we need to be checking InvokeRequired on all calls to SWF that are potentially not happening on the SWF mainloop (anything not directly triggered by an SWF event, really), and Control.BeginInvoke those calls.
Comment 3 Sanford Armstrong 2009-04-15 14:20:01 UTC
Adding estimate.
Comment 4 Mario Carrion 2009-04-27 14:50:35 UTC
Hours updated. Apr 16 and Apr 17
Comment 5 Mario Carrion 2009-04-29 14:20:39 UTC
Updating hours
Comment 6 Mario Carrion 2009-04-30 13:30:25 UTC
Hours updated. Apr 29
Comment 7 Brian Merrell 2009-06-14 08:03:00 UTC
Created attachment 297972 [details]
trace from 'kill -s QUIT' being issued during listview_detail_ops.py hang

I am also seeing the same type of hanging while running the test for the ListView with the View property set to View.Details.  I believe this is caused by the same bug.  I have attached the trace, please let me know if I should log a separate bug for this.
Comment 8 Brian Merrell 2009-06-14 08:07:37 UTC
> I am also seeing the same type of hanging while running the test for the
> ListView with the View property set to View.Details. 

Btw, the hanging happens when attempting to perform a 'click' action for column header.  This is different from the circumstance in the original bug report, where the test hung when Querying of queryValue().currentValue.

I am editing the bug summary to be more general.  Please correct me if I am wrong.
Comment 11 Mario Carrion 2009-07-09 16:10:36 UTC
Created attachment 304144 [details]
work in progress
Comment 12 Mario Carrion 2009-07-09 17:31:46 UTC
Created attachment 304178 [details]
work in progress
Comment 13 Mario Carrion 2009-07-10 18:38:45 UTC
Created attachment 304488 [details]
work in progress

Applies to 1.0-branch.
Comment 14 Mario Carrion 2009-07-10 19:42:08 UTC
Hours updated, added dependency. For the record I'm getting the following exception:

Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object

That basically crashes at:

Mono.UIAutomation.Winforms.InvokeRequiredExtensionControl.InvokeSync<System.Windows.Forms.TextBoxBase, string> (System.Windows.Forms.TextBoxBase,System.Func`2<System.Windows.Forms.TextBoxBase, string>) [0x00047] in /home/mario.documents/Repository/uia2atk-git/UIAutomationWinforms/UIAutomationWinforms/Mono.UIAutomation.Winforms/Helper.cs:528

is crashing somewhere in the delegate, and even simple delegates:

myTextBox.InvokeSync (t => t.Text)

are crashing, too.
Comment 15 Mario Carrion 2009-07-10 19:45:17 UTC
Created attachment 304496 [details]
Final patch

Updates to TextNormalizer and TextRange
Comment 16 Mario Carrion 2009-07-28 15:02:34 UTC
Created attachment 308579 [details]
Updated to latest revision