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

Update FTBitmapExtensions.cs #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SenpaiSharp
Copy link

Added a few more steps to make sure we get the FieldInfo needed for the Mono hack.

Added a few more steps to make sure we get the FieldInfo needed for the Mono hack.
@HinTak
Copy link
Contributor

HinTak commented Apr 4, 2021

It would be nice to reference the actual change in mono? I don't doubt the mono folks rename non-public internal structures from time to time, but it would be nice to know why they do it, and what else might be changed together, and possibly relevant.

@HinTak
Copy link
Contributor

HinTak commented Apr 4, 2021

This seems to be the corresponding change, mono/mono@e33294b#diff-e5aeb604932f29179c83c42a4337e71a48d9b62c36c2a65c68bd6f2f86ed5bd2 , and seems quite extensive. Affect mono 5.8 onwards. It might be interesting to know if the work around is still needed, or a different work around needed.

The corefx change is large.

@SenpaiSharp
Copy link
Author

SenpaiSharp commented Apr 4, 2021

Yes, the work around is still needed.

mono

net

(ignore the point size discrepancies)

I was running on fumes last night after tracking down what the problem was. The whole work around is hacky, even if by necessity. It's always going to be vulnerable to this kind of breakage and I'm not in love with my solution but it will work in this moment. One thing that should be added is a check to see if monoPaletteFlagsField is still null after the for loop and then throw an exception with details to what is going on here for future debuggers.

@HinTak
Copy link
Contributor

HinTak commented Apr 4, 2021

Yes, I think it should fail on unexpected API change like this, instead of doing garbage.

@HinTak
Copy link
Contributor

HinTak commented Apr 4, 2021

Previous discussion #55

Upstream mono had moved to github - we probably should (re-)file upstream .

@HinTak
Copy link
Contributor

HinTak commented Apr 12, 2021

I have re-filed upstream as mono/libgdiplus#702

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.

2 participants