App hosting Report Viewer crashes on exit after export
Posted
by Paul Sasik
on Stack Overflow
See other posts from Stack Overflow
or by Paul Sasik
Published on 2010-04-21T12:27:13Z
Indexed on
2010/04/21
15:43 UTC
Read the original article
Hit count: 275
We have a .NET Winforms application that hosts the Crystal Reports Viewer control (Version XI). It works well for the most part but when an export of data from the viewer is performed the application will crash on exit and in unmanaged code. The error message is not very useful and just says that an incorrect memory location was accessed. No other info such a specific DLL etc. is provided.
This only happens after the viewer is used to export a report to CSV, XML etc. My guess is that at some point in the export process Crystal creates a resource that attempts an action on shut down to a parent window (perhaps) that no longer exists.
I've seen a number of memory leak and shut down issues with Crystal but this one's new. Has anyone seen it and come up with a workaround or has ideas for workarounds?
So far we've tried explicitly disposing of all crystal-related objects, setting to null and even setting a Thread.Sleep cycle on shut down to "give Crystal time to clean up."
Update:
- The crash happens only on shut down (so not immediate)
- All export formats work
- All export files are created properly
- CR is installed on the same machine as the hosting .NET app
- not sure about exporting from the IDE... is that even possible?
© Stack Overflow or respective owner