-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve GDIP exception when failing to load libgdiplus
or GDI+
#29404
Comments
GDI+ is Windows only tech. |
On Unix, we use libgdi+ for GDI+ so I would think this should work. I would start by investigating this as a possible failure to load the shared library. Set LD_DEBUG and go from there. Longer term you might consider other libraries, since System.Drawing is not expected to get much investment - it is very old. |
Thank you. |
@jlestercastro ideally that message would be more helpful. @safern would it make sense to wrap the If we load by the runtime API, it will show this message today, and I know it has helped some people:
|
Yes it would make sense. We could potentially just wrap this call: https://github.com/dotnet/corefx/blob/dee434428ee392302ff2050bbee304c9fce68b2f/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs#L77 I will rename the title and mark as up for grabs and 3.0. |
libgdiplus
or GDI+
I'd like to tackle this one. |
@eanova sure - it's yours. Thanks |
@eanova let me know if you need any help on this workitem. |
I sent @eanova collaborator invite - that will make it work. Please ping us here once you accept. |
Accepted! |
@jlestercastro I re-named the issue to improve the exception message and I believe @eanova is working on it, so I will re-open the issue to track that work. |
Hi everyone! I've been chipping away at this and trying to get comfortable tooling at the same time. I found this article that discusses Mono debugging of libgdiplus using LD_DEBUG helpful. I guess there really isn't more information we can capture such as individual dependencies that are missing. So I'll pretty much stick to what @danmosemsft has already suggested I'll test the situation on the Mac, and then send a PR. |
Moving to Future. Work can still happen, but it's not essential that we fix this before ship 3.0. |
Is there an effective way to debug a local build of System.Drawing.Common. I've tried the method described in the dogfooding article but Nuget can't seem to find the nupkg. Or is there away to see the debug output within the xUnit console? |
Does running the CoreFX test's doesn't help? If you want to use a local build of corefx rather than running the tests you can do the following: Once you have that, you can add a <PropertyGroup>
<RestoreSources>
https://api.nuget.org/v3/index.json;
<PathToCorefx>\artifacts\packages\Debug\;
$(RestoreSources)
</RestoreSources>
</PropertyGroup> |
@safern Thanks, I was finally able to get the -allconfigurations flag to work. I'll be pushing some simple fixes that I needed to get it to work. Adding the restore to the project file is working as well. |
Thank you everyone |
Hi ,
Someone please help to fix this error
I've always got "The type initializer for 'Gdip' threw an exception." when i deploy my .NetCore API in ubuntu server. But the codes is working in my local machine (Windows).
I'm trying to get a image icon in my server folder named pictures/3FALogo.ico
C# code getting the icon.
I' ve always got this error message response. when accessing the API endpoint in Ubuntu Server.
Someone can help to fix this error.
Thank you.
The text was updated successfully, but these errors were encountered: