This is a migrated thread and some comments may be shown as answers.

System.InvalidOperationException

2 Answers 315 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
João
Top achievements
Rank 1
Iron
João asked on 29 Jul 2020, 10:31 AM

Hello!

I was having a problem, in a client desktop wich I can't replicate on any other desktop my company owns, that I really can't fix ...

I'll paste the text bellow that comes with the alert ( some parts translated to english since I'm from Portugal:

 

 

Check the end of this message to obtain details on how to invoc the depuration
JIT (just-in-time)instead of this dialog box.

************** EXCEPTION TEXT **************
System.InvalidOperationException: COllection was modified; the operation of the enumeration  may not be executed.
   em System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
   em Telerik.WinControls.ComponentInputBehavior.ElementUnderMouseMonitorTimer_Tick(Object sender, EventArgs e)
   em System.Windows.Forms.Timer.OnTick(EventArgs e)
   em System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Assemblies  **************
mscorlib
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Progress.clrbridge
    Versão da assemblagem: 12.1.0.1135
    Versão Win32: 12.1.0.1135
    CodeBase: file:///C:/OE12/bin/Progress.clrbridge.DLL
----------------------------------------
Progress.NetUI
    Versão da assemblagem: 12.1.0.1135
    Versão Win32: 12.1.0.1135
    CodeBase: file:///C:/OE12/bin/Progress.NetUI.DLL
----------------------------------------
System
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.4110.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Progress.Telerik
    Versão da assemblagem: 12.1.0.1099
    Versão Win32: 12.1.0.1099
    CodeBase: file:///C:/OE12/bin/Progress.Telerik.DLL
----------------------------------------
System.Windows.Forms
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.4150.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
OEEventHandlerAssembly
    Versão da assemblagem: 0.0.0.0
    Versão Win32: 12.1.0.1135
    CodeBase: file:///C:/OE12/bin/Progress.NetUI.dll
----------------------------------------
ISymWrapper
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/ISymWrapper/v4.0_4.0.0.0__b03f5f7f11d50a3a/ISymWrapper.dll
----------------------------------------
Telerik.WinControls.UI
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.UI/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.UI.dll
----------------------------------------
Telerik.WinControls
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.dll
----------------------------------------
TelerikCommon
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/TelerikCommon/2019.2.618.20__5bb2a467cbec794e/TelerikCommon.dll
----------------------------------------
Telerik.WinControls.GridView
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.GridView/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.GridView.dll
----------------------------------------
Telerik.WinControls.Themes.Aqua
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.Themes.Aqua/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.Themes.Aqua.dll
----------------------------------------
Telerik.WinControls.Themes.CrystalDark
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.Themes.CrystalDark/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.Themes.CrystalDark.dll
----------------------------------------
Telerik.WinControls.Themes.VisualStudio2012Light
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.Themes.VisualStudio2012Light/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.Themes.VisualStudio2012Light.dll
----------------------------------------
Telerik.WinControls.Themes.VisualStudio2012Dark
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.Themes.VisualStudio2012Dark/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.Themes.VisualStudio2012Dark.dll
----------------------------------------
Telerik.WinControls.Themes.TelerikMetroBlue
    Versão da assemblagem: 2019.2.618.20
    Versão Win32: 2019.2.618.20
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Telerik.WinControls.Themes.TelerikMetroBlue/2019.2.618.20__5bb2a467cbec794e/Telerik.WinControls.Themes.TelerikMetroBlue.dll
----------------------------------------
Progress.Messages
    Versão da assemblagem: 12.1.0.1135
    Versão Win32: 12.1.0.1135
    CodeBase: file:///C:/OE12/bin/dotnetmsgs/Progress.Messages.DLL
----------------------------------------
INFOSEncrypt.Net.Lib
    Versão da assemblagem: 1.0.0.0
    Versão Win32: 1.0.0.0
    CodeBase: file:///C:/OE12/bin/dotnetmsgs/INFOSEncrypt.Net.Lib.DLL
