vb.net - System.InvalidOperationException: Collection was modified; enumeration operation may not execute when form closes -


i fixed issue removing line shapes form.

original post

when form closes following error:

system.invalidoperationexception: collection modified; enumeration operation may not execute

this appears when program deployed on machine not during debug. if hide form doesn't occur when form closed.

any appreciated becoming annoying now. in advance,
craig

p.s. below formclosed event

    'disconnect database     cn.close()     cn.dispose() 

stack trace

   ************** exception text **************    system.invalidoperationexception: collection modified; enumeration operation may not execute.    @ system.throwhelper.throwinvalidoperationexception(exceptionresource resource)    @ system.collections.generic.list`1.enumerator.movenextrare()    @ system.collections.generic.list`1.enumerator.movenext()    @ microsoft.visualbasic.powerpacks.shapecollection.dispose(boolean disposing)    @ microsoft.visualbasic.powerpacks.shapecontainer.dispose(boolean disposing)    @ system.componentmodel.component.dispose()    @ system.windows.forms.control.dispose(boolean disposing)    @ system.componentmodel.component.dispose()    @ system.windows.forms.control.dispose(boolean disposing)    @ system.windows.forms.tabcontrol.dispose(boolean disposing)    @ system.componentmodel.component.dispose()    @ system.windows.forms.control.dispose(boolean disposing)    @ system.windows.forms.form.dispose(boolean disposing)    @ equimanager.frmeditjumpingshow.dispose(boolean disposing)    @ system.componentmodel.component.dispose()    @ system.windows.forms.form.wmclose(message& m)    @ system.windows.forms.form.wndproc(message& m)    @ system.windows.forms.control.controlnativewindow.onmessage(message& m)    @ system.windows.forms.control.controlnativewindow.wndproc(message& m)    @ system.windows.forms.nativewindow.callback(intptr hwnd, int32 msg, intptr wparam, intptr lparam) 

i removed line shapes , error disappeared.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -