PJRoyle
Member
Can anyone help with this?
I have an app running continuously which occasionally gives the following error (the text is from the Exception.StackTrace property):
Item has already been added. Key in dictionary: "-1" Key being added: "-1"
text = at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FRegisterComponent(IMsoComponent component, MSOCRINFOSTRUCT pcrinfo, Int32& dwComponentID)
at System.Windows.Forms.ThreadContext.get_ComponentManager()
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.DoEvents()
(the methods from here on are part of the app)...
at myApp.FrmReadings.makeContact(String strSTD, String strTelNo, String strLogger)
at myApp.FrmReadings.readOneLogger(String strLogger)
at myApp.FrmReadings.readLoop()
All suggestions gratefully received and considered!
Peter Royle
I have an app running continuously which occasionally gives the following error (the text is from the Exception.StackTrace property):
Item has already been added. Key in dictionary: "-1" Key being added: "-1"
text = at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FRegisterComponent(IMsoComponent component, MSOCRINFOSTRUCT pcrinfo, Int32& dwComponentID)
at System.Windows.Forms.ThreadContext.get_ComponentManager()
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.DoEvents()
(the methods from here on are part of the app)...
at myApp.FrmReadings.makeContact(String strSTD, String strTelNo, String strLogger)
at myApp.FrmReadings.readOneLogger(String strLogger)
at myApp.FrmReadings.readLoop()
All suggestions gratefully received and considered!
Peter Royle