Answer the question
In order to leave comments, you need to log in
Why is System.Runtime.InteropServices.SEHException thrown?
In a nutshell, this is the point. I have a program written in C#. It worked without failures for quite a long time, but recently everything has changed and now it often crashes throwing the aforementioned exception, while the input parameters do not change. There is no way to reproduce the error with the debugger. Presumably occurs when generating WPF forms.
Here is the error stack if it helps anyone:
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
Stack:
at System.IO.UnmanagedMemoryStream.ReadByte()
at System.IO.BinaryReader.ReadByte()
at System.IO.BinaryReader.Read7BitEncodedInt()
at System.Resources.ResourceReader._LoadObjectV2(Int32, System.Resources.ResourceTypeCode ByRef)
at System.Resources.ResourceReader.LoadObjectV2(Int32, System.Resources.ResourceTypeCode ByRef
) .ResourceTypeCode ByRef)
at System.Resources.RuntimeResourceSet.GetObject(System.String, Boolean, Boolean)
at System.Resources.RuntimeResourceSet.GetObject(System.String, Boolean)
at System.Resources.ResourceManager.GetObject(System.String, System .Globalization.CultureInfo, Boolean)
at System.Resources.ResourceManager.GetStream(System.String, System.Globalization.CultureInfo)
at MS.Internal.Resources.ResourceManagerWrapper.GetStream(System.String)
at MS.Internal.AppModel.ResourcePart.EnsureResourceLocationSet()
at MS.Internal.AppModel.ResourcePart.GetContentTypeCore()
at System.IO.Packaging.PackagePart.get_ContentType()
at System.Windows.Application.LoadComponent(System.Object, System .Uri)
at Tester.DigitInputQuestUIElement.InitializeComponent()
at Tester.DigitInputQuestUIElement..ctor(DigitInputQuest)
at Tester.Tester+DigitInputQuest.Show()
at Tester.Tester+Test.showQuest(Int32)
at Tester.Tester+Test.questAnsvered (System.Collections.Generic.List`1)
at Tester.Tester+SingleSelectQuest.ansvered(Int32)
at Tester.SingleSelectQuestUIElement+<>c__DisplayClass7.<.ctor>b__5(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows. RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System .Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr , Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System. Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading. DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef )
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at System.Windows.Application. Run()
at Tester.App.Main()
Help me, friends! I've been drying my brain for a week now...
Answer the question
In order to leave comments, you need to log in
https://msdn.microsoft.com/ru-ru/library/system.ru...
but it's better to show a piece of code where the exception comes from
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question