Developing a desktop WPF (.NET 4) application using VS 2010 SP1, running on Windows 7 Ultimate. We are using the FlowDocument to display formatted data.
When the user has finished entering the data in the forms we generate the document according to the formatting rules they have chosen and we launch the view. In some situations we receive a FailFast when the view is initializing. We are able to reliably reproduce this when the indent for the first line of a paragraph is set to 0.10 or 0.15 inches. There are no issues at 0.00, 0.05, 0.20, or 0.25 inches. We are thoroughly confused.
Stack trace from the System Event log pasted below.
Any insight appreciated.
rjsjr
Log Name: ApplicationSource: .NET Runtime
Date: 7/4/2013 2:57:24 PM
Event ID: 1025
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: redacted
Description:
Application: redacted 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 MS.Internal.PtsHost.Line.get_Width()
at MS.Internal.PtsHost.TextParagraph.FormatLine(MS.Internal.PtsHost.TextParaClient, Int32, Int32, IntPtr, UInt32, Int32, Int32, Int32, Int32, Int32, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, IntPtr ByRef, Int32 ByRef, IntPtr ByRef, Int32 ByRef, FSFLRES ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef)
at MS.Internal.PtsHost.PtsHost.FormatLine(IntPtr, IntPtr, IntPtr, Int32, Int32, IntPtr, UInt32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, IntPtr ByRef, Int32 ByRef, IntPtr ByRef, Int32 ByRef, FSFLRES ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef, Int32 ByRef)
at MS.Internal.PtsHost.UnsafeNativeMethods.PTS.FsFormatSubtrackBottomless(IntPtr, IntPtr, Int32, IntPtr, Int32, UInt32, Int32, Int32, Int32, IntPtr, FSKCLEAR, Int32, FSFMTRBL ByRef, IntPtr ByRef, Int32 ByRef, FSBBOX ByRef, IntPtr ByRef, FSKCLEAR ByRef, Int32 ByRef, Int32 ByRef)
at MS.Internal.PtsHost.ContainerParagraph.FormatParaBottomless(MS.Internal.PtsHost.ContainerParaClient, Int32, IntPtr, Int32, UInt32, Int32, Int32, Int32, MS.Internal.PtsHost.MarginCollapsingState, FSKCLEAR, Int32, FSFMTRBL ByRef, IntPtr ByRef, Int32 ByRef, FSBBOX ByRef, IntPtr ByRef, FSKCLEAR ByRef, Int32 ByRef, Int32 ByRef)
at MS.Internal.PtsHost.PtsHost.SubtrackFormatParaBottomless(IntPtr, IntPtr, IntPtr, Int32, IntPtr, Int32, UInt32, Int32, Int32, Int32, IntPtr, FSKCLEAR, Int32, FSFMTRBL ByRef, IntPtr ByRef, Int32 ByRef, FSBBOX ByRef, IntPtr ByRef, FSKCLEAR ByRef, Int32 ByRef, Int32 ByRef)
at MS.Internal.PtsHost.UnsafeNativeMethods.PTS.FsCreatePageBottomless(IntPtr, IntPtr, FSFMTRBL ByRef, IntPtr ByRef)
at MS.Internal.PtsHost.PtsPage.CreateBottomlessPage()
at MS.Internal.PtsHost.FlowDocumentPage.FormatBottomless(System.Windows.Size, System.Windows.Thickness)
at MS.Internal.Documents.FlowDocumentFormatter.Format(System.Windows.Size)
at MS.Internal.Documents.FlowDocumentView.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.ScrollViewer.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at Microsoft.Windows.Themes.ClassicBorderDecorator.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)
at System.Windows.Controls.RichTextBox.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.ScrollViewer.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(System.Object)
at System.Windows.Media.MediaContext+InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(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 redacted.App.Main()