Skip to content

MidInterpreter.GetMessageTemplate(int mid) is failing when calling Parse #119

@tjarnagin

Description

@tjarnagin

We are using the latest version - 6.1

When the controller sends a response, in this case MID 2, an exception is thrown:

Exception has been thrown by the target of an invocation. (mscorlib)


Program Location (Client side):

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at OpenProtocolInterpreter.MidInterpreter.<>c__DisplayClass13_0`1.<UseTemplate>b__0()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at OpenProtocolInterpreter.MidInterpreter.<>c__DisplayClass15_0.<GetMessageTemplate>b__0(Lazy`1 x)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at OpenProtocolInterpreter.MidInterpreter.GetMessageTemplate(Int32 mid)
   at OpenProtocolInterpreter.MidInterpreter.Parse(Byte[] package)
   at DesoutterActivityViewModel.OnDataReceived(Byte[] message)

ADDITIONAL INFORMATION:

Collection was modified; enumeration operation may not execute. (mscorlib)


Program Location (Client side):

   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at OpenProtocolInterpreter.Messages.MessagesTemplate.FilterSelectedMids(IEnumerable`1 mids)
   at OpenProtocolInterpreter.Messages.MessagesTemplate.FilterSelectedMids(IEnumerable`1 mids)
   at OpenProtocolInterpreter.Communication.CommunicationMessages..ctor(IEnumerable`1 selectedMids)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions