Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@filipnavara
Copy link
Contributor

@filipnavara filipnavara commented Feb 24, 2018

This reworks the window creating and destroying to be just stable enough to run the unit tests. Previously the tests were randomly freezing due to randomly (not) disposed objects, processing of messages for destroyed windows, and wait loops in CreateWindow that would never finish in certain conditions.

The point of this PR is to get the test environment stable before introducing other changes.

@filipnavara
Copy link
Contributor Author

filipnavara commented Feb 24, 2018

For reference, running the tests now:

Tests run: 2851, Passed: 2713, Errors: 4, Failures: 22, Inconclusive: 0
Not run: 112, Invalid: 0, Ignored: 112, Skipped: 0
Elapsed time: 00:00:37.3600000

Errors and Failures:

[Removed, see comments below]

@filipnavara
Copy link
Contributor Author

Need to get this in before I start porting over the fixed layout code from https://github.com/filipnavara/mac-playground.

@filipnavara
Copy link
Contributor Author

filipnavara commented Feb 24, 2018

Updated list of test failures:

Tests run: 2851, Passed: 2724, Errors: 3, Failures: 12, Inconclusive: 0
Not run: 112, Invalid: 0, Ignored: 112, Skipped: 0
Elapsed time: 00:00:37.4560000

Errors and Failures:

[Removed, see below]

@filipnavara
Copy link
Contributor Author

filipnavara commented Feb 25, 2018

Updated list of test failures:

Tests run: 2851, Passed: 2731, Errors: 3, Failures: 5, Inconclusive: 0
Not run: 112, Invalid: 0, Ignored: 112, Skipped: 0
Elapsed time: 00:00:49.0600000

Errors and Failures:

  1. DataGetsCleared_Xamarin4959 (MonoTests.System.Windows.Forms.ClipboardTest.DataGetsCleared_Xamarin4959)
    Expected: 0
    But was: 1

at MonoTests.System.Windows.Forms.ClipboardTest.DataGetsCleared_Xamarin4959 () [0x0004c] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs:168
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

Limitation of clipboard implementation in the Carbon driver.

  1. RtfTextTest (MonoTests.System.Windows.Forms.ClipboardTest.RtfTextTest)
    #A1
    Expected: False
    But was: True

at MonoTests.System.Windows.Forms.ClipboardTest.RtfTextTest () [0x00013] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs:60
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

Limitation of clipboard implementation in the Carbon driver.

  1. RegionTest (MonoTests.System.Windows.Forms.ControlTest.RegionTest)
    System.NotImplementedException : The method or operation is not implemented.
    at System.Windows.Forms.XplatUICarbon.SetClipRegion (System.IntPtr hwnd, System.Drawing.Region region) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:1730
    at System.Windows.Forms.XplatUI.SetClipRegion (System.IntPtr handle, System.Drawing.Region region) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:967
    at System.Windows.Forms.Control.set_Region (System.Drawing.Region value) [0x00011] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:2968
    at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.set_Region(System.Drawing.Region)
    at MonoTests.System.Windows.Forms.ControlTest.RegionTest () [0x000b2] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs:2289
    at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

Non-rectangular windows are not implemented in Carbon driver.

  1. TestPublicProperties (MonoTests.System.Windows.Forms.FormHandleTest.TestPublicProperties)
    System.NotImplementedException : The method or operation is not implemented.
    at System.Windows.Forms.XplatUICarbon.SetClipRegion (System.IntPtr hwnd, System.Drawing.Region region) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:1730
    at System.Windows.Forms.XplatUI.SetClipRegion (System.IntPtr handle, System.Drawing.Region region) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:967
    at System.Windows.Forms.Control.CreateHandle () [0x00080] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:4223
    at System.Windows.Forms.Form.CreateHandle () [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:1913
    at System.Windows.Forms.Control.CreateControl () [0x00039] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:3529
    at System.Windows.Forms.Control.SetVisibleCore (System.Boolean value) [0x0003a] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:4770
    at System.Windows.Forms.Form.SetVisibleCore (System.Boolean value) [0x00065] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:2380
    at System.Windows.Forms.Control.set_Visible (System.Boolean value) [0x00009] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:3200
    at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.set_Visible(bool)
    at MonoTests.System.Windows.Forms.FormHandleTest.TestPublicProperties () [0x00ff6] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/FormHandleTest.cs:494
    at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

Non-rectangular windows are not implemented in Carbon driver.

  1. NewFormShouldAlsoBeMaximized (MonoTests.System.Windows.Forms.MdiFormTest.NewFormShouldAlsoBeMaximized)
    Width should be maximized
    Expected: True
    But was: False

at MonoTests.System.Windows.Forms.MdiFormTest.NewFormShouldAlsoBeMaximized () [0x00069] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs:366
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

  1. BehaviorMdiWindowMenuItem (MonoTests.System.Windows.Forms.MenuStripTest.BehaviorMdiWindowMenuItem)
    Q7
    Expected: 2
    But was: 1

at MonoTests.System.Windows.Forms.MenuStripTest.BehaviorMdiWindowMenuItem () [0x00108] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/MenuStripTest.cs:160
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

May not be related to this PR and possibly broken in non-Carbon scenarios as well. There were 7 more MDI test failures related to window activation code that were not Carbon specific.

  1. Balloon (MonoTests.System.Windows.Forms.NotifyIconTest.Balloon)
    System.NotImplementedException : The method or operation is not implemented.
    at System.Windows.Forms.XplatUICarbon.SystrayBalloon (System.IntPtr hwnd, System.Int32 timeout, System.String title, System.String text, System.Windows.Forms.ToolTipIcon icon) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:2093
    at System.Windows.Forms.XplatUI.SystrayBalloon (System.IntPtr handle, System.Int32 timeout, System.String title, System.String text, System.Windows.Forms.ToolTipIcon icon) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:1135
    at System.Windows.Forms.NotifyIcon.ShowBalloonTip (System.Int32 timeout, System.String tipTitle, System.String tipText, System.Windows.Forms.ToolTipIcon tipIcon) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/NotifyIcon.cs:408
    at System.Windows.Forms.NotifyIcon.ShowBalloonTip (System.Int32 timeout) [0x00000] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/System.Windows.Forms/NotifyIcon.cs:403
    at (wrapper remoting-invoke-with-check) System.Windows.Forms.NotifyIcon.ShowBalloonTip(int)
    at MonoTests.System.Windows.Forms.NotifyIconTest.Balloon () [0x00034] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/NotifyIconTest.cs:46
    at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

Balloon windows and system tray is not implemented in the Carbon driver.

  1. XamarinBug18638 (MonoTests.System.Windows.Forms.TableLayoutTests.XamarinBug18638)
    X18638-5
    Expected: greater than 186
    But was: 186

at MonoTests.System.Windows.Forms.TableLayoutTests.XamarinBug18638 () [0x0015f] in /Users/filipnavara/Documents/mono/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs:1705
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/filipnavara/Documents/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305

Unrelated to Carbon. I plan to fix it in separate PR.

@marek-safar
Copy link
Member

approve

@alexischr alexischr merged commit c152f67 into mono:master Feb 26, 2018
@filipnavara filipnavara deleted the swf-carbontests branch March 23, 2018 20:41
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
[System.Windows.Forms] Fix test freezes with Carbon driver.

Commit migrated from mono/mono@c152f67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants