System.InvalidOperationException, error al cerrar un formulario
Publicado por Matias (8 intervenciones) el 03/11/2019 03:58:21
Buenas noches a todo el foro!!! Les cuento: hice una aplicación en VB2010 en Windows 10, la publico, instalo y anda perfecto en Windows 10. Cuando la quiero instalar en otros ordenadores con Windows 7 o Windows 8.1 y por ejemplo después de cerrar especificamente estos 2 formularios(form ventas y form prestamos) me sale una ventana con el siguiente error, voy a "detalles" y eso me aparece en el error. Tengo como 6 formularios más y no me pasa lo mismo. Alguien puede ayudarme? ya busqué en muchos foros y no encuentro la solución. Ya intenté que se instale PowerPacks10 en los requisitos previos y nada.
"Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración
Just-In-Time (JIT) en lugar de a este cuadro de diálogo.
************** Texto de la excepción **************
System.InvalidOperationException: Colección modificada; puede que no se ejecute la operación de enumeración.
en System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
en System.Collections.Generic.List`1.Enumerator.MoveNextRare()
en System.Collections.Generic.List`1.Enumerator.MoveNext()
en Microsoft.VisualBasic.PowerPacks.ShapeCollection.Dispose(Boolean disposing)
en Microsoft.VisualBasic.PowerPacks.ShapeContainer.Dispose(Boolean disposing)
en System.ComponentModel.Component.Dispose()
en System.Windows.Forms.Control.Dispose(Boolean disposing)
en System.ComponentModel.Component.Dispose()
en System.Windows.Forms.Control.Dispose(Boolean disposing)
en System.Windows.Forms.Form.Dispose(Boolean disposing)
en sistema2.frmventa.Dispose(Boolean disposing)
en System.Windows.Forms.Form.WmClose(Message& m)
en System.Windows.Forms.Form.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Ensamblados cargados **************
mscorlib
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3468.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
sistema2
Versión del ensamblado: 1.0.0.0
Versión Win32: 1.0.0.1
Código base: file:///C:/Users/bruno/AppData/Local/Apps/2.0/OBBRLCP7.5JG/90J3DZGJ.HDR/sist..tion_d2f2099346c95787_0001.0000_630b5e248d1a8018/sistema2.exe
----------------------------------------
Microsoft.VisualBasic
Versión del ensamblado: 10.0.0.0
Versión Win32: 14.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3451.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3468.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3324.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3324.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Microsoft.VisualBasic.PowerPacks.Vs
Versión del ensamblado: 10.0.0.0
Versión Win32: 10.0.20911.1
Código base: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic.PowerPacks.Vs/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.PowerPacks.Vs.dll
----------------------------------------
System.Windows.Forms.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Data
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3260.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Data.resources.dll
----------------------------------------
System.Transactions
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3221.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Runtime.Caching
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll
----------------------------------------
mscorlib.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_es_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
************** Depuración JIT **************
Para habilitar la depuración Just In Time (JIT), el archivo de configuración de esta
aplicación o equipo (machine.config) debe tener el
valor jitDebugging establecido en la sección system.windows.forms.
La aplicación también se debe compilar con la depuración
habilitada
Por ejemplo:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
Cuando esté habilitada la depuración JIT, cualquier excepción no controlada
se enviará al depurador JIT registrado en el equipo
en lugar de controlarlo mediante el cuadro de diálogo."
Desde ya muchas gracias!!!
"Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración
Just-In-Time (JIT) en lugar de a este cuadro de diálogo.
************** Texto de la excepción **************
System.InvalidOperationException: Colección modificada; puede que no se ejecute la operación de enumeración.
en System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
en System.Collections.Generic.List`1.Enumerator.MoveNextRare()
en System.Collections.Generic.List`1.Enumerator.MoveNext()
en Microsoft.VisualBasic.PowerPacks.ShapeCollection.Dispose(Boolean disposing)
en Microsoft.VisualBasic.PowerPacks.ShapeContainer.Dispose(Boolean disposing)
en System.ComponentModel.Component.Dispose()
en System.Windows.Forms.Control.Dispose(Boolean disposing)
en System.ComponentModel.Component.Dispose()
en System.Windows.Forms.Control.Dispose(Boolean disposing)
en System.Windows.Forms.Form.Dispose(Boolean disposing)
en sistema2.frmventa.Dispose(Boolean disposing)
en System.Windows.Forms.Form.WmClose(Message& m)
en System.Windows.Forms.Form.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Ensamblados cargados **************
mscorlib
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3468.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
sistema2
Versión del ensamblado: 1.0.0.0
Versión Win32: 1.0.0.1
Código base: file:///C:/Users/bruno/AppData/Local/Apps/2.0/OBBRLCP7.5JG/90J3DZGJ.HDR/sist..tion_d2f2099346c95787_0001.0000_630b5e248d1a8018/sistema2.exe
----------------------------------------
Microsoft.VisualBasic
Versión del ensamblado: 10.0.0.0
Versión Win32: 14.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3451.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3468.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3324.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3324.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Microsoft.VisualBasic.PowerPacks.Vs
Versión del ensamblado: 10.0.0.0
Versión Win32: 10.0.20911.1
Código base: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic.PowerPacks.Vs/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.PowerPacks.Vs.dll
----------------------------------------
System.Windows.Forms.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Data
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3260.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Data.resources.dll
----------------------------------------
System.Transactions
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3221.0 built by: NET472REL1LAST_C
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Runtime.Caching
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll
----------------------------------------
mscorlib.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.7.3062.0 built by: NET472REL1
Código base: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_es_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
************** Depuración JIT **************
Para habilitar la depuración Just In Time (JIT), el archivo de configuración de esta
aplicación o equipo (machine.config) debe tener el
valor jitDebugging establecido en la sección system.windows.forms.
La aplicación también se debe compilar con la depuración
habilitada
Por ejemplo:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
Cuando esté habilitada la depuración JIT, cualquier excepción no controlada
se enviará al depurador JIT registrado en el equipo
en lugar de controlarlo mediante el cuadro de diálogo."
Desde ya muchas gracias!!!
Valora esta pregunta


0