cancel
Showing results for 
Search instead for 
Did you mean: 

WPF Viewer crashes application when searching

anthony_osicka
Explorer
0 Kudos

Hi,

I can consistently get the WPF viewer to crash my application when searching within a report. The steps are:

1. View a multi page report.

2. Enter a search string. I use "a".

3. Press Enter until the end of the report.

4. Use the navigation buttons to get back to the start of the report.

5. Change the search string to something else. I use "b".

6. Go back to step 3 and repeat until the unhandled exception is thrown. (usually happens within 10 repeats)

See below for the stack trace.

Any help would be appreciated.

Thanks

Anthony

A first chance exception of type 'System.InvalidOperationException' occurred in PresentationCore.dll

at System.Windows.Media.Visual.TrySimpleTransformToAncestor(Visual ancestor, Boolean inverse, GeneralTransform& generalTransform, Matrix& simpleTransform)

   at System.Windows.Media.Visual.TransformToAncestor(Visual ancestor)

   at SAPBusinessObjects.WPF.ViewerShared.PageView.DrawSelectedObject(MyDrawingVisual objVisual, Boolean scrollTo)

   at SAPBusinessObjects.WPF.Viewer.DocumentView.SearchForText(String text, Boolean matchCase, Boolean matchWholeWord)

   at SAPBusinessObjects.WPF.Viewer.ReportAlbum.SearchForText(String text, Boolean matchCase, Boolean matchWholeWord)

   at SAPBusinessObjects.WPF.Viewer.ViewerCore.SearchForText(String text, Boolean matchCase, Boolean matchWholeWord)

   at SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer.searchBox_PreviewTextInput(Object sender, TextCompositionEventArgs e)

   at System.Windows.Input.TextCompositionEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)

   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

   at System.Windows.Input.TextCompositionManager.UnsafeCompleteComposition(TextComposition composition)

   at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)

   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

   at System.Windows.Input.TextCompositionManager.UnsafeStartComposition(TextComposition composition)

   at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)

   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessTextInputAction(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

   at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)

   at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)

   at System.Windows.Interop.ThreadMessageEventHandler.Invoke(MSG& msg, Boolean& handled)

   at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

   at System.Windows.Application.RunDispatcher(Object ignore)

   at System.Windows.Application.RunInternal(Window window)

   at System.Windows.Application.Run(Window window)

   at System.Windows.Application.Run()

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Not that it helps you much but I'm having the exact same problem with 13 SP4 so it seems like it's been around for a while.

I can't move to SP6 because of the bug that causes the viewer to blank out when it's in a tab that is navigated away from.

I did notice that using the text box to insert a page number to jump to or dragging the scroll bar didn't cause the exception.  It only occurs when the previous and next page buttons are used to jump around the generated report.

--Edit--

Have thrown the viewer to my testers they found they could crash it by jumping around with the page number box.  It is simply harder to do and takes longer.

Message was edited by: Ian Newborn

former_member183750
Active Contributor
0 Kudos

Hello all

I've duplicated the issue and will be reporting it to QA for a fix. I'll update this thread once I have an ID and ETA.

- Ludek

former_member183750
Active Contributor
0 Kudos

Got a tracking number: ADAPT01704159

ETA: Service Pack 7 (October / November 2013)

No guarantees that this will actually be fixed in SP 7, or that SP 7 will be out in Oct. / Nov.

All we can do is ask for the fix in SP 7 and wait...

- Ludek

former_member183750
Active Contributor
0 Kudos

This issue is resoved in SP 7:

http://scn.sap.com/docs/DOC-7824

- Ludek

Answers (2)

Answers (2)

Former Member
0 Kudos

Can you share your code that manages your viewer?

I had the same issue. I fixed it by storing the report source in a session variable.

anthony_osicka
Explorer
0 Kudos

Hi,

I am using WPF, not ASP.net, so I am not sure what you mean by a session variable for WPF?

Thanks

Anthony

Former Member
0 Kudos

A session variable would not work in this case but sharing some of your WPF code would make it easier to figure out what the issue is.

anthony_osicka
Explorer
0 Kudos

I don't think sharing my code will be helpful, this is a bug in the viewer which can be seen by the stack trace.

former_member183750
Active Contributor
0 Kudos

OK. I offered...

Not sure what the stack trace tells you, but it tells me nothing useful... and no, I can not submit this as is to QA for a fix. I need an app they can run to dup the issue.

- Ludek

anthony_osicka
Explorer
0 Kudos

Hi,

I am not too sure what you offered? I replied to your request on what service pack I was running and have not heard anything from you since.

Someone called n c asked for my source code, which I did not feel was relevant because they were talking about ASP.net, not WPF.

The stack trace clearly shows that the exception is occurring in SAPBusinessObjects.WPF.Viewer code.

I have provided clear steps in my initial post on how to produce this bug, I am sure your QA team have a WPF project they can run to test this, it will take less than 5 minutes to reproduce.

Thanks

Anthony

former_member183750
Active Contributor
0 Kudos

What CR Service Pack are you on?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

anthony_osicka
Explorer
0 Kudos

Hi,

I am on SP 6, but it crashed on previous SP also.

I am targeting .net 4 and it crashes on 32 and 64 bit applications.

Thanks

Anthony