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

CanvasFontSet.GetSystemFontSet() throws when Microsoft Office 2019 with cloud fonts is open #759

Closed
JohnnyWestlake opened this issue Feb 17, 2020 · 2 comments

Comments

@JohnnyWestlake
Copy link

JohnnyWestlake commented Feb 17, 2020

Steps:

  • Have Office 365 / 2019 installed with a subscribed Office 365 account with connected experiences enabled in account settings, which allows Office to download cloud fonts.
  • Open Microsoft Word, and download a cloud font or two from the font dialog.
  • Leave Word open
  • Now run any Win2d app that calls CanvasFontSet.GetSystemFontSet() or call it your self.
  • Observe the System.AccessViolationException you recieve: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Note that if you've had previous versions of Office installed without cloud fonts it may not show cloud fonts, as many of the cloud fonts were previously fonts installed by default with office.

Note that CanvasTextFormat.GetSystemFontFamilies(ApplicationLanguages.Languages) does not crash.

(Windows 10 18363.657, Win2D 1.24.0)

@0x7c13
Copy link
Member

0x7c13 commented Mar 10, 2020

Even with "ApplicationLanguages.Languages", I am still seeing exception coming from GetSystemFontFamilies(ApplicationLanguages.Languages):

System.Exception: Unspecified error (Exception from HRESULT: 0x80004005) at System.Runtime.InteropServices.McgMarshal

Not sure why. It is only happening recently to my app users but not sure what is causing the issue here. I do not see System.AccessViolationException tho.

@JohnnyWestlake
Copy link
Author

Honestly, out of the 3 devices I could reproduce this on when I first posted, none of them do it anymore. So either an Office update or a Windows Update has fixed my particular exception. (It was always a DirectWrite level issue rather than Win2D's abstraction anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants