Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky test: AxHost_GetIPictureDispFromPicture_InvokeEnhancedMetafile_Roundtrips #2005

Closed
RussKie opened this issue Oct 2, 2019 · 3 comments · Fixed by #2736
Closed

Flaky test: AxHost_GetIPictureDispFromPicture_InvokeEnhancedMetafile_Roundtrips #2005

RussKie opened this issue Oct 2, 2019 · 3 comments · Fixed by #2736
Labels
test-bug Problem in test source code (most likely)

Comments

@RussKie
Copy link
Member

RussKie commented Oct 2, 2019

  • .NET Core Version: master @ 3750c43

Problem description:

AxHost_GetIPictureDispFromPicture_InvokeEnhancedMetafile_Roundtrips test fails on CI but is passing locally.
E.g.


Error message
System.Runtime.InteropServices.ExternalException : A generic error occurred in GDI+.

Stack trace
   at System.Drawing.SafeNativeMethods.Gdip.CheckStatus(Int32 status)
   at System.Drawing.Imaging.Metafile..ctor(IntPtr henhmetafile, Boolean deleteEmf)
   at System.Windows.Forms.AxHost.GetPictureFromParams(UInt32 handle, PICTYPE type, UInt32 paletteHandle, Int32 width, Int32 height) in D:\a\1\s\src\System.Windows.Forms\src\System\Windows\Forms\AxHost.cs:line 5085
   at System.Windows.Forms.AxHost.GetPictureFromIPicture(Object picture) in D:\a\1\s\src\System.Windows.Forms\src\System\Windows\Forms\AxHost.cs:line 5029
   at System.Windows.Forms.Tests.AxHostTests.SubAxHost.GetPictureFromIPicture(Object picture) in D:\a\1\s\src\System.Windows.Forms\tests\UnitTests\System\Windows\Forms\AxHostTests.cs:line 1370
   at System.Windows.Forms.Tests.AxHostTests.AxHost_GetIPictureDispFromPicture_InvokeEnhancedMetafile_Roundtrips() in D:\a\1\s\src\System.Windows.Forms\tests\UnitTests\System\Windows\Forms\AxHostTests.cs:line 1210

Expected behavior:

The test pass

/cc: @hughbe

@RussKie RussKie added the test-bug Problem in test source code (most likely) label Oct 2, 2019
RussKie added a commit to RussKie/winforms that referenced this issue Oct 2, 2019
@weltkante
Copy link
Contributor

As noted on the other similar issues this test also seems to be not running on STA, being only annotated with a [Fact] attribute. Considering that OleInitialize native API initializes the thread to STA I'd expect all OLE functions to require STA ...

@weltkante
Copy link
Contributor

Test failure is independent from OleInitialize.

@weltkante
Copy link
Contributor

This is an interop mistake, see #2004 for more details

@ghost ghost added the 🚧 work in progress Work that is current in progress label Jan 19, 2020
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Jan 19, 2020
@RussKie RussKie removed this from the Future milestone Jan 19, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants