CppStars / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Intermittent Unhandled Exception when generating reports in Icarus #682

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Run any group of tests

What is the expected output? What do you see instead?

Report should be generated, not an exception.

What version of the product are you using? On what operating system?

3.2 build 505 / Windows 7 32 bit

Please provide any additional information below.

Looks like it's incorrectly attempting to use the Program Files directory. 
Windows Vista / 7 requires elevation to write to Program Files subdirectories.

System.UnauthorizedAccessException: Access to the path 'C:\Program 
Files\Gallio\bin\Reports' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj)
   at System.IO.Directory.CreateDirectory(String path)
   at Gallio.Runner.Reports.FileSystemReportContainer.OpenWrite(String path, String contentType, Encoding encoding) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Runner\Reports\FileSystemReportContainer.cs:line 71
   at Gallio.Runner.Reports.DefaultReportWriter.SaveReport(AttachmentContentDisposition attachmentContentDisposition, IProgressMonitor progressMonitor) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Runner\Reports\DefaultReportWriter.cs:line 171
   at Gallio.Reports.XmlReportFormatter.Format(IReportWriter reportWriter, ReportFormatterOptions options, IProgressMonitor progressMonitor)
   at Gallio.Runner.Reports.DefaultReportManager.Format(IReportWriter reportWriter, String formatterName, ReportFormatterOptions formatterOptions, IProgressMonitor progressMonitor) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Runner\Reports\DefaultReportManager.cs:line 82
   at Gallio.Icarus.Services.ReportService.SaveReportAs(Report report, String fileName, String format, IProgressMonitor progressMonitor)
   at Gallio.Icarus.Controllers.ReportController.GenerateReport(Report report, ReportOptions reportOptions, IProgressMonitor progressMonitor)
   at Gallio.Icarus.Commands.GenerateReportCommand.<>c__DisplayClass1.<Execute>b__0(Report report)
   at Gallio.Common.Concurrency.LockBox`1.Read(ReadAction`1 action) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Concurrency\LockBox.cs:line 61
   at Gallio.Icarus.Controllers.TestController.ReadReport(ReadAction`1 action)
   at Gallio.Icarus.Commands.GenerateReportCommand.Execute(IProgressMonitor progressMonitor)
   at Gallio.Icarus.Commands.RunTestsCommand.GenerateReport(IProgressMonitor progressMonitor)
   at Gallio.Icarus.Commands.RunTestsCommand.Execute(IProgressMonitor progressMonitor)
   at Gallio.UI.ProgressMonitoring.TaskRunner.<>c__DisplayClass2.<BeginNextTask>b__0()
Reported by: 
UnhandledExceptionPolicy
   at Gallio.UI.Common.Policies.UnhandledExceptionPolicy.Report(String message, Exception unhandledException)
   at Gallio.UI.ProgressMonitoring.TaskRunner.ProcessFailure(Exception exception, String queueId)
   at Gallio.UI.ProgressMonitoring.TaskRunner.TaskTerminated(Task workerTask, String queueId)
   at Gallio.UI.ProgressMonitoring.TaskRunner.<>c__DisplayClass2.<BeginNextTask>b__1(Object , TaskEventArgs )
   at Gallio.Common.Policies.EventHandlerPolicy.SafeInvoke[T](EventHandler`1 handlerChain, Object sender, T e) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Policies\EventHandlerPolicy.cs:line 69
   at Gallio.Common.Concurrency.Task.Notify(EventHandler`1& chain) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Concurrency\Task.cs:line 355
   at Gallio.Common.Concurrency.Task.OnTerminated() in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Concurrency\Task.cs:line 343
   at Gallio.Common.Concurrency.Task.NotifyTerminated(TaskResult result) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Concurrency\Task.cs:line 305
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Original issue reported on code.google.com by gmcdonald@vividas.com on 12 Jul 2010 at 1:58

GoogleCodeExporter commented 8 years ago
Project -> Properties had the reports dir set to "C:\Program 
Files\Gallio\bin\Reports" for some reason. Considering this is a read-only 
property, I'm not sure how Icarus managed to set it to the above.

Clicking "New Project" changes this value to 
"C:\Users\Username\AppData\Roaming\Gallio\Icarus\Reports"

Original comment by gmcdonald@vividas.com on 12 Jul 2010 at 2:09