Cause of "Exception type:System.Reflection.TargetParameterCountException"

SmartClient has encountered a problem and will be closed.

************** Outer Exception **************

Exception type:System.Reflection.TargetParameterCountException

Exception message:Parameter count mismatch.

Exception source:mscorlib

Exception Target Site: InvokeArgumentsCheck

at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at System.Delegate.DynamicInvokeImpl(Object[] args)

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)

=== One Known Change I Made …

public override List SidePanelPlaceDefinitions

{

// Now using: WorkSpaceState … VideoOS.Platform.WorkSpaceState.Setup

// But my guess is that this is not the problem.

}

I cannot recognize this as a known issue or similar.

I would like to try to reproduce. Please give me the complete code snippet after verifying that it is this one that cause the issue. Please mention the Smart Client version and MIP SDK NuGet version.

I found the problem by stepping through code with the debugger.

I was making a function call with Invoke, that was missing a parameter.

I guess I skipped the step advising you to debug. For other seeing this thread now please be aware of this article: - https://developer.milestonesys.com/s/article/debugging-techniques-for-Smart-Client-plugins

Thanks for your help Bo. Milestone forum has helped me at App-Techs many times over the years.

Just letting you know that I’m still looking for a solution to a different post I made recently.

<https://developer.milestonesys.com/s/question/0D5bH00001LU5zCSAT/how-to-display-multiple-cameras-in-imageviewerwpfcontrol> https://developer.milestonesys.com/s/question/0D5bH00001LU5zCSAT/how-to-display-multiple-cameras-in-imageviewerwpfcontrol

Our plug-in processes incoming Alarms with multiple cameras and displays in a control similar to seen in the screen shot in my post.
But so far I have only been able to display one camera.

Which class should I use, and also what is the trick to display more than one camera?

David Gradwell

App-Techs Corporation