----------------------------------------
System.DirectoryServices
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
----------------------------------------
System.DirectoryServices.AccountManagement
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices.AccountManagement/v4.0_4.0.0.0__b77a5c561934e089/System.DirectoryServices.AccountManagement.dll
----------------------------------------
OEProxyAssembly
    Versão da assemblagem: 12.1.0.0
    Versão Win32: 12.1.0.1135
    CodeBase: file:///C:/OE12/bin/Progress.NetUI.dll
----------------------------------------
mscorlib.resources
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_pt_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
Accessibility
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.GeneratedCode
    Versão da assemblagem: 1.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Numerics
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Windows.Forms.resources
    Versão da assemblagem: 4.0.0.0
    Versão Win32: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_pt_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** Depuração JIT **************
TO active depuration  just-in-time (JIT), the file .config 
for this app or computer(machine.config) needs to have the value  jitDebugging definido na secção system.windows.forms.
THe application also needs to be compiled with the depuration activated.

FOR EXAMPLE:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When it's activated, any non processed exception will be sent for the JIT instead using the dialog box.

 

 

--------------------------------------------------

IMAGE TEXT TRANSLATED:

A not processed exception occurred. If you click "continuar" the app with ignore this error and will proceed. If you choose the other option  the app will be closed instantly.

The collection was modified; the enumeration operation may not be executed.

 

------------------------------------------------

The client is using the 2019 version.

I'll wait for your response.

 

Have a nice day,

João Pinto.

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Jul 2020, 11:46 AM

Hello, João,

The provided stack trace is greatly appreciated. However, it is not enough for me to replicate the issue locally. What is the Telerik control that you are experiencing problems with? The screenshot is also not in English so it wouldn't be easy to determine what is the exact error that you are facing and most important what causes it.

According to the translated message, it seems that the collection was modified and the enumeration operation may not be executed. Are you modifying a collection while it is being iterated in a foreach loop for example? I suppose that it is the reason for getting the exception. 

However, without replicating the issue locally, we can make only conjectures what actually causes the undesired behavior on your end. That is why I would kindly ask you to provide a sample project demonstrating the error. Thus, we would be able to make an adequate analysis of the precise case and provide further assistance. Thank you in advance for your cooperation.

An alternative approach is to download the source code from your account and attach it to the problematic project. Thus, you can further debug it and identify the problematic place. The following KB article demonstrates how to attach the source code to your project: https://docs.telerik.com/devtools/winforms/knowledge-base/attach-telerik-source-code-to-your-project 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

0
João
Top achievements
Rank 1
Iron
answered on 19 Jan 2022, 05:49 PM

Hey there!

Sorry for answering late but I managed to find the error at the time.

I discovered 2 problems. The client didn't have the same Progress version I had and his computer wasn't really a recent one. Since i had the "Formatting" event active and was changing visual atributes inside it, it would trigger errors like that one.

I had this in 2 clients, in 1 I fixed by controlling the event better (leaving the event if it didn't match my conditions) and i removed the event  by 100% on the client that had a old and slow computer.

 

JP

Dess | Tech Support Engineer, Principal
Telerik team
commented on 24 Jan 2022, 06:32 AM

Hello, João,   

I am glad that the problem you were facing is now resolved. Please have in mind that it was really difficult to determine what caused this undesired behavior on your end since I was not familiar with the exact code implementation that you had. However, the stack trace indicated that a collection is being updated while it is being iterated which is not correct.

In case you are experiencing any further difficulties, it would be greatly appreciated if you can provide a sample runnable C#/VB project demonstrating the problem you are facing. Thus, we would be able to make an adequate analysis of the precise case and provide further assistance. Thank you. 

Should you have further questions please let me know.
 
Tags
General Discussions
Asked by
João
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
João
Top achievements
Rank 1
Iron
Share this question
or