2014-07-10 13 views
6

Pracuję na aplikacji WPF zbudowany dla Kiosk (ekran dotykowy). Budujemy wirtualną klawiaturę dla siebie.WPF awarii przez Environment.FailFast

Istnieje jeden ekran, w którym wymieniono niektóre elementy (maksymalnie 4 elementy) za pomocą kontrolki DataGrid z panelem tekstowym. Wirtualna klawiatura pokazuje ostrość (to jak ją zbudowano).

Gdy losowo wybieramy różne elementy, aplikacja ulega awarii bez dotarcia do ogólnej procedury obsługi wyjątku. Ten problem jest powtarzalny na ekranie dotykowym, ale nie na zwykłych ekranach. Dziennik zdarzeń przedstawia poniżej

Application: CashNGo.WPF.exe 
Framework Version: v4.0.30319 
Description: The application requested process termination through System.Environment.FailFast(string 
message). 
Message: Unrecoverable system error. 
Stack: 
    at System.Environment.FailFast(System.String) 
    at MS.Internal.Invariant.FailFast(System.String, System.String) 
    at MS.Internal.Invariant.Assert(Boolean, System.String) 
    at System.Windows.Documents.TextStore.VerifyTextStoreConsistency() 
    at System.Windows.Documents.TextStore.GrantLock() 
    at System.Windows.Documents.TextStore.GrantLockWorker(LockFlags) 
    at System.Windows.Documents.TextStore.RequestLock(LockFlags, Int32 ByRef) 
    at MS.Win32.UnsafeNativeMethods+ITextStoreACPSink.OnSelectionChange() 
    at System.Windows.Documents.TextStore.OnSelectionChanged() 
    at System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.NotifyChanged(Boolean, 
Boolean) 
    at System.Windows.Documents.TextRangeBase.EndChange(System.Windows.Documents.ITextRange, 
Boolean, Boolean) 
    at System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.Select(System.Windows.Documents.ITextPointer, 
System.Windows.Documents.ITextPointer) 
    at System.Windows.Controls.TextBox.Select(Int32, Int32) 
    at System.Windows.Controls.TextBox.set_CaretIndex(Int32) 
    at Common.Controls.SoftKeyboard.<.cctor>b__1c(System.Windows.Controls.TextBox) 
    at System.Windows.Input.DelegateCommand`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089]].Execute(System.__Canon) 
    at Common.Controls.SoftKeyboard+<>c__DisplayClass5.<SoftKeyboardFocus_Changed>b__0() 
    at System.Windows.Threading.Dispatcher.Invoke(System.Action, System.Windows.Threading.DispatcherPriority, 
System.Threading.CancellationToken, System.TimeSpan) 
    at System.Windows.Threading.Dispatcher.Invoke(System.Action, System.Windows.Threading.DispatcherPriority) 
    at Common.Extensions+<>c__DisplayClass1.<DelayedInvoke>b__0(System.Object, System.EventArgs) 
    at System.Windows.Threading.DispatcherTimer.FireTick(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.DispatcherOperation.InvokeImpl() 
    at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object) 
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, 
System.Object, Boolean) 
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, 
System.Object, Boolean) 
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, 
System.Object) 
    at System.Windows.Threading.DispatcherOperation.Invoke() 
    at System.Windows.Threading.Dispatcher.ProcessQueue() 
    at System.Windows.Threading.Dispatcher.WndProcHook(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 CashNGo.WPF.App.Main() 

Zrobiłem kilka wyszukiwania i znaleźć http://social.msdn.microsoft.com/Forums/vstudio/en-US/dfbd2526-8953-4ce8-97c2-43246fd251c0/wpf-framework-crashing-on-setting-foxus-in-textbox?forum=wpf który jest dokładnie taki sam wyjątek.

Każda sugestia byłaby pomocna.

+0

Jako że ślad nie wydaje się mieć interesującego punktu. Czy mógłbyś opublikować działającą próbkę, która może się powielać? – pushpraj

+0

Po prostu wyłącz usługę o nazwie "Usługa wprowadzania na komputerze typu Tablet" i zobacz, co się stanie. –

+0

@pushpraj Próbka nie jest możliwa, ponieważ wymaga wielu stylów i uruchomienia wirtualnej klawiatury. Zrobiliśmy pewne odkrycie. Wyłączyłem VK, a awaria zniknęła. –

Odpowiedz

4

Wyłącz usługę Windows o nazwie.

Tablet PC Input Service 
+1

Oczywiście, na tablecie to nie jest świetny pomysł. Wszelkie prace dookoła lub poprawki, które nadal pozwalają typowi użytkownika być niesamowite. – CodeMonkeyForHire

4

Wyłączenie usługi Windows naprawiło problem w moim przypadku. W moim Windows 8.1 Pro usługa nazywa się "Touch Keyboard and Handwriting Panel Service"

+1

Więcej szczegółów, dlaczego? –