Reports failing with 'Could not find file 'C:\Windows\TEMP\'
Posted: Thu Dec 12, 2013 4:47 am
Hi,
Problem:
==========
Stimulsoft report failing with error 'System.IO.FileNotFoundException: Could not find file 'C:\Windows\TEMP\ll1afkkj.dll' where \ll1afkkj.dll name changes every time failure occurs.
Stack trace:
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, ReportLauncher.<startReport>b__d Report failed System.IO.FileNotFoundException: Could not find file 'C:\Windows\TEMP\ll1afkkj.dll'.
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, File name: 'C:\Windows\TEMP\ll1afkkj.dll'
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.File.ReadAllBytes(String path)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Stimulsoft.Base.StiCompiler.Compile(String textToCompile, String outputAssembly, LanguageType languageType, StiOutputType outputType, String[] referencedAssemblies, List`1 resources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Stimulsoft.Report.StiReport.Compile()
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Cardax.FT.StiUtil.<>c__DisplayClass7.<ToStiReport>b__4(DataTable table)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.Reactive.Linq.Observable.SelectObservable`2.Observer.Next(TSource value)
Brief description of problem
===============================
Our system/software runs as a service under Local System account. Via our system user can run a report and save the report to a pdf file. The report is generated and exported via stimulsoft functions.
Our system also has a scheduling feature where a user can schedule a report which is saved to a pdf file (generated via stimulsoft). This works great without any problem
If we schedule a report to run frequently say every 2 minutes then all report runs fine for 2-3 days and generates pdf files, but after after 2-3 days suddenly reports start failing with above mentioned error.
Once the system is in this state then user cannot run a new report - report fails with above mentioned error.
+ Reports are pretty small max 2 to 5 pages, ~200kb
+ system generates approximately 2000 to 2400 reports (pdf files) in 2-3 days before entering into the problem state, after that all reports start failing. Only way to recover is to restart our system which is restarting our service. We don't know what triggers the problem.
+ We don't see any high memory usage or CPU spikes - system is absolutely fine. Rest of our software works good.
+ Stimulsoft.Report.Wpf.dll, Stimulsoft.Report.dll and Stimulsoft.Base.dll version 2013.2.1700.0
+ OS: Windows 7 x86 or x64, .net 4
+ We use the following functions to generate report and export it to pdf:
// Get STI template
StiLibrary.Initialise();
var report = new StiReport();
report.LoadReportFromResource(System.Reflection.Assembly.GetExecutingAssembly(), stiReportTemplate); //stiReportTemplate is our MRT file
// Initialise the report with the report data and render it
report.ReportName = metadata.ReportName;
report.ReportAlias = metadata.ReportName;
report.RegData(table.DataSet); //table is System.Data.DataTable
report.Dictionary.Synchronize();
report.Compile();
report.CompiledReport.Rendering += (s, e) => { //handle if report is cancelled or stopped externally }
report.RenderWithWpf(false);
//save report to PDF files
var stream = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite);
report.ExportDocument(StiExportFormat.Pdf, stream);
stream.Dispose();
//Cleanup
report.Dictionary.DataStore.Clear();
report.CompiledReport.DataStore.Clear();
report.Dispose();
+Attached a screenshot of procmon logs.
Please let me know if you need more information.
Any advice would be appreciated.
Thanks
Problem:
==========
Stimulsoft report failing with error 'System.IO.FileNotFoundException: Could not find file 'C:\Windows\TEMP\ll1afkkj.dll' where \ll1afkkj.dll name changes every time failure occurs.
Stack trace:
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, ReportLauncher.<startReport>b__d Report failed System.IO.FileNotFoundException: Could not find file 'C:\Windows\TEMP\ll1afkkj.dll'.
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, File name: 'C:\Windows\TEMP\ll1afkkj.dll'
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.IO.File.ReadAllBytes(String path)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Stimulsoft.Base.StiCompiler.Compile(String textToCompile, String outputAssembly, LanguageType languageType, StiOutputType outputType, String[] referencedAssemblies, List`1 resources)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Stimulsoft.Report.StiReport.Compile()
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at Cardax.FT.StiUtil.<>c__DisplayClass7.<ToStiReport>b__4(DataTable table)
2013-12-13 09:35:00:784, CCNTSad[0934:0888], WARN, at System.Reactive.Linq.Observable.SelectObservable`2.Observer.Next(TSource value)
Brief description of problem
===============================
Our system/software runs as a service under Local System account. Via our system user can run a report and save the report to a pdf file. The report is generated and exported via stimulsoft functions.
Our system also has a scheduling feature where a user can schedule a report which is saved to a pdf file (generated via stimulsoft). This works great without any problem
If we schedule a report to run frequently say every 2 minutes then all report runs fine for 2-3 days and generates pdf files, but after after 2-3 days suddenly reports start failing with above mentioned error.
Once the system is in this state then user cannot run a new report - report fails with above mentioned error.
+ Reports are pretty small max 2 to 5 pages, ~200kb
+ system generates approximately 2000 to 2400 reports (pdf files) in 2-3 days before entering into the problem state, after that all reports start failing. Only way to recover is to restart our system which is restarting our service. We don't know what triggers the problem.
+ We don't see any high memory usage or CPU spikes - system is absolutely fine. Rest of our software works good.
+ Stimulsoft.Report.Wpf.dll, Stimulsoft.Report.dll and Stimulsoft.Base.dll version 2013.2.1700.0
+ OS: Windows 7 x86 or x64, .net 4
+ We use the following functions to generate report and export it to pdf:
// Get STI template
StiLibrary.Initialise();
var report = new StiReport();
report.LoadReportFromResource(System.Reflection.Assembly.GetExecutingAssembly(), stiReportTemplate); //stiReportTemplate is our MRT file
// Initialise the report with the report data and render it
report.ReportName = metadata.ReportName;
report.ReportAlias = metadata.ReportName;
report.RegData(table.DataSet); //table is System.Data.DataTable
report.Dictionary.Synchronize();
report.Compile();
report.CompiledReport.Rendering += (s, e) => { //handle if report is cancelled or stopped externally }
report.RenderWithWpf(false);
//save report to PDF files
var stream = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite);
report.ExportDocument(StiExportFormat.Pdf, stream);
stream.Dispose();
//Cleanup
report.Dictionary.DataStore.Clear();
report.CompiledReport.DataStore.Clear();
report.Dispose();
+Attached a screenshot of procmon logs.
Please let me know if you need more information.
Any advice would be appreciated.
Thanks