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

[libraries][iOSSimulator] ImageTests.FromFile_NullFileName_ThrowsArgumentNullException fails #56048

Closed
mdh1418 opened this issue Jul 20, 2021 · 4 comments

Comments

@mdh1418
Copy link
Member

mdh1418 commented Jul 20, 2021

Assert.Throws() Failure\nExpected: typeof(System.ArgumentNullException)\nActual:   typeof(System.TypeInitializationException): The type initializer for 'Gdip' threw an exception.\n---- System.TypeInitializationException : The type initializer for 'Gdip' threw an exception.\n-------- System.DllNotFoundException : libgdiplus
at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
   at System.Drawing.LibraryResolver.DllImportResolver(String libraryName, Assembly assembly, Nullable`1 searchPath)
   at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
   at System.Runtime.InteropServices.NativeLibrary.MonoLoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags, IntPtr& dll)
   at System.Drawing.Image.FromFile(String filename)
   at System.Drawing.Tests.ImageTests.<>c.<FromFile_NullFileName_ThrowsArgumentNullException>b__24_0()
----- Inner Stack Trace -----
   at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
   at System.Drawing.LibraryResolver.DllImportResolver(String libraryName, Assembly assembly, Nullable`1 searchPath)
   at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
   at System.Runtime.InteropServices.NativeLibrary.MonoLoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags, IntPtr& dll)
   at System.Drawing.Image.FromFile(String filename)
   at System.Drawing.Tests.ImageTests.<>c.<FromFile_NullFileName_ThrowsArgumentNullException>b__24_0()
----- Inner Stack Trace -----
   at System.Drawing.SafeNativeMethods.Gdip..cctor()

log: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-55974-merge-1ee0573a687a4a1890/System.Drawing.Common.Tests/console.76c2bd7e.log?sv=2019-07-07&se=2021-08-09T02%3A17%3A12Z&sr=c&sp=rl&sig=U3vDMKA%2FTiGgV7VjC5sRHw44128SB9OvJVtPUYyP6kY%3D
build: https://dev.azure.com/dnceng/public/_build/results?buildId=1247256&view=logs&j=accacb66-0a14-52ef-4079-6344686d9d4c&t=34fbd35e-866b-51a1-9063-fb50703b1957

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jul 20, 2021
@ghost
Copy link

ghost commented Jul 20, 2021

Tagging subscribers to this area: @safern, @tarekgh
See info in area-owners.md if you want to be subscribed.

Issue Details
Assert.Throws() Failure\nExpected: typeof(System.ArgumentNullException)\nActual:   typeof(System.TypeInitializationException): The type initializer for 'Gdip' threw an exception.\n---- System.TypeInitializationException : The type initializer for 'Gdip' threw an exception.\n-------- System.DllNotFoundException : libgdiplus
at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
   at System.Drawing.LibraryResolver.DllImportResolver(String libraryName, Assembly assembly, Nullable`1 searchPath)
   at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
   at System.Runtime.InteropServices.NativeLibrary.MonoLoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags, IntPtr& dll)
   at System.Drawing.Image.FromFile(String filename)
   at System.Drawing.Tests.ImageTests.<>c.<FromFile_NullFileName_ThrowsArgumentNullException>b__24_0()
----- Inner Stack Trace -----
   at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
   at System.Drawing.LibraryResolver.DllImportResolver(String libraryName, Assembly assembly, Nullable`1 searchPath)
   at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
   at System.Runtime.InteropServices.NativeLibrary.MonoLoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags, IntPtr& dll)
   at System.Drawing.Image.FromFile(String filename)
   at System.Drawing.Tests.ImageTests.<>c.<FromFile_NullFileName_ThrowsArgumentNullException>b__24_0()
----- Inner Stack Trace -----
   at System.Drawing.SafeNativeMethods.Gdip..cctor()

log: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-55974-merge-1ee0573a687a4a1890/System.Drawing.Common.Tests/console.76c2bd7e.log?sv=2019-07-07&se=2021-08-09T02%3A17%3A12Z&sr=c&sp=rl&sig=U3vDMKA%2FTiGgV7VjC5sRHw44128SB9OvJVtPUYyP6kY%3D
build: https://dev.azure.com/dnceng/public/_build/results?buildId=1247256&view=logs&j=accacb66-0a14-52ef-4079-6344686d9d4c&t=34fbd35e-866b-51a1-9063-fb50703b1957

Author: mdh1418
Assignees: -
Labels:

area-System.Drawing

Milestone: -

@MaximLipnin
Copy link
Contributor

MaximLipnin commented Jul 21, 2021

System.Drawing.Tests.ImageTests.FromFile_LongSegment_ThrowsException and System.Drawing.Tests.BrushTests.SetNativeBrush_Brush_Success are failing as well.

@MaximLipnin
Copy link
Contributor

Using [ConditionalFact(Helpers.IsDrawingSupported)] or [ConditionalTheory(Helpers.IsDrawingSupported)] should help to avoid these failures.

steveisok pushed a commit that referenced this issue Jul 22, 2021
…res (#56074)

It's to clean up the respective CI staging lanes.

The related issues:

[iOS/tvOS/MacCatalyst] Test failures in System.Diagnostics.Tracing.Tests #56073

[libraries][iOSSimulator] ImageTests.FromFile_NullFileName_ThrowsArgumentNullException fails  #56048

JitInfoIsPopulated failed with after is not greater than before #55712

[MacCatalyst] Test failures in System.Tests.OperatingSystemTests #56084

[MacCatalyst] App crash in System.Text.Json.SourceGeneration.Tests #56085
@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Jul 22, 2021
@steveisok steveisok added this to the 7.0.0 milestone Jul 22, 2021
@danmoseley
Copy link
Member

@ghost ghost locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants