Collection was modified, enumeration operation may not execute

I am working on this very large Spanish to English project on my Trados Studio 2022 SR1 - 17.1.8.17828. For some reason, when it starts auto-propagating quickly (i.e. numbers), it suddenly closes and shows the error message written in the subject field.

This happens even when I tried all solutions proposed by RWS, be them Trados AI or human. I am attaching the last error log file generated.

Please, I need urgent help. I am willing to pay for a support license, but received no answer from my request.

Any help would be highly appreciated.

Carlos

 

<SDLErrorDetails time="4/10/2023 10:23:09">
  <ErrorMessage>Collection was modified; enumeration operation may not execute.</ErrorMessage>
  <Exception>
    <Type>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink />
    <Source>mscorlib</Source>
    <HResult>-2146233079</HResult>
    <StackTrace><![CDATA[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at OpenAITranslator.ViewModel.TranslationViewModel.GetTranslationCacheItem()
   at OpenAITranslator.ViewModel.TranslationViewModel.<Translate>d__113.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at OpenAITranslator.ViewModel.TranslationViewModel.<TranslateAsync>d__111.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Sdl.TranslationStudio.Application.Launcher.RunApplication()]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio17</ProductVersion>
    <EntryAssemblyFileVersion>17.1.8.17828</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 10 Home</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>DESKTOP-HHM53RU\User</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>DESKTOP-HHM53RU</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>12532924 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

emoji
Parents
  • Hi  

    Do you have any termbases added to your project?

    Kind regards,

    Elisa

    Elisa Maxim | RWS Group

    ___________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hello Elisa, thank you for your reply. Yes, I am using two termbases.

    What should I do?

    Thank you in advance!

    Carlos

    emoji
  • Hi  

    Please try removing them and then re-adding them. If the problem persists, please try recreating the project.

    Kind regards,

    Elisa

    Elisa Maxim | RWS Group

    ___________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hello Elisa,

    I can't thank you enough!

    Your "removing and later adding" the termbases to my project, worked like a charm!

    I think (and hope) that now I can work worry-free on my project.

    Thank you very much!

    Carlos

    emoji
  • Glad it worked. Referencing  Collection was modified; enumeration operation may not execute even though not Groupshare related in this particular case.

    Kind regards,

    Elisa

    Elisa Maxim | RWS Group

    ___________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hello Elisa Maxim,

    I am very sorry to inform you that my issue hasn't disappeared. I am working without termbases, re-initialized the project, and my Trados keeps shutting down with the same error message, over and over again, when it starts auto-propagating. This is very frustrating. Do you have any other suggestions that could be helpful?

    Thank you, once again, for your well-intentioned and kind help!

    Carlos

    emoji
  •  

    The original error stack seems to be pointing towards the OpenAI translator.  I suggest you remove your plugins and then only put them back using the integrated appstore.

    Please delete the following folders and then reinstall your plugins after making sure you have the latest ones for your product, either from the appstore at https://appstore.rws.com/ or by using the integrated appstore in Trads Studio:

    %APPDATA%\Trados\Trados Studio\17\Plugins

    %LOCALAPPDATA%\Trados\Trados Studio\17\Plugins

    c:\ProgramData\Trados\Trados Studio\17\Plugins

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hello Paul,

    thank you for your advise. I removed the c:\ProgramData\Trados\Trados Studio\17\Plugins. Reinstalled the plugins from the integrated App Store, started to translate, and then when it started to automatically autopropaget and confirm segment, it sudennly crashed with the same error message.

    I am attaching the error log file:

    <SDLErrorDetails time="8/10/2023 12:04:22">
      <ErrorMessage>Collection was modified; enumeration operation may not execute.</ErrorMessage>
      <Exception>
        <Type>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2146233079</HResult>
        <StackTrace><![CDATA[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
       at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
       at System.Collections.Generic.List`1.Enumerator.MoveNext()
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
       at OpenAITranslator.ViewModel.TranslationViewModel.GetTranslationCacheItem()
       at OpenAITranslator.ViewModel.TranslationViewModel.<Translate>d__113.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at OpenAITranslator.ViewModel.TranslationViewModel.<TranslateAsync>d__111.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at Sdl.TranslationStudio.Application.Launcher.RunApplication()]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio17</ProductVersion>
        <EntryAssemblyFileVersion>17.1.8.17828</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Home</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>DESKTOP-HHM53RU\User</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>DESKTOP-HHM53RU</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>12532924 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>
    Your help is highly appreciated. More so,  you taking the time to answer me on a weekend!

    Just to let you know, I have requested for a paying support contract, but never received an answer.

    Thank you Paul!

    Carlos

    emoji
Reply
  • Hello Paul,

    thank you for your advise. I removed the c:\ProgramData\Trados\Trados Studio\17\Plugins. Reinstalled the plugins from the integrated App Store, started to translate, and then when it started to automatically autopropaget and confirm segment, it sudennly crashed with the same error message.

    I am attaching the error log file:

    <SDLErrorDetails time="8/10/2023 12:04:22">
      <ErrorMessage>Collection was modified; enumeration operation may not execute.</ErrorMessage>
      <Exception>
        <Type>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2146233079</HResult>
        <StackTrace><![CDATA[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
       at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
       at System.Collections.Generic.List`1.Enumerator.MoveNext()
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
       at OpenAITranslator.ViewModel.TranslationViewModel.GetTranslationCacheItem()
       at OpenAITranslator.ViewModel.TranslationViewModel.<Translate>d__113.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at OpenAITranslator.ViewModel.TranslationViewModel.<TranslateAsync>d__111.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at Sdl.TranslationStudio.Application.Launcher.RunApplication()]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio17</ProductVersion>
        <EntryAssemblyFileVersion>17.1.8.17828</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Home</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>DESKTOP-HHM53RU\User</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>DESKTOP-HHM53RU</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>12532924 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>
    Your help is highly appreciated. More so,  you taking the time to answer me on a weekend!

    Just to let you know, I have requested for a paying support contract, but never received an answer.

    Thank you Paul!

    Carlos

    emoji
Children