@e_danilchenko

Почему возникает System.Runtime.InteropServices.SEHException?

В кратце суть такова. Есть программа, написанная на C#. Довольно долго работала без сбоев, но с недавних пор все переменилось и теперь она зачастила падать выбрасывая вышеупомянутое исключение, при том входные параметры не меняются. Воспроизвести ошибку у себя с отладчиком никак не выходит. Предположительно возникает при формировании WPF форм.

Вот стек ошибки, если кому поможет:

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)
at System.Resources.ResourceReader.LoadObject(Int32, System.Resources.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 Тестер.DigitInputQuestUIElement.InitializeComponent()
at Тестер.DigitInputQuestUIElement..ctor(DigitInputQuest)
at Тестер.Tester+DigitInputQuest.Show()
at Тестер.Tester+Test.showQuest(Int32)
at Тестер.Tester+Test.questAnsvered(System.Collections.Generic.List`1)
at Тестер.Tester+SingleSelectQuest.ansvered(Int32)
at Тестер.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 Тестер.App.Main()

Выручайте, друзья! Уже неделю мозги сушу...
  • Вопрос задан
  • 1129 просмотров
Пригласить эксперта
Ответы на вопрос 1
ImmortalCAT
@ImmortalCAT
C# loving
https://msdn.microsoft.com/ru-ru/library/system.ru...
а лучше показать кусок кода откуда выходит эксцепшин
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы