Using LV 11.0.1 32-bit on XP
I changed the option from sending the image of the front panel to a printer to sending it to Word using the NI report generation tool. This works in the development version. It works in my executable. However since I made this change I am getting a crash dump giving me an exception code: 0XC0000005..
The one thing I have tried at this point this appears to help but did not solve the problem was to set the (vi) with the report function in it as always included but located in an external directory instead of the executable then load when needed with the vi server. However I did have to keep the word class files included in the executable as the (vi) was unable to find the class files if located in the external directory.
The crash does not always happen when making the report but this started when this report generation tool was changed from sending to a printer to sending to Word. The application will run and function several hours or crash soon after starting. It is unacceptable to have this happen during testing. The application is running on at least six stations but only one has the modified version and this is the one experiencing the crash. On my development machine when running the full development version no crash yet. However if I run the executable on the development machine it will crash.
If there is any suggestions I would like to hear them. At this time I am considering moving this form to Excel but am concerned the same issue may show up.
Sorry to hear that you're experiencing crash problems with the toolkit. I'm assuming you are referring to the "Append Front Panel Image to Report.vi"
You say that this functions properly when you are in the LabVIEW development environment and when you build an executable. This works only on the computer that you have developed the VI on? Are you experiecing crash problems deploying the executable on another machine?
You also noted that the crash doesn't always happen. Does the VI behave properly and append the image to the report? or does it fail to send the image and not crash the program?
If you could include any steps necessary to reproduce the error using a simple example I may be able to track down the source of the error.
Thanks Nick for the response.
Here is the portion of code that I believe is causing the issue.
The key word here is (believe). I say this because this error started occurring only after I added this code to my application. However this portion of code does not need to execute for the error to take place. In fact the vi this code is in does not have to be loaded in memory. The “NI_Word.lvclass” is in memory when the error occurs because the class file is listed in the always included of the build. As far as any NI library files are concerned this is the only item I have included in the always include list. (Could this be part of the problem?)
In the past I was just using the quick print function for this particular report. I will mention that for other reports in this application I am using files from the NI_InernetTK_Core_Vis.lib. These files do not appear to be much more than text editors so I don’t believe they are contributing to the error.
When functioning as a VI in the development environment I have not experienced a crash. However the real communication to the NI Chassis and the serial communication to other instruments is not really taking place on the development machine.
The stand along application behaves similar on both the development machine and when deployed to the test stand. It will generate the desired report file when called unless the error occurs which causes the application to be shut down.
Last Friday on the test stand the application crashed six times in one shift. I rolled the test stand back to the previous version this week and have had no crashes on the system. I also began development a version that will send the data to an Excel template file rather than capturing the image of the front panel. I am concerned that the same issue may exist as this will require adding the Excel Class to the executable. It would have been nice if the 10 minute solution could have worked by changing the option from quick print to Word and adding the functions to save the file for read only. I would still like for the Word version to work and appreciate you looking into this.
This is strange behavior indeed. I am unable to reproduce the error on my end. I have successfully run an executable that uses the method you described to capture an image of the front panel.
However, there is no need to add the NI_Word.lvclass to the always included list. If you are using VIs from this library in your project, they will be automatically included for you by LabVIEW. Try removing this from the always included list and see if that helps.
I sense that there is something else in your code that may be causing the crash but only when you have it implemented with the front panel capture. As you mentioned, a better solution to the problem would be to capture the data and write it to file. If you are concerned that the error lies within the report generation toolkit when used with your program. You could write to one of the other various file types that LabVIEW allows. Even a simple tabulated text file would give you the ability to write data without using the report generation toolkit, but allow you to open it in excel for better viewing/analysis.
Thanks for your help.
According to this link, I must always include the class file mentioned. Without doing this the stand along does not function.
The specific report I am working on must have the look of the document that is submitted to agency. This problem is not associated with the capture front panel image. I now have the same error using Excel instead of Word. I have an excel spreadsheet that is useds as a template. No longer am I capturing the image. In fact the data does not populate a vi front panel. The data is placed in the spreadsheet by cell names. I spent the last several days building this application testing and re-testing each feature such as the print, view document, create new report, load existing report. Performed all the error capturing I could think of. No problems. Compile it into a stand alone application. Build a report, crash within 10 min of starting the application.
It must be somthing with the build of the executable. I am sure the tools work or they would not be included with LabVIEW.
By the way, recreated same application except using labview front panel and quick print to printer. Just in case the error was somewhere else in the application and not in the report features of excel or word. This app has not crashed. However I do not get the required file with this method.