What are the challenges you face when working across database platforms? Take the survey

Problem with error handling in DevExpress XtraReport

ScottBeardScottBeard Posts: 3
edited May 15, 2012 8:17AM in SmartAssembly
HI, I'm evaluating SA at the moment. I'm using SA on my c# library and c# app. The library is being used to display a DevExpress XtraReport.

There is an exception (NullReferenceException) being raised in one of the report events. If I wrap my event code in try/catch then it's caught ok and I can deal with it. However if I don't do this SA doesn't catch the exception - the XtraReport just displays a simple message box.

For an additional problem, if I try/catch my code then call ExceptionReporting.Report to use the SA handler then it actually gets even worse - the SA error handling window does appear, but underneath it there's a modal message saying "Stack empty". Took me a minute or two to figure that out, as it looks like the app has locked up!


  • Options
    Sorry about this - on rare occasions our unhandled exception handler does let a few things go (usually because of manipulation of GUI thread under the feet of SA).

    Are you able to create a minimalistic project that exhibits this behaviour so that I can reproduce here? This dramatically speeds up the resolution prognosis.

    If not, I'll probably have to reproduce anyway so it might take a little while...
  • Options
    Unfortunately not at the moment, as I've gone on holiday, however if you have access to the xtrareports....

    * I created a very basic report, linked to a simple xpcollection.
    * I added a grouping level and a field from the bound xpcollection to the grouping footer.
    * Added an event to the summary calculation event (can't remember the exact event name)
    * In the event code I had some buggy code which generated a null exception error - there wasn't anything fancy going on - you could just declare a null string and query it's properties to get the same effect.

  • Options
    Just to let you know- I tried to reproduce but was unable to find the same problem. If you could send a small reproduction problem I will keep trying to reproduce. I'm sorry but the bar is very high here when it comes to establishing a problem with any particular build.
  • Options
    manlyboymanlyboy Posts: 27 Bronze 2
    Just thought I would mention that I am experiencing the same thing here.

    To get around the issue I [DoNotObfuscate] the XtraReport designer namespace for each report.

    I'll create a small project in the next few days and let you have it if the OP didn't send you one.
Sign In or Register to comment.