I have quite some experience in debugging memory dumps, so now that I have a C# problem, I try to solve this using memory dump analysis too, but this seems not to work:
When I use my user-interactive application, I get a System.ArgumentNullException: Value cannot be null. Parameter name: name.
When I see this in my Visual Studio environment, or when I debug the memory dump I've taken at that moment, these are the first lines of the call stack:
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source,
Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
...
However, when I click Copy Details, I see quite a lot more, as you can see:
at Application.Client.Desktop.Controls.UserAuthentication.OnUserLogOn(User user)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback,
Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source,
Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
...
So, the problem is somewhere in the OnUserLogon() function, who is working with the user input variable, and I can only imagine how interesting the knowledge of this variable might be :-)
But as my call stack does not go that deep, I don't have access to that variable.
One thing which might be important: while trying to debug, I see "Symbol loading skipped", and I can confirm that I have two symbol sources:
Microsoft Symbol Servers
Some company-owned website
In order to see a full C# call stack, do I need to add more symbol sources or is there any other thing I should do?
For your information, when debugging the memory dump, I have already tried Debug with Managed Only and Debug with Mixed, none of those possibilities solved my issue.
Thanks in advance
Edit after first comment
Apparently there might be some unexpectedly interesting information in the call stack, so hereby I show the entire call stack as shown in Visual Studio Call Stack window:
> WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Unknown
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Unknown
MyApplication.Desktop.exe!MyApplication.Client.Desktop.App.Main() Unknown
Does this give any more information? (Like the thread where the actual problem happens? Please be aware that quite some information has been optimised away and I can't re-compile the application: I'm only allowed to work on a DLL, being used by that application)
Edit2: added more information
While doing the test a new time, I have seen following call stack in a so-called Worker Thread:
mscorlib.dll!System.Diagnostics.StackFrameHelper.InitializeSourceInfo(int iSkip, bool fNeedFileInfo, System.Exception exception) Line 109 C#
mscorlib.dll!System.Diagnostics.StackTrace.CaptureStackTrace(int iSkip, bool fNeedFileInfo, System.Threading.Thread targetThread, System.Exception e) Line 523 C#
mscorlib.dll!System.Diagnostics.StackTrace.StackTrace(System.Exception e, bool fNeedFileInfo) Line 407 C#
> mscorlib.dll!System.Environment.GetStackTrace(System.Exception e, bool needFileInfo) Line 1264 C#
mscorlib.dll!System.Exception.GetStackTrace(bool needFileInfo) Line 354 C#
mscorlib.dll!System.Exception.ToString(bool needFileLineInfo, bool needMessage) Line 450 C#
NLog.dll!NLog.LayoutRenderers.ExceptionLayoutRenderer.AppendToString(System.Text.StringBuilder sb, System.Exception ex) Unknown
NLog.dll!NLog.LayoutRenderers.ExceptionLayoutRenderer.AppendException(System.Exception currentException, System.Collections.Generic.IEnumerable<NLog.Config.ExceptionRenderingFormat> renderFormats, System.Text.StringBuilder builder) Unknown
NLog.dll!NLog.LayoutRenderers.ExceptionLayoutRenderer.Append(System.Text.StringBuilder builder, NLog.LogEventInfo logEvent) Unknown
NLog.dll!NLog.LayoutRenderers.LayoutRenderer.RenderAppendBuilder(NLog.LogEventInfo logEvent, System.Text.StringBuilder builder) Unknown
NLog.dll!NLog.Layouts.SimpleLayout.RenderAllRenderers(NLog.LogEventInfo logEvent, System.Text.StringBuilder target) Unknown
NLog.dll!NLog.Layouts.Layout.RenderAllocateBuilder(NLog.LogEventInfo logEvent, System.Text.StringBuilder reusableBuilder) Unknown
NLog.dll!NLog.Layouts.Layout.Render(NLog.LogEventInfo logEvent) Unknown
NLog.dll!NLog.LayoutRenderers.Wrappers.OnExceptionLayoutRendererWrapper.RenderInner(NLog.LogEventInfo logEvent) Unknown
NLog.dll!NLog.LayoutRenderers.Wrappers.WrapperLayoutRendererBase.Append(System.Text.StringBuilder builder, NLog.LogEventInfo logEvent) Unknown
NLog.dll!NLog.LayoutRenderers.LayoutRenderer.RenderAppendBuilder(NLog.LogEventInfo logEvent, System.Text.StringBuilder builder) Unknown
NLog.dll!NLog.Layouts.SimpleLayout.RenderAllRenderers(NLog.LogEventInfo logEvent, System.Text.StringBuilder target) Unknown
NLog.dll!NLog.Layouts.Layout.RenderAppendBuilder(NLog.LogEventInfo logEvent, System.Text.StringBuilder target, bool cacheLayoutResult) Unknown
NLog.dll!NLog.Targets.FileTarget.RenderFormattedMessageToStream(NLog.LogEventInfo logEvent, System.Text.StringBuilder formatBuilder, char[] transformBuffer, System.IO.MemoryStream streamTarget) Unknown
NLog.dll!NLog.Targets.FileTarget.Write(System.Collections.Generic.IList<NLog.Common.AsyncLogEventInfo> logEvents) Unknown
NLog.dll!NLog.Targets.Target.WriteAsyncThreadSafe(System.Collections.Generic.IList<NLog.Common.AsyncLogEventInfo> logEvents) Unknown
NLog.dll!NLog.Targets.Target.WriteAsyncLogEvents(System.Collections.Generic.IList<NLog.Common.AsyncLogEventInfo> logEvents) Unknown
NLog.dll!NLog.Targets.Wrappers.AsyncTargetWrapper.WriteEventsInQueue(int batchSize, string reason) Unknown
NLog.dll!NLog.Targets.Wrappers.AsyncTargetWrapper.ProcessPendingEvents(object state) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
mscorlib.dll!System.Threading.TimerQueueTimer.CallCallback() Line 713 C#
mscorlib.dll!System.Threading.TimerQueueTimer.Fire() Line 670 C#
mscorlib.dll!System.Threading.TimerQueue.FireNextTimers() Line 425 C#
Unfortunately almost every object is optimised away, so I can't give more information.
Related
we have a Kiosk Application and print using the Microsoft.PointOfService SDK. In our development environment everything works.
EDIT
The following specifications:
Windows 10 Enterprise LTSC 1809
.NET 4.8
Pos for .NET 1.14.1
Printer: CUSTOM VKP80III
We're trying to print a simple text, nothing fancy. Like I said the same setup worked on the development machine. Even on the machine where it's not working now it worked but suddenly stopped working. We are considering deinstalling POS and OPOS driver and than try again.
But on the customer machine (same printer/SDK/application) we get the following Error:
UPOSDevice | Method TransactionPrint threw an exception. Service Object specific error. | Microsoft.PointOfService.PosControlException: Method TransactionPrint threw an exception. Service Object specific error.
at Microsoft.PointOfService.Legacy.LegacyProxy.ThrowLegacyMethodException(String methodName, Int32 ResultCode, Exception e)
at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethod(String methodName, Object[]& parameters, Boolean[] byRef)
at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethodAndCheckImpl(String methodName, Object[]& parameters, Boolean[] byRef)
at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethodAndCheck(String methodName, Object param1, Object param2)
at Microsoft.PointOfService.Legacy.LegacyPosPrinter.TransactionPrint(PrinterStation station, PrinterTransactionControl control)
at UPOSPosPrinter.EndTransaction(PrinterStation station)
ErrorCode: 65535
ErrorCodeExtended: -1
The EndTransaction-Method looks like this:
public void EndTransaction(PrinterStation station)
{
try
{
_device.TransactionPrint((UPOSPrinterStation)station, PrinterTransactionControl.Normal);
}
catch (Exception ex)
{
_logger.LogError(ex, "CapTransactin: {CapTransaction} | ErrorMessage: {ErrorMessage}", _device.CapTransaction, ex.Message);
throw;
}
}
I couldn't even find a defintion for the ErrorCode: 65535. Does somebody know what the problem is or at least what the ErrorCode stands for?
The log from POsforNET:
[6/13/2022 1:47:47 PM 1 ERROR PosException] Microsoft.PointOfService.PosControlException: Method TransactionPrint threw an exception. Service Object specific error.
ErrorCode: Failure
ErrorCodeExtended: 0
Stack trace: at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Microsoft.PointOfService.PosException.GetExceptionText(Exception e)
at Microsoft.PointOfService.PosException.LogError()
at Microsoft.PointOfService.PosControlException..ctor(String message, ErrorCode errorCode, Int32 errorCodeExtended)
at Microsoft.PointOfService.Legacy.LegacyProxy.ThrowLegacyMethodException(String methodName, Int32 ResultCode, Exception e)
at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethod(String methodName, Object[]& parameters, Boolean[] byRef)
at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethodAndCheckImpl(String methodName, Object[]& parameters, Boolean[] byRef)
at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethodAndCheck(String methodName, Object param1, Object param2)
at Microsoft.PointOfService.Legacy.LegacyPosPrinter.TransactionPrint(PrinterStation station, PrinterTransactionControl control)
at Test.Devices.UPOSPosPrinter.EndTransaction(PrinterStation station)
at Test.Devices.IPosPrinterExtension.PrintReceipt(IPosPrinter printer, CompositeElement template, ILogger logger)
at Test.Ticket.Controllers.PrinterController.<Print>d__6`1.MoveNext()
at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Test.Ticket.Controllers.PrinterController.Print[TBonInfo](TBonInfo bonInfo, PrintLayoutType layoutType, String repeatAction, Nullable`1 layoutId)
at Test.Ticket.Controllers.PrinterController.PrintReceipt(Nullable`1 layoutId)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Test.Core.AppCommandPipeline.<>c__DisplayClass11_1.<ResolveAppCommand>b__0(RequestContext context)
at Test.Core.AppCommandPipeline.<<Build>b__16_0>d.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Test.Core.AppCommandPipeline.<Build>b__16_0(RequestContext context)
at Test.Core.EventEmitterHandler.Invoke(RequestContext context)
at Test.Core.AppCommandPipelineMiddleware.<>c__DisplayClass3_1`1.<Add>b__1(RequestContext context)
at Test.Ticket.Middleware.ExceptionsHandler.<Invoke>d__3.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Test.Ticket.Middleware.ExceptionsHandler.Invoke(RequestContext context)
at Test.Core.AppCommandPipelineMiddleware.<>c__DisplayClass3_1`1.<Add>b__1(RequestContext context)
at Test.Ticket.Middleware.AvailabilityUpdateHandler.Invoke(RequestContext context)
at Test.Core.AppCommandPipelineMiddleware.<>c__DisplayClass3_1`1.<Add>b__1(RequestContext context)
at Test.Ticket.Middleware.PermissionHandler.Invoke(RequestContext context)
at Test.Core.AppCommandPipelineMiddleware.<>c__DisplayClass3_1`1.<Add>b__1(RequestContext context)
at Test.Ticket.Middleware.AuthorizationHandler.Invoke(RequestContext context)
at Test.Core.AppCommandPipelineMiddleware.<>c__DisplayClass3_1`1.<Add>b__1(RequestContext context)
at Test.Ticket.Middleware.TimeOutHandler.Invoke(RequestContext context)
at Test.Core.AppCommandPipelineMiddleware.<>c__DisplayClass3_1`1.<Add>b__1(RequestContext context)
at Test.Core.AppCommandPipeline.ExecuteRequestContext[T](RequestContext requestContext, T& executionResult)
at Test.Core.AppCommandPipeline.Execute[T](AppCommand appCommand, T& executionResult, Object parameters)
at CallSite.Target(Closure , CallSite , AppCommandPipeline , AppCommand , Object& , Object )
at Test.Core.AppCommandPipeline.Execute(AppCommand appCommand, Object parameters)
at Test.Core.AppCommandPipeline.Execute(String appCommandString, Object parameters)
at Test.Core.AppEngine.ExecuteCommand(String appCommand)
at Test.Core.BaseController.<Execute>d__17.MoveNext()
at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Test.Core.BaseController.Execute(String appCommand)
at Test.Ticket.Controllers.PaymentController.<Pay>d__11.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(Object stateMachine)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.<>c.<.cctor>b__8_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Test.Ticket.Desktop.App.Main()
The specification ErrorCode is a value in the range 0 or 101-115.
If the other value(65535) is notified, it is considered that the vendor who created the service object has defined some unique error and notified it.
ErrorCode Enumeration (POS for .NET v1.12 SDK Documentation)
Similarly, the value of ErrorCodeExtended will be vendor own definition.
Please refer to the include file on one of these sites for values.
CommonControlOnjects Current Version
kunif/OPOS-CCO
Please add the vendor and device model that creates the device and service object, as noted in the comments.
If anyone is using the same model from the same vendor, you may be able to share information.
However, you probably need to contact the vendor's support desk for more information.
According to the added vendor and model information:
The vendor page states that OPOS, OPOS.NET, and JavaPOS Driver are supported, but the list of downloads only had JavaPOS.
VKP80III
The problem was that we called
_device.TransactionPrint((UPOSPrinterStation)station, PrinterTransactionControl.Normal);
twice in a row. So we implemented a bool property to check if the printer is in "TransactionMode" or not and only call the TransactionPrint if this is true.
The actual problem why the printer didn't print was that the printer-driver didn't work. We had to reinstall the printer-driver. We assume a windows update was the culprit.
Another strange thing is that in other tests the same mechanism (calling the method twice) didn't produce an error. Very strange...
ok I have a WPF program that works on one computer but not the another. on the other one, I get this MethodAccessException was unhandled
it is when the problem calls NotifyPropertyChanged():
public abstract class NotifyChanged: INotifyPropertyChanged {
#region INotifyPropertyChanged
/// <summary>
/// PropertyChanged can be triggered whenever a Property changes value.
/// It is also available for classes which inherit from
MachineComponent.
/// </summary>
public virtual event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// NotifyPropertyChanged can be called explicitly, by sending the name
of the property as a string,
/// or implicitly, by calling it without parameters from the Property
that changes.
/// </summary>
/// <param name="info"></param>
[System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design",
"CA1026:DefaultParametersShouldNotBeUsed" )]
protected void NotifyPropertyChanged( [CallerMemberName] string info = "none passed" ) {
if ( PropertyChanged != null ) {
PropertyChanged( this, new PropertyChangedEventArgs( info ) );
}
}
#endregion
anyone know why ?
I am told this code come from a Microsoft site
Update.. I am adding the full error message. now this is a run time error message
full error message:
System.MethodAccessException was unhandled
HResult=-2146233072
Message=Attempt by method
'Moxtek.XRF.Core.LocationViewModel.set_LocationName(System.String)' to
access method
'Moxtek.Common.Abstract.NotifyChanged.NotifyPropertyChanged(System.String)'
failed.
Source=Moxtek.XRF.Core
StackTrace:
at Moxtek.XRF.Core.LocationViewModel.set_LocationName(String value) in C:\Users\lolsen\Source\XRF\Moxtek.XRF.Core\ViewModels\MeasurementRecipeViewModels\LocationViewModel.cs:line 41
at Moxtek.XRF.Core.LocationViewModel..ctor(XrfLocationSet location, LocationItemViewModel locationItem, MeasurementRecipeItemViewModel recipeItem, IDataObject`1 locationData, IServiceLocator services) in C:\Users\lolsen\Source\XRF\Moxtek.XRF.Core\ViewModels\MeasurementRecipeViewModels\LocationViewModel.cs:line 12
at Moxtek.XRF.Core.LocationItemViewModel.GetItems() in C:\Users\lolsen\Source\XRF\Moxtek.XRF.Core\ViewModels\MeasurementRecipeViewModels\LocationItemViewModel.cs:line 36
at Moxtek.XRF.Core.LocationItemViewModel..ctor(IDataObject`1 locationData, MeasurementRecipeItemViewModel recipeItem, IServiceLocator services) in C:\Users\lolsen\Source\XRF\Moxtek.XRF.Core\ViewModels\MeasurementRecipeViewModels\LocationItemViewModel.cs:line 14
at Moxtek.XRF.Core.XrfViewModel..ctor(ChartingViewModel chart, IServiceLocator services) in C:\Users\lolsen\Source\XRF\Moxtek.XRF.Core\ViewModels\XrfViewModel.cs:line 29
at Moxtek.XRF.WPF.App.OnStartup(StartupEventArgs e) in C:\Users\lolsen\Source\XRF\Moxtek.XRF.WPF\App.xaml.cs:line 46
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Moxtek.XRF.WPF.App.Main()
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
App.Current.Dispatcher.Invoke((Action)(() =>
{
myCollection.Add(measurement);
}));
I add a Measurement object to a ObservableCollection<Measurement> and get "A first chance exception of type 'System.Reflection.TargetException' occurred in mscorlib.dll
Additional information: Object does not match target type."
I don't understand why this is getting thrown since they both are the same type.
stack trace:
mscorlib.dll!System.Reflection.RuntimeMethodInfo.CheckConsistency(object target) Unknown
System.dll!System.SecurityUtils.MethodInfoInvoke(System.Reflection.MethodInfo method, object target, object[] args) Unknown
System.dll!System.ComponentModel.ReflectPropertyDescriptor.GetValue(object component) Unknown
DevExpress.Data.v14.2.dll!DevExpress.Data.Browsing.RelatedDataBrowser.RetrieveDataSource() Unknown
DevExpress.Data.v14.2.dll!DevExpress.Data.Browsing.DataBrowser.DataSource.get() Unknown
DevExpress.Data.v14.2.dll!DevExpress.Data.Browsing.DataBrowser.Current.get() Unknown
DevExpress.Data.v14.2.dll!DevExpress.Data.Browsing.RelatedDataBrowser.RetrieveDataSource() Unknown
DevExpress.Data.v14.2.dll!DevExpress.Data.Browsing.DataBrowser.DataSource.get() Unknown
DevExpress.Data.v14.2.dll!DevExpress.Data.Browsing.DataBrowser.Current.get() Unknown
DevExpress.Charts.v14.2.Core.dll!DevExpress.Charts.Native.SeriesBindingProcedure.CreateBindingPoints() Unknown
DevExpress.Xpf.Charts.v14.2.dll!DevExpress.Xpf.Charts.Series.UpdateSeriesBinding(object dataSource) Unknown
DevExpress.Xpf.Charts.v14.2.dll!DevExpress.Xpf.Charts.Diagram.UpdateBinding() Unknown
DevExpress.Xpf.Charts.v14.2.dll!DevExpress.Xpf.Charts.ChartControl..ctor.AnonymousMethod__c() Unknown
DevExpress.Xpf.Charts.v14.2.dll!DevExpress.Xpf.Charts.Native.BindingBehavior.DataSourceChanged(object sender, System.EventArgs e) Unknown
System.dll!System.Collections.ObjectModel.ObservableCollection<Data.Measurement>.OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) Unknown
System.dll!System.Collections.ObjectModel.ObservableCollection<System.__Canon>.InsertItem(int index, System.__Canon item) Unknown
mscorlib.dll!System.Collections.ObjectModel.Collection<Data.Measurement>.Add(Data.Measurement item) Unknown
> MyApp.exe!MyApp.Data.ViewModels.CompleteMeasurementsViewModel.MeasurementAddedFromDevice.AnonymousMethod__29() Line 293 C#
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeDelegateCore() Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() Unknown
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Unknown
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) Unknown
PresentationFramework.dll!System.Windows.Application.Run() Unknown
MyApp.exe!App.Main() C#
[Native to Managed Transition]
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) Unknown
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown
crashes on consistency check? The weird part is this doesn't happen alot. Please shed some light on this
EDIT:
If I keep hitting continue I get this exception:
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Property accessor 'Vehicle' on object 'Location' threw the following exception:'Object does not match target type.'
The scenario in this post seems to be similar to mine... http://www.thecodingforums.com/threads/gridview-object-does-not-match-target-type-error-during-binding-collection-of-different-type-objec.121226/
When debugging my application I get the following exception.
I know it has to do with an update method for an INotify property, but how to find out exactly what's going wrong. I can't get a decent stack call.
The complete exception info is:
System.Windows.Markup.XamlParseException was unhandled
HResult=-2146233087
Message='The invocation of the constructor on type 'PcgTools.MainWindow' that matches the specified binding constraints threw an exception.' Line number '4' and line position '9'.
Source=PresentationFramework
LineNumber=4
LinePosition=9
StackTrace:
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
at System.Windows.Application.DoStartup()
at System.Windows.Application.<.ctor>b__1(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at PcgTools.App.Main() in c:\PcgTools\nodes\KorgKronosTools\obj\Debug\App.g.cs:line 0
InnerException: System.ArgumentOutOfRangeException
HResult=-2146233086
Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source=mscorlib
ParamName=index
StackTrace:
at System.Collections.Generic.List`1.get_Item(Int32 index)
at PcgTools.Model.Common.Synth.Timbre.get_UsedProgram() in c:\PcgTools\nodes\KorgKronosTools\Model\Common\Synth\Timbre.cs:line 137
at PcgTools.Model.Common.Synth.Timbre.RefillColumns() in c:\PcgTools\nodes\KorgKronosTools\Model\Common\Synth\Timbre.cs:line 612
at PcgTools.Model.Common.Synth.Timbre.OnPcgRootPropertyChanged(Object sender, PropertyChangedEventArgs e) in c:\PcgTools\nodes\KorgKronosTools\Model\Common\Synth\Timbre.cs:line 574
at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
at Common.Mvvm.ObservableObject.OnPropertyChanged(String propertyName, Boolean verifyPropertyName) in c:\PcgTools\nodes\Common\Mvvm\ObservableObject.cs:line 47
at PcgTools.Model.Common.Synth.Memory.set_ReadingFinished(Boolean value) in c:\PcgTools\nodes\KorgKronosTools\Model\Common\Synth\Memory.cs:line 74
at PcgTools.Model.Common.File.KorgFileReader.Read(String fileName) in c:\PcgTools\nodes\KorgKronosTools\Model\Common\File\KorgFileReader.cs:line 116
at PcgTools.ViewModels.MainViewModel.ReadAndShowFile(String fileName, Boolean checkAutoLoadMasterFileSetting) in c:\PcgTools\nodes\KorgKronosTools\ViewModels\MainViewModel.cs:line 367
at PcgTools.ViewModels.MainViewModel.HandleAppArguments() in c:\PcgTools\nodes\KorgKronosTools\ViewModels\MainViewModel.cs:line 1030
at PcgTools.MainWindow..ctor() in c:\PcgTools\nodes\KorgKronosTools\MainWindow.xaml.cs:line 221
InnerException:
This kind of message apeears when XAML initialization triggers erroneous initialization code (at line 4 in MainWindow.xaml file). The real cause is described in inner exception. It indicates that in Timbre.cs:line 137 a list was accessed with an invalid index.
Since, it shows line number for that file, I assume you have its source code, at least in form of a .pdb file. Than you can set a break-point in there to see what's going on.
An excellent tool for tracking such unclear exceptions is IntelliTrace, but it's only available for VS Ultimate.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Best way to convert pdf files to tiff files
I'm looking for a free library that allows me to convert a PDF document to a (or several) TIFF images. If Tiff is not possible it can also be other images formats.
I read about a way to do this with Ghostscript, but I couldn't find a good explanation. So any hints how to do that?
EDIT:
According to the comment I use this command to execute:
Process.Start("gswin32c", "-dNOPAUSE -q -sDEVICE=tiffg4 -dBATCH -sOutputFile=" + fileName + ".tif " + fileName + ".pdf");
I see that GhostScript is executed in the command line, But I always get an error:
System.ArgumentException was unhandled
Message=The contact with id '16778241' does not currently exist.
Parameter name: contact
Source=Microsoft.Surface.Presentation
ParamName=contact
StackTrace:
at Microsoft.Surface.Presentation.Contacts.CheckIfCanBeCapturedOrReleased(Contact contact)
at Microsoft.Surface.Presentation.Contacts.CaptureContact(Contact contact, IInputElement element)
at Microsoft.Surface.Presentation.Controls.Primitives.ButtonBaseAdapter.OnContactDown(ContactEventArgs e)
at Microsoft.Surface.Presentation.Controls.SurfaceButton.OnContactDown(ContactEventArgs e)
at Microsoft.Surface.Presentation.Controls.SurfaceButton.Microsoft.Surface.Presentation.Controls.IContactEventThunk.OnContactDownThunk(ContactEventArgs e)
at Microsoft.Surface.Presentation.Controls.InputElementAdapter.OnContactDownThunk(Object sender, ContactEventArgs e)
at Microsoft.Surface.Presentation.ContactEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at Microsoft.Surface.Presentation.InputSurfaceProviderBase.DoProcessInput(Object obj)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Prototype_Concept_2.App.Main() in C:\Users\Roflcoptr\Documents\Visual Studio 2008\Projects\Prototype_Concept_2\Prototype_Concept_2\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Why this?
You cannot use the Process.Start(string filename) overload to supply command line parameters. From MSDN:
This overload does not allow command-line arguments for the process. If you need to specify one or more command-line arguments for the process, use the Process.Start(ProcessStartInfo) or Process.Start(String, String) overloads.
http://msdn.microsoft.com/en-us/library/53ezey2s.aspx
So try the following instead:
Process.Start(#"C:\Users\Roflcoptr\Documents\Visual Studio 2008\Projects\Prototype_Concept_2\Prototype_Concept_2\bin\Debug\gswin32c", "-dNOPAUSE -q -g300x300 -sDEVICE=tiffg4 -dBATCH -sOutputFile=Report_22_02_2011_21_18.tif Report_22_02_2011_21_18.pdf");
Can you post up the Process.Start() line of code?
I am guessing the error of file not found is coming from the path being incorrect. That being missing the quotes. Because of the space in visual and studio it would assume that "C:\Users\Roflcoptr\Documents\Visual" is the directory.
Process.Start(#"\"C:\Users\Roflcoptr\Documents\Visual Studio 2008\Projects\Prototype_Concept_2\Prototype_Concept_2\bin\Debug\gswin32c\" -dNOPAUSE -q -g300x300 -sDEVICE=tiffg4 -dBATCH -sOutputFile=Report_22_02_2011_21_18.tif Report_22_02_2011_21_18.pdf");
The best way to test this, maybe to first fire up a command prompt and see if you can run that command line successfully before using it in Process.Start() method call.