Startup Crash with .NET 4.7
See original GitHub issueReproducible on all my Windows 7 machines with SyncTrayzor 1.1.16 :
SyncTrayzor crashes at startup after installing Microsoft .NET Framework 4.7 for Windows 7 and Windows Server 2008 R2 for x64 (KB3186497)
http://support.microsoft.com/kb/3186497
A classic: “Unhandled exception while trying to display unhandled exception window”
Relevant part of Log:
2017-06-14 10:00:42.7554 #2752 [Error] SyncTrayzor.Bootstrapper: Unhandled exception while trying to display unhandled exception window System.TypeInitializationException Der Typeninitialisierer für "MS.Win32.Penimc.UnsafeNativeMethods" hat eine Ausnahme verursacht. Boolean CreateResetEvent(IntPtr ByRef) bei MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle)
bei System.Windows.Input.PenThreadWorker..ctor()
bei System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext)
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor()
bei System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices()
bei System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(InputManager inputManager, PresentationSource inputSource)
bei System.Windows.Interop.HwndStylusInputProvider..ctor(HwndSource source)
bei System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
bei System.Windows.Window.CreateSourceWindow(Boolean duringShow)
bei System.Windows.Window.ShowHelper(Object booleanBox)
bei System.Windows.Window.ShowDialog()
bei SyncTrayzor.Bootstrapper.OnUnhandledException(DispatcherUnhandledExceptionEventArgs e) in C:\projects\synctrayzor\src\SyncTrayzor\Bootstrapper.cs:Zeile 309. System.TypeInitializationException: Der Typeninitialisierer für "MS.Win32.Penimc.UnsafeNativeMethods" hat eine Ausnahme verursacht. ---> System.Runtime.InteropServices.COMException: Klasse nicht registriert (Ausnahme von HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
bei MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
bei MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager()
bei MS.Win32.Penimc.UnsafeNativeMethods..cctor()
--- Ende der internen Ausnahmestapelüberwachung ---
bei MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle)
bei System.Windows.Input.PenThreadWorker..ctor()
bei System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext)
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor()
bei System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices()
bei System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(InputManager inputManager, PresentationSource inputSource)
bei System.Windows.Interop.HwndStylusInputProvider..ctor(HwndSource source)
bei System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
bei System.Windows.Window.CreateSourceWindow(Boolean duringShow)
bei System.Windows.Window.ShowHelper(Object booleanBox)
bei System.Windows.Window.ShowDialog()
bei SyncTrayzor.Bootstrapper.OnUnhandledException(DispatcherUnhandledExceptionEventArgs e) in C:\projects\synctrayzor\src\SyncTrayzor\Bootstrapper.cs:Zeile 309.
COMException Klasse nicht registriert (Ausnahme von HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) System.Object CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef)
2017-06-14 10:00:44.2062 #2752 [Error] SyncTrayzor.Bootstrapper: An unhandled AppDomain exception occurred. Terminating: True System.TypeInitializationException Der Typeninitialisierer für "MS.Win32.Penimc.UnsafeNativeMethods" hat eine Ausnahme verursacht. Boolean CreateResetEvent(IntPtr ByRef) bei MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle)
bei System.Windows.Input.PenThreadWorker..ctor()
bei System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext)
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor()
bei System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices()
bei System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(InputManager inputManager, PresentationSource inputSource)
bei System.Windows.Interop.HwndStylusInputProvider..ctor(HwndSource source)
bei System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
bei System.Windows.Window.CreateSourceWindow(Boolean duringShow)
bei System.Windows.Window.ShowHelper(Object booleanBox)
bei System.Windows.Window.ShowDialog()
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) System.TypeInitializationException: Der Typeninitialisierer für "MS.Win32.Penimc.UnsafeNativeMethods" hat eine Ausnahme verursacht. ---> System.Runtime.InteropServices.COMException: Klasse nicht registriert (Ausnahme von HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
bei MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
bei MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager()
bei MS.Win32.Penimc.UnsafeNativeMethods..cctor()
--- Ende der internen Ausnahmestapelüberwachung ---
bei MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle)
bei System.Windows.Input.PenThreadWorker..ctor()
bei System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext)
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets()
bei System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor()
bei System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices()
bei System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(InputManager inputManager, PresentationSource inputSource)
bei System.Windows.Interop.HwndStylusInputProvider..ctor(HwndSource source)
bei System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
bei System.Windows.Window.CreateSourceWindow(Boolean duringShow)
bei System.Windows.Window.ShowHelper(Object booleanBox)
bei System.Windows.Window.ShowDialog()
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
COMException Klasse nicht registriert (Ausnahme von HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) System.Object CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef)
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
NET applications crash at startup - .NET Framework
A user starts a .NET application. However, the application crashes at startup if the user.config file is corrupt. The application works fine ...
Read more >NET applications crash at startup - .NET Framework
A user starts a .NET application. However, the application crashes at startup if the user.config file is corrupt. The application works fine ...
Read more >Startup crash on Windows 7/8 with .NET Framework 4.7 ...
Application: HearthstoneDeckTracker.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception.
Read more >Application Startup slower under .NET Framework 4.7.2
We have an application (well, actually two) targetting .NET Framework 4.7 (not 4.7.1, not 4.7.2; mostly because it wasn't necessary/required ...
Read more >Visual Studio crash at start-up
I had a similar problem, both VS2015 and VS2013 would crash at startup. Tracked it down to an application I installed which put...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For the record: it was indeed an issue with the Wacom drivers (I still had version 5.2.4-6, found 5.3.5-3 on the web). Now running smoothly again.
More Info: There is also a race condition involved. On my laptop with an SSD things load fast enough at boot time to have SyncTrayzor started before the tablet drivers load. So syncing works and the status bar icon is also working correctly, It simply ignores any clicks. If I kill SyncTrayzor and try to restart, I get the full crash.