c# - Exception Info: System.Reflection.TargetInvocationException -


i working on wpf application receive error @ run time on single device.

exception info: system.reflection.targetinvocationexception 

my question:

  • any clue of cause error?
  • any idea how debug application in release mode?

exception info: system.reflection.targetinvocationexception stack:    @ system.runtimemethodhandle.invokemethod(system.object, system.object[], system.signature, boolean)    @ system.reflection.runtimemethodinfo.unsafeinvokeinternal(system.object, system.object[], system.object[])    @ system.delegate.dynamicinvokeimpl(system.object[])    @ system.windows.threading.exceptionwrapper.internalrealcall(system.delegate, system.object, int32)    @ ms.internal.threading.exceptionfilterhelper.trycatchwhen(system.object, system.delegate, system.object, int32, system.delegate)    @ system.windows.threading.dispatcheroperation.invokeimpl()    @ system.windows.threading.dispatcheroperation.invokeinsecuritycontext(system.object)    @ system.threading.executioncontext.runinternal(system.threading.executioncontext, system.threading.contextcallback, system.object, boolean)    @ system.threading.executioncontext.run(system.threading.executioncontext, system.threading.contextcallback, system.object, boolean)    @ system.threading.executioncontext.run(system.threading.executioncontext, system.threading.contextcallback, system.object)    @ system.windows.threading.dispatcheroperation.invoke()    @ system.windows.threading.dispatcher.processqueue()    @ system.windows.threading.dispatcher.wndprochook(intptr, int32, intptr, intptr, boolean byref)    @ ms.win32.hwndwrapper.wndproc(intptr, int32, intptr, intptr, boolean byref)    @ ms.win32.hwndsubclass.dispatchercallbackoperation(system.object)    @ system.windows.threading.exceptionwrapper.internalrealcall(system.delegate, system.object, int32)    @ ms.internal.threading.exceptionfilterhelper.trycatchwhen(system.object, system.delegate, system.object, int32, system.delegate)    @ system.windows.threading.dispatcher.legacyinvokeimpl(system.windows.threading.dispatcherpriority, system.timespan, system.delegate, system.object, int32)    @ ms.win32.hwndsubclass.subclasswndproc(intptr, int32, intptr, intptr)    @ ms.win32.unsafenativemethods.dispatchmessage(system.windows.interop.msg byref)    @ system.windows.threading.dispatcher.pushframeimpl(system.windows.threading.dispatcherframe)    @ system.windows.threading.dispatcher.pushframe(system.windows.threading.dispatcherframe)    @ system.windows.threading.dispatcheroperation.wait(system.timespan)    @ system.windows.threading.dispatcher.invokeimpl(system.windows.threading.dispatcheroperation, system.threading.cancellationtoken, system.timespan)    @ system.windows.threading.dispatcher.legacyinvokeimpl(system.windows.threading.dispatcherpriority, system.timespan, system.delegate, system.object, int32)    @ wpf.datamodel.wpfdatasource.loaddata()    @ wpf.datamodel.wpfdatasource.downloadnewdata(boolean)    @ wpf.datamodel.wpfdatasource.load(boolean)    @ wpf.app.onstartup(system.windows.startupeventargs)    @ system.windows.application.<.ctor>b__1(system.object)    @ system.windows.threading.exceptionwrapper.internalrealcall(system.delegate, system.object, int32)    @ ms.internal.threading.exceptionfilterhelper.trycatchwhen(system.object, system.delegate, system.object, int32, system.delegate)    @ system.windows.threading.dispatcheroperation.invokeimpl()    @ system.windows.threading.dispatcheroperation.invokeinsecuritycontext(system.object)    @ system.threading.executioncontext.runinternal(system.threading.executioncontext, system.threading.contextcallback, system.object, boolean)    @ system.threading.executioncontext.run(system.threading.executioncontext, system.threading.contextcallback, system.object, boolean)    @ system.threading.executioncontext.run(system.threading.executioncontext, system.threading.contextcallback, system.object)    @ system.windows.threading.dispatcheroperation.invoke()    @ system.windows.threading.dispatcher.processqueue()    @ system.windows.threading.dispatcher.wndprochook(intptr, int32, intptr, intptr, boolean byref)    @ ms.win32.hwndwrapper.wndproc(intptr, int32, intptr, intptr, boolean byref)    @ ms.win32.hwndsubclass.dispatchercallbackoperation(system.object)    @ system.windows.threading.exceptionwrapper.internalrealcall(system.delegate, system.object, int32)    @ ms.internal.threading.exceptionfilterhelper.trycatchwhen(system.object, system.delegate, system.object, int32, system.delegate)    @ system.windows.threading.dispatcher.legacyinvokeimpl(system.windows.threading.dispatcherpriority, system.timespan, system.delegate, system.object, int32)    @ ms.win32.hwndsubclass.subclasswndproc(intptr, int32, intptr, intptr)    @ ms.win32.unsafenativemethods.dispatchmessage(system.windows.interop.msg byref)    @ system.windows.threading.dispatcher.pushframeimpl(system.windows.threading.dispatcherframe)    @ system.windows.threading.dispatcher.pushframe(system.windows.threading.dispatcherframe)    @ system.windows.threading.dispatcher.run()    @ system.windows.application.rundispatcher(system.object)    @ system.windows.application.runinternal(system.windows.window)    @ system.windows.application.run(system.windows.window)    @ wpf.app.main() 

that wrapper exception tells reflection .invoke() (or similar) failed. find out actually failed, need @ wrapped exception, via .innerexception. contains real error.

so: where-ever catching that, check ex.innerexception. , .innerexception of that, if one, etc - way down.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -