ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • dynamic 오류 System.IndexOutOfRangeException 'Microsoft.CSharp.dll'
    .NET/WPF 2013. 5. 2. 16:39
    반응형

    WPF UserControl을 상속받은 클래스에서 자기자신의 클래스를 에셈블리로드해 dynamic으로 형변환 다음 메소드 오버라이딩 된 메소드를 호출시 


    (pop.Content as dynamic).PADetailPartMedCostReceivePaymentLoad(inObj);


    간헐적으로 아래 오류발생 ...

     

    System.IndexOutOfRangeException에서 'Microsoft.CSharp.dll' 형식의 예외가 발생했지만 사용자 코드에서 처리되지 않았습니다.

     

     

    => 명시적으로 클래스명 as 캐스팅 후 오류 해결

     

     

     (pop.Content as HIS.PA.CORE.UI.PADetailPartMedCostReceivePayment).PADetailPartMedCostReceivePaymentLoad(inObj);

     

    => 오류 원인은 모르겠음 , 다만 Reflector로 분석해보야야할 건 같음

     

     

     

    System.Reflection.MethodInfo GetMethodInfoFromExpr(Microsoft.CSharp.RuntimeBinder.Semantics.EXPRMETHODINFO)
    >> InnerException[1]
    위치: Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.GetMethodInfoFromExpr(EXPRMETHODINFO methinfo)
    위치: Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.GenerateCall(EXPRCALL pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.VisitCALL(EXPRCALL pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Dispatch(EXPR pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Visit(EXPR pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.GenerateLambda(EXPRCALL pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.VisitCALL(EXPRCALL pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Dispatch(EXPR pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Visit(EXPR pExpr)
    위치: Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.Rewrite(TypeManager typeManager, EXPR pExpr, IEnumerable`1 listOfParameters)
    위치: Microsoft.CSharp.RuntimeBinder.RuntimeBinder.CreateExpressionTreeFromResult(IEnumerable`1 parameters, ArgumentObject[] arguments, Scope pScope, EXPR pResult)
    위치: Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding)
    위치: Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding)
    위치: Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable`1 args, IEnumerable`1 arginfos, DynamicMetaObject onBindingError)
    위치: Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
    위치: System.Dynamic.DynamicMetaObject.BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args)
    위치: System.Dynamic.InvokeMemberBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args)
    위치: System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel)
    위치: System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)
    위치: System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
    위치: HIS.PA.CORE.UI.PAPartMedCostReceivePayment.DetailPopupOpen()
    위치: HIS.PA.CORE.UI.PAPartMedCostReceivePayment.<.ctor>b__0(Object sender, MouseButtonEventArgs args)
    위치: System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    위치: System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    위치: System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    위치: System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    위치: System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    위치: System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
    위치: System.Windows.Controls.Control.OnMouseDoubleClick(MouseButtonEventArgs e)
    위치: System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
    위치: System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    위치: System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    위치: System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    위치: System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    위치: System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
    위치: System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
    위치: System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    위치: System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    위치: System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    위치: System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    위치: System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    위치: System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
    위치: System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
    위치: System.Windows.Input.InputManager.ProcessStagingArea()
    위치: System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    위치: System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    위치: System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    위치: System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    위치: System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    위치: MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    위치: MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    위치: System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    위치: MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

     

     
    반응형

    댓글

Designed by Tistory.