PawelTroka / Computator.NET

Computator.NET is a special kind of numerical software that is fast and easy to use but not worse than others feature-wise. It's features include: - Real and complex functions charts - Real and complex calculator - Real functions numerical calculations including different methods - Over 107 Elementary functions - Over 141 Special functions - Over 21 Matrix functions and operations - Scripting language with power to easy computations including matrices - You can declare your own custom functions with scripting language
GNU General Public License v3.0
233 stars 51 forks source link

Application crash - Font 'Cambria' does not support style 'Regular' in Windows Store version v2.2.3 in some environments #88

Closed PawelTroka closed 7 years ago

PawelTroka commented 7 years ago

Cause of this problem is basically the same as in defect #84. We thought it is resolved but it's not - installer in 2.2.1 probably was doing something more in the system then we have predicted and that's why now font is still missing. Below are screens from affected environment: image image image

and logs:

2017-05-11 16:53:07.53.730 [1]INFO Computator.NET.Program.Main - Logging started... 
2017-05-11 16:53:07.53.916 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation - Environment information: 
2017-05-11 16:53:07.53.922 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  TickCount: 242823171 
2017-05-11 16:53:07.53.922 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  ExitCode: 0 
2017-05-11 16:53:07.53.922 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  CommandLine: "C:\Program Files\WindowsApps\TROKASoftware.Computator.NET_2.2.3.0_x64__90q57adm011tp\Computator.NET.exe"  
2017-05-11 16:53:07.53.942 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  CurrentDirectory: C:\WINDOWS\system32 
2017-05-11 16:53:07.53.942 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  SystemDirectory: C:\WINDOWS\system32 
2017-05-11 16:53:07.53.942 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  MachineName: START-VAIO 
2017-05-11 16:53:07.53.953 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  ProcessorCount: 4 
2017-05-11 16:53:07.53.953 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  SystemPageSize: 4096 
2017-05-11 16:53:07.53.953 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  NewLine: 

2017-05-11 16:53:07.53.953 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Version: 4.0.30319.42000 
2017-05-11 16:53:07.53.973 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  WorkingSet: 34979840 
2017-05-11 16:53:07.53.973 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  OSVersion: Microsoft Windows NT 10.0.15063.0 
2017-05-11 16:53:08.53.086 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  StackTrace:    w System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   w System.Environment.get_StackTrace()
   w System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   w System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   w System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   w System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   w Computator.NET.EnvironmentLogger.LogEnvironmentInformation()
   w Computator.NET.Program.Main() 
2017-05-11 16:53:08.53.086 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Is64BitProcess: True 
2017-05-11 16:53:08.53.093 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Is64BitOperatingSystem: True 
2017-05-11 16:53:08.53.093 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  HasShutdownStarted: False 
2017-05-11 16:53:08.53.093 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  UserName: Start 
2017-05-11 16:53:08.53.093 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  UserInteractive: True 
2017-05-11 16:53:08.53.110 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  UserDomainName: START-VAIO 
2017-05-11 16:53:08.53.110 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  CurrentManagedThreadId: 1 
2017-05-11 16:53:08.53.110 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation - RuntimeInformation information: 
2017-05-11 16:53:08.53.110 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  IsUnix: False 
2017-05-11 16:53:08.53.110 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  IsMacOS: False 
2017-05-11 16:53:08.53.110 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  IsLinux: False 
2017-05-11 16:53:08.53.125 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  IsWindows: True 
2017-05-11 16:53:08.53.125 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Is64Bit: True 
2017-05-11 16:53:08.53.125 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Is32Bit: False 
2017-05-11 16:53:08.53.125 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation - AppInformation information: 
2017-05-11 16:53:08.53.125 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Version: v2.2.3.0 
2017-05-11 16:53:08.53.125 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Directory: C:\Program Files\WindowsApps\TROKASoftware.Computator.NET_2.2.3.0_x64__90q57adm011tp 
2017-05-11 16:53:08.53.142 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  DataDirectory: C:\Users\Start\Documents\Computator.NET 
2017-05-11 16:53:08.53.142 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  LogsDirectory: C:\Users\Start\Documents\Computator.NET\Logs 
2017-05-11 16:53:08.53.142 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  SettingsPath: C:\Users\Start\Documents\Computator.NET\settings.dat 
2017-05-11 16:53:08.53.142 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  TempDirectory: C:\Users\Start\AppData\Local\Temp\Computator.NET.DataTypes.MSIL.2.2.3.0 
2017-05-11 16:53:08.53.142 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Name: Computator.NET 
2017-05-11 16:53:08.53.142 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation - GslConfig: 
2017-05-11 16:53:08.53.159 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  Location: C:\Users\Start\AppData\Local\Temp\Computator.NET.DataTypes.MSIL.2.2.3.0 
2017-05-11 16:53:08.53.159 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  GslLibraryName: gsl.dll 
2017-05-11 16:53:08.53.159 [1]INFO Computator.NET.EnvironmentLogger.LogEnvironmentInformation -  GslDllName: gsl.dll 
2017-05-11 16:57:12.57.438 [1]ERROR Microsoft.Practices.Unity.UnityContainer.DoBuildUp - Unhandled UI Exceptionis terminting: True, Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Computator.NET.Core.Presenters.MainFormPresenter", name = "(none)".
Exception occurred while: Calling constructor Computator.NET.Views.CalculationsView().
Exception is: ArgumentException - Font 'Cambria' does not support style 'Regular'.
-----------------------------------------------
At the time of the exception, the container was:

  Resolving Computator.NET.Core.Presenters.MainFormPresenter,(none)
  Resolving parameter "view" of constructor Computator.NET.Core.Presenters.MainFormPresenter(Computator.NET.Core.Abstract.Views.IMainView view, Computator.NET.Core.Model.ISharedViewState sharedViewState, Computator.NET.Core.Abstract.Services.IApplicationManager applicationManager)
    Resolving Computator.NET.Views.MainView,(none) (mapped from Computator.NET.Core.Abstract.Views.IMainView, (none))
    Resolving parameter "calculationsView" of constructor Computator.NET.Views.MainView(Computator.NET.Views.MenuStripView menuStripView, Computator.NET.Views.ToolBarView toolbarView, Computator.NET.Views.CalculationsView calculationsView, Computator.NET.Views.NumericalCalculationsView numericalCalculationsView, Computator.NET.Views.ScriptingView scriptingView, Computator.NET.Views.CustomFunctionsView customFunctionsView, Computator.NET.Views.ChartingView chartingView, Computator.NET.Views.ExpressionView expressionView)
      Resolving Computator.NET.Views.CalculationsView,(none)
      Calling constructor Computator.NET.Views.CalculationsView()
 ---> System.ArgumentException: Font 'Cambria' does not support style 'Regular'.
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)
   at lambda_method(Closure , IBuilderContext )
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)
   at lambda_method(Closure , IBuilderContext )
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
   --- End of inner exception stack trace ---
   at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
   at Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
   at Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer container, ResolverOverride[] overrides)
   at Computator.NET.Bootstrapping.WinFormsBootstrapper.CreatePresenters()
   at Computator.NET.Bootstrapping.WinFormsBootstrapper.Create[T]()
   at Computator.NET.Program.Main() Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Computator.NET.Core.Presenters.MainFormPresenter", name = "(none)".
