character-map-uwp / Character-Map-UWP

A modern, native UWP replacement for the Win32 Character Map and Windows Font Viewer with flawless high DPI and touch support.
MIT License
615 stars 52 forks source link

Error when opening woff files #203

Closed callmeTayyy closed 2 years ago

callmeTayyy commented 2 years ago

Trying to open a .woff font file doesn't work anymore. When clicking on "Open Font" in the app the following error appears:

Cannot access a closed Stream.
   at SharedLibrary!<BaseAddress>+0xb7c36c
   at System.IO.BufferedStream.FlushAsync(CancellationToken) + 0x30
   at System.Reflection.Assembly.GetName() + 0xf
   at CharacterMap.Helpers.FontConverter.<>c__DisplayClass5_0.<<TryConvertWoffToOtfAsync>b__0>d.MoveNext() + 0x280
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() + 0x10
   at CharacterMap.Helpers.FontConverter.<TryConvertAsync>d__3.MoveNext() + 0x14a
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() + 0x16
   at CharacterMap.Core.FontFinder.<LoadFromFileAsync>d__59.MoveNext() + 0x16d
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at CharacterMap.Views.MainPage.<OpenFont>d__55.MoveNext() + 0x58a
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_0(Object) + 0x1e
   at System.Action`1.Invoke(T) + 0x28
   at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33

OS Version: 10.0.19043.1706 OS Architecture: X64 App Version: 2022.2.3.0 App Culture: en-US

callmeTayyy commented 2 years ago

If I double click on the file inside Windows Explorer, the app starts completely blank but without the error message.

Screenshot_20220611_183601512

JohnnyWestlake commented 2 years ago

Thanks for the report (and apologies for taking so long to address it) - fixed this in the codebase so if all goes well the fix should show up in the app within the next week or so.

callmeTayyy commented 2 years ago

Thank you! Your app is awesome, I use it all the time. ☺