-
Notifications
You must be signed in to change notification settings - Fork 992
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_GetIPictureFromPicture_InvokeEnhancedMetafile_Roundtrips
#2004
Comments
The issues are tracked in * dotnet#2002 * dotnet#2003 * dotnet#2004 * dotnet#2005
As noted on the other similar issues this test also seems to be not running on STA, being only annotated with a |
So I don’t think I actually changed the IPicture interface. I just added tests. This suggests that either this is a test bug or a bug that was there before caused by either previous refactoring or that has always been there |
Scratch that: metafile support WAS recently added in .Net Core. Previously in .NET framework it didnt work |
Test failure is independent from OleInitialize. |
This and #2005 are interop mistakes, making USER and GDI handles are apparently sign extended (documented here and here for example), so regardless of whether The bug is in AxHost.GetPictureFromParams which takes an uint handle and casts it to IntPtr in various code paths. Other code paths than metafiles will fail randomly as well, for example icons and bitmaps also are GDI handles and thus must be sign extended. Now the main question is whether List of handle types requiring sign extensionCopied from the 2nd doc link above for reference. USER handles:
GDI handles:
Also here it was mentioned the data type may be relevant for /cc: @hughbe @JeremyKuhne @RussKie for interop awareness. Also might want to reclassify this issue since the tests are detecting a real bug. |
Thank you @weltkante for taking the time and the analysis. @JeremyKuhne @hughbe can you please lead on this? |
In our uses we only do |
Thank you |
Problem description:
AxHost_GetIPictureFromPicture_InvokeEnhancedMetafile_Roundtrips
test fails on CI but is passing locally.E.g.
Expected behavior:
The test pass
/cc: @hughbe
The text was updated successfully, but these errors were encountered: