cancel
Showing results for 
Search instead for 
Did you mean: 

CR for VS2010: report viewer crashes after two times of oppening

Former Member
0 Kudos

We use CR for a long time in our MFC user interface.

The last version which we had used was the CR XI. We included the .NET managed code into our MFC C++ application. This worked fine on Windows XP.



Now we have to change to Windows Server 2008 and Windows 7. Therefore we decided to migrate our application to VC++ 2010 and CR for VS2010.

We use the following Software:

- Visual Studio Pro 2010

- Crystal Report for Visual Studio 2010 V13.0 SP1

- .NET 4.0 Framework Full Version



The project runs and the reports can be opened. It works fine (without crash till now) on the 2008 servers but it crashes every third or fourth time on the Windows 7 clients. It crashes somewhere in the CR viewer, sometimes when opening, sometimes when closing or in between.

When I debug the application I get some strange information in the output file (on the server and on the client). At several point there are C++ exceptions of different types. I have added the output dump below ...



I tried a lot of things with reinstalling .NET, CR Runtime, C++ Redist/Runtime without success.

I also looked into some of the posted code samples and tried to find something. But I could not find one for VC++ 2010. I could also not find a markable difference to our code comming from erlier CR XI intergration.



Is there a description or better a code sample how to do this integrateio properly ? Is there a change to earlier versions what could cause thiese crashes ?





Parts of output file:



...

"ui.exe" (Verwaltet (v4.0.30319)): "C:WindowsassemblyGAC_MSILCrystalDecisions.Windows.Forms.resources13.0.2000.0_de_692fbea5521e1304CrystalDecisions.Windows.Forms.resources.dll" geladen

Eine Ausnahme (erste Chance) bei 0x7434b403 in ui.exe: 0xC0000005: Zugriffsverletzung beim Schreiben an Position 0x05b51003.

"ui.exe": "ImageAtBase0x62900000" geladen, Der Ladevorgang wurde durch die Einstellung zum Einschließen/Ausschließen deaktiviert.

...



...

"ui.exe": "ImageAtBase0x6900000" geladen, Der Ladevorgang wurde durch die Einstellung zum Einschließen/Ausschließen deaktiviert.

"ui.exe": "ImageAtBase0x5cf60000" entladen.

"ui.exe" (Verwaltet (v4.0.30319)): "C:WindowsassemblyGAC_MSILCrystalDecisions.ReportAppServer.DataSetConversion13.0.2000.0__692fbea5521e1304CrystalDecisions.ReportAppServer.DataSetConversion.dll" geladen

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: EEFileLoadException an Speicherposition 0x00179008..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: an Speicherposition 0x00000000..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: an Speicherposition 0x00000000..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: an Speicherposition 0x00000000..

Eine Ausnahme (erste Chance) des Typs "System.IO.FileNotFoundException" ist in CrystalDecisions.CrystalReports.Engine.dll aufgetreten.

"ui.exe": "C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86clientdoc.dll" geladen, Cannot find or open the PDB file

...



...

"ui.exe": "C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86crlogger.dll" entladen.

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: MalformedURLException an Speicherposition 0x0017947c..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: an Speicherposition 0x00000000..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: RuntimeException an Speicherposition 0x00179480..

"ui.exe": "C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86crqe_res_en.dll" geladen, Cannot find or open the PDB file

...



...

"ui.exe": "C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86secSSO.dll" entladen.

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: CXLib500::CSharedLibraryException an Speicherposition 0x00176aa4..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: CXLib500::CSharedLibraryException an Speicherposition 0x00176ad4..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: Ocalibsecurity400::CSSOException an Speicherposition 0x00175dec..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: an Speicherposition 0x00000000..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: Ocalibsecurity400::InternalException an Speicherposition 0x00176c84..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: an Speicherposition 0x00000000..

Eine Ausnahme (erste Chance) bei 0x75fffbae in ui.exe: Microsoft C++-Ausnahme: an Speicherposition 0x00000000..

"ui.exe": "C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86 ptdefmodel.dll" geladen, Cannot find or open the PDB file

...

Edited by: mhengartner on Nov 24, 2011 1:02 PM

Edited by: mhengartner on Nov 24, 2011 1:02 PM

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

Moved your post to the .NET SDK forum.

SP2 was just released, see the sticky note at the top of this page.

Make sure you are closing and disposing of the report objects after each use.