Exception occurred while: Calling constructor Computator.NET.Views.CalculationsView().
Exception is: ArgumentException - Font 'Cambria' does not support style 'Regular'.
-----------------------------------------------
At the time of the exception, the container was:

  Resolving Computator.NET.Core.Presenters.MainFormPresenter,(none)
  Resolving parameter "view" of constructor Computator.NET.Core.Presenters.MainFormPresenter(Computator.NET.Core.Abstract.Views.IMainView view, Computator.NET.Core.Model.ISharedViewState sharedViewState, Computator.NET.Core.Abstract.Services.IApplicationManager applicationManager)
    Resolving Computator.NET.Views.MainView,(none) (mapped from Computator.NET.Core.Abstract.Views.IMainView, (none))
    Resolving parameter "calculationsView" of constructor Computator.NET.Views.MainView(Computator.NET.Views.MenuStripView menuStripView, Computator.NET.Views.ToolBarView toolbarView, Computator.NET.Views.CalculationsView calculationsView, Computator.NET.Views.NumericalCalculationsView numericalCalculationsView, Computator.NET.Views.ScriptingView scriptingView, Computator.NET.Views.CustomFunctionsView customFunctionsView, Computator.NET.Views.ChartingView chartingView, Computator.NET.Views.ExpressionView expressionView)
      Resolving Computator.NET.Views.CalculationsView,(none)
      Calling constructor Computator.NET.Views.CalculationsView()
 ---> System.ArgumentException: Font 'Cambria' does not support style 'Regular'.
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)
   at lambda_method(Closure , IBuilderContext )
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)
   at lambda_method(Closure , IBuilderContext )
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
   --- End of inner exception stack trace ---
   at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
   at Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
   at Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer container, ResolverOverride[] overrides)
   at Computator.NET.Bootstrapping.WinFormsBootstrapper.CreatePresenters()
   at Computator.NET.Bootstrapping.WinFormsBootstrapper.Create[T]()
   at Computator.NET.Program.Main() 
System.ArgumentException: Font 'Cambria' does not support style 'Regular'.
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)
   at lambda_method(Closure , IBuilderContext )
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(NamedTypeBuildKey newBuildKey)
   at lambda_method(Closure , IBuilderContext )
   at Microsoft.Practices.ObjectBuilder2.DynamicBuildPlanGenerationContext.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) 
2017-05-11 17:00:00.00.665 [1]ERROR Microsoft.Practices.Unity.UnityContainer.DoBuildUp - Unhandled UI Exceptionis terminting: True, Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Computator.NET.Core.Presenters.MainFormPresenter", name = "(none)".

Of course as can be seen on those screens application is providing workaround - installing fonts. However this workaround requires users to be administrators and some might be not.

We also have some indications about this error from Windows Store developer dashboard: CLR_EXCEPTION_System.ArgumentException_80070057_Computator.NET.exe!Computator.NET.Dialogs.LoadingScreen..ctor image

Stack trace
Frame   Image   Function    Offset
0   System_Drawing_ni   System.Drawing.Font.CreateNativeFont    0x15A75D
1   System_Drawing_ni   System.Drawing.Font.Initialize  0xD7
2   System_Drawing_ni   System.Drawing.Font..ctor   0x5E
3   Computator_NET  Computator.NET.Dialogs.LoadingScreen..ctor  0x152
4   Computator_NET  Computator.NET.Dialogs.LoadingScreen.ShowForm   0x1F
5   mscorlib_ni System.Threading.ExecutionContext.RunInternal   0x15E
6   mscorlib_ni System.Threading.ExecutionContext.Run   0x14
7   mscorlib_ni System.Threading.ExecutionContext.Run   0x52
8   mscorlib_ni System.Threading.ThreadHelper.ThreadStart   0x52
Stack trace
Frame   Image   Function    Offset
0   System_Drawing_ni   System.Drawing.Font.CreateNativeFont    0x15A75D
1   System_Drawing_ni   System.Drawing.Font.Initialize  0xD7
2   System_Drawing_ni   System.Drawing.Font..ctor   0x5E
3   Computator_NET  Computator.NET.Dialogs.LoadingScreen..ctor  0x152
4   Computator_NET  Computator.NET.Dialogs.LoadingScreen.ShowForm   0x1F
5   mscorlib_ni System.Threading.ExecutionContext.RunInternal   0x15E
6   mscorlib_ni System.Threading.ExecutionContext.Run   0x14
7   mscorlib_ni System.Threading.ExecutionContext.Run   0x52
8   mscorlib_ni System.Threading.ThreadHelper.ThreadStart   0x52
PawelTroka commented 7 years ago

This issue seems to be fixed as of now - maybe in the end it was bug in Windows itself and Microsoft has changed it. We also stopped getting new crash reports in developer dashboard related to this so it supports my hypothesis. If anything happens I will reopen this defect.