By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

Exception: System.Reflection.TargetInvocationException Exception has been thrown...

P: 2
hi everybody,

I get This Error In my Application After Running it for period and I don't know whats the reasons of this

here is the Error :-

Exception: System.Reflection.TargetInvocationException

Exception has been thrown by the target of an invocation.

Exception: System.ComponentModel.Win32Exception

The operation completed successfully


Exception: System.Reflection.TargetInvocationException
at System.RuntimeMethodHandle._SerializationInvoke(Ob ject target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context) at System.Reflection.RuntimeConstructorInfo.Serializa tionInvoke(Object target, SerializationInfo info, StreamingContext context) at System.Runtime.Serialization.ObjectManager.Complet eISerializableObject(Object obj, SerializationInfo info, StreamingContext context) at System.Runtime.Serialization.ObjectManager.FixupSp ecialObject(ObjectHolder holder) at System.Runtime.Serialization.ObjectManager.DoFixup s() at System.Runtime.Serialization.Formatters.Binary.Obj ectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Resources.ResourceReader.DeserializeObject( Int32 typeIndex) at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode) at System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode) at System.Resources.RuntimeResourceSet.GetObject(Stri ng key, Boolean ignoreCase, Boolean isString) at System.Resources.RuntimeResourceSet.GetObject(Stri ng key, Boolean ignoreCase) at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream) at System.Resources.ResourceManager.GetObject(String name) at OceanTools.OceanErrorForm.InitializeComponent() in D:\Last work\2010\My Test OceanTools Underground Working\Forms\OceanErrorForm.Designer.vb:line 160 at OceanTools.OceanErrorForm..ctor() in D:\Last work\2010\My Test OceanTools Underground Working\Forms\OceanErrorForm.vb:line 61 at App1.My.MyApplication.MyApplication_UnhandledExcep tion(Object sender, UnhandledExceptionEventArgs e) in D:\Last work\2010\The One Master\ApplicationEvents.vb:line 94 at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.raise_UnhandledException(Objec t sender, UnhandledExceptionEventArgs e) at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnUnhandledException(Unhandled ExceptionEventArgs e) at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnUnhandledExceptionEventAdapt or(Object sender, ThreadExceptionEventArgs e) at System.Windows.Forms.Application.ThreadContext.OnT hreadException(Exception t) at System.Windows.Forms.Control.WndProcException(Exce ption e) at System.Windows.Forms.Control.ControlNativeWindow.O nThreadException(Exception e) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at System.Windows.Forms.Form.ShowDialog() at App1.SplashScreen1.SplashScreen1_FormClosed(Object sender, FormClosedEventArgs e) in D:\Last work\2010\The One Master\SplashScreen1.vb:line 85 at System.Windows.Forms.Form.OnFormClosed(FormClosedE ventArgs e) at System.Windows.Forms.Form.WmClose(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Exception: System.ComponentModel.Win32Exception at System.Drawing.Icon.Initialize(Int32 width, Int32 height) at System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)
any help !

thanks
Dec 16 '12 #1
Share this Question
Share on Google+
3 Replies


zmbd
Expert Mod 5K+
P: 5,397
Someone else will catch something; however, looks like you exceeded the max thread count or tried to re-enter a portion of your program that was "locked."
The other thing that greatly bothers me is the unsafenativemethods.dispatch and cross-application-domain... just what was your program trying to do that triped that!

Me thinks you're going to have to tell us what your program is supposed to do before either anyone can or will help you.
Dec 16 '12 #2

P: 2
hi zmbd ,

thanks for replay

this form is just for adding order or bill in

database(sqlserver)

and this error rise in button "add " click event
Dec 16 '12 #3

zmbd
Expert Mod 5K+
P: 5,397
I would not expect the form's code to throw these errors if done according to best practices.

Without your code, I don't see how anyone will be able to provide specific help; however, you should go in and look at how you are calling the form and what resources the form is using once open. Finally, what is happening during the close of your form to those resources. You also need to take the same look over the click_event of the "Add" button.

Please read the FAQ and posting guidelines before posting your code and make sure to use the <CODE/> button to format it. :)
Dec 16 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.