And not much info on your app either so search in this forum for know issues, make sure you set the app for x86 or x64, not both. Framework must be full not client.

If you are using DataSets be sure to set the LegacyMode in the app.config file.

Thanks

Don

Former Member
0 Kudos

Hello Don

I did the following:

- installed and used SP2 --> no change

- x86 only --> ok

- .Net 4 full --> ok

I found a sample called 'cr_sample_view_cpp_net5' on your site. When I started this example I did not get the access violations as before in our user interface.

Then I moved exactly this code into our application and I got the access violations again.

Finally I found a difference in the settings for the 'Common Language Runtime Support'. Your test program uses /clr:pure and we use /clr.

Changing from /clr to /clr:pure solves the problem with the access violations and it would probably also solve our user interface crashes. But because it is an MFC application we can not use /clr:pure. We have to stay with /clr.

FYI: When I change from /clr:pure to /clr in your sample prog we get also the access violations as we get it in our app.

Do you see any chance that we can use the .NET SDK in our MFC application without using /clr:pure ?

Should we go another way (e.g. use ActiveX viewer) and are there any code samples for a CR2010 in VS2010 (with C++ / MFC) ?

I also tried to encapsulate the viewer in a C# based DLL and include this into our app instaed of including the CRViewer directly. It does not really solve the problem because we still get some access violations.

Thanks a lot

Mario

Edited by: mhengartner on Dec 1, 2011 2:27 PM

Edited by: mhengartner on Dec 1, 2011 2:30 PM

0 Kudos

Hi Mario,

Nice find.... Never thought of looking at the compilation switches...

Unfortunately CR must use Mixed Mode and must be a Managed C++ app. I tried this also and discovered the same thing a long time ago. CR needs to be Managed C++ code and due to legacy support we must be Mixed Mode. Most notably for ADO.NET ( DataSets ) using the ADOPlus dll. We will not be able to mark all of our dll's non-mixed mode due to dependencies and issues with Microsoft.

See this MS KBase for more info:

http://msdn.microsoft.com/en-us/library/ms173253(v=vs.80).aspx

Also, you can not use the ActiveX viewer, no longer shipped in distribution packages and no one is licensed to distribute it.

Also, CR has supported MFC for a long time, since CR 9 when crpe32 was still supported.

You should move to Manage C# code.

Thanks

Don

Former Member
0 Kudos

Hi Don

well ... our new applications are done in C#.

But because we program customer specific software for production plants it is difficult to explain them why we should rewrite the old c++ apps just to do the same job as in the past.

Our solution in this actual case will be that we run a second app only with the CR viewer included.

Thanks

Mario

0 Kudos

Hello,

It's quite simple. You stated:

I found a sample called 'cr_sample_view_cpp_net5' on your site. When I started this example I did not get the access violations as before in our user interface.

Then I moved exactly this code into our application and I got the access violations again.

It works in a simple test app so you need to verify the references and if not update them and debug the cause in your code. We can't help you with seeing the app and we don't do that. If you need to can hire Professional Services to review your code....

Thanks

Don

0 Kudos

Hello,

It's quite simple. You stated:

I found a sample called 'cr_sample_view_cpp_net5' on your site. When I started this example I did not get the access violations as before in our user interface.

Then I moved exactly this code into our application and I got the access violations again.

It works in a simple test app so you need to verify the references and if not update them and debug the cause in your code. We can't help you with seeing the app and we don't do that. If you need to can hire Professional Services to review your code....

Thanks

Don

Former Member
0 Kudos

Hi Don

yes, but I also stated that we cannot use the 'clr:pure' switch because of MFC. We have to use 'clr'

Also your little example app does not work with the 'clr' switch. So I do not see how I could fix that in our code.

Thanks

Mario

Answers (1)

Answers (1)

Former Member
0 Kudos

i have a program that can open a viewer which can close then open the viewer again, is this the type of application you are using or are you saying that every third time ( or so) that the whole program runs it crashes?

if the second case when you re-boot your machine can you ever get to to crash on the first running?

if not are there any 'left' over processes or DLL's that are not unloading/ completing correctly.

Former Member
0 Kudos

I open the CR Viewer within a dialog of my application. When I open and close this dialog three (or so) times the whole application crashes.<br>

<br>

A reboot of the machine does not change anything.<br>

If I restart the application the program acts in the same manner. This can be repeated.<br>

<br>

I do not see any left over processes.<br>