Batch Task “Pretranslate”/ ”Word Count” API call fails randomly

After migrating to Trados Studio 2021 from SDL Trados Studio 2017, we have come across the following major issue in the implementation of our automated processes (using the Trados public APIs):

Batch Task “Pretranslate”/ ”Word Count”: randomly fails with the following exception:

“Unexpected exception when configuring file multiFileConverter for task 'Word Count': Failed to create an instance of translation provider 'sdltm.XXX/

“Unexpected exception when configuring file multiFileConverter for task 'Pre-translate Files': Failed to create an instance of translation provider 'sdltm.file:///P:/PathToTheTM/nameOfTheTm.sdltm'..”

 

This issue has been replicated on our side using a simple Filebased Project with 2 simple docx translatable files, an empty FileBased TM while running the batch task “Pretranslate” on a loop.

 

As you can see, this problem occurs both with FileBased and ServerBased TMs.

Through trial-and-error, we have noticed the following:

  • The problem occurs only with projects that have more than one translatable file.
  • The problem does not occur if the batch task is applied for each translatable file separately.
  • The problem will occur after running the task a couple of times. The first few times the task is run, there is no issue.
  • Once the problem occurs, it keeps occurring until either a long time has gone by or the PC is rebooted (even if after the problem occurs we try to run the batch task for each file separately).

Details of the Exception fetched From Visual Studio:

System.IndexOutOfRangeException

  HResult=0x80131508

  Message=Index was outside the bounds of the array.

  Source=Sdl.Core.PluginFramework

  StackTrace:

   at Sdl.Core.PluginFramework.ObjectRegistry`2.CreateObjects()

 

  This exception was originally thrown at this call stack:

    Sdl.Core.PluginFramework.ObjectRegistry<TExtensionAttribute, TExtensionType>.CreateObjects()

 

This is a serious issue with a major negative impact on our productivity.
Can anyone from RWS give me an official answer on what to do? This was working perfectly fine until the upgrade to Trados 2021.
Is this going to be fixed soon on an upcoming update?
Is there a way to circumvent the problem in the meantime?

Thank you in advance!


emoji
Parents Reply Children
  • Hello ,

    I am attaching the requested information.

    Thank you very much for your actions.

    <SDLErrorDetails time="6/8/2022 11:43:32 AM">
    <ErrorMessage>Unexpected exception when configuring file multiFileConverter for task 'Pre-translate Files': Failed to create an instance of translation provider 'sdltm.file:///PathToTheTM/nameOfTheTm.sdltm'..</ErrorMessage>
    <Exception>
    <Type>Sdl.ProjectApi.ProjectApiException, Sdl.ProjectApi, Version=16.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
    <HelpLink />
    <Source>Sdl.ProjectApi.Implementation</Source>
    <HResult>-2146233088</HResult>
    <StackTrace><![CDATA[ at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.ConfigureConverter(IMultiFileConverter multiFileConverter, Language targetLanguage)
    at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.CreateMultiFileConverter(IProjectFile tf, String filePath)
    at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.Parse(String targetFilePath)]]></StackTrace>
    <InnerException>
    <Type>Sdl.ProjectAutomation.Core.ProjectAutomationException, Sdl.ProjectAutomation.Core, Version=16.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
    <HelpLink />
    <Source>Sdl.ProjectAutomation.FileBased</Source>
    <HResult>-2146233088</HResult>
    <StackTrace><![CDATA[ at Sdl.ProjectAutomation.FileBased.Internal.AutomationServerEvents.HandleTranslationProviderException(ITranslationProviderItem translationProviderItem, Exception exception)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.GetTranslationProviderLanguageDirection(ITranslationProviderItem translationProviderItem, LanguagePair languageDirection, Boolean performUpdate, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.CreateProjectCascadeEntries(IList`1 projectCascadeEntryDataList, LanguagePair languagePair, Boolean readOnly, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.CreateCascade(ProjectCascadeSettings projectCascadeSettings, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.LanguageDirectionHelper.CreateCascade(ILanguageDirection languageDirection, ProjectCascadeEntryDataFilterFunction filter, IComparer`1 sort, Boolean readOnly, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.GetLanguageResources(ILanguageDirection languageDirection)
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.<>c__DisplayClass4_0.<GetLanguageResources>b__0(String _)
    at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.GetLanguageResources(IProject project, Language language)
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.GetLanguageResources(ITranslatableFile file)
    at Sdl.ProjectApi.AutomaticTasks.AbstractContentProcessorTaskImplementation.AddSegmentorToConverter(IExecutingTaskFile executingTaskFile, IBilingualProcessorContainer multiFileConverter)
    at Sdl.ProjectApi.AutomaticTasks.AbstractTmContentProcessorTaskImplementation.ConfigureConverter(IExecutingTaskFile executingTaskFile, IMultiFileConverter multiFileConverter)
    at Sdl.ProjectApi.AutomaticTasks.Translate.TranslateTask.ConfigureConverter(IExecutingTaskFile executingTaskFile, IMultiFileConverter multiFileConverter)
    at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.ConfigureConverter(IMultiFileConverter multiFileConverter, Language targetLanguage)]]></StackTrace>
    <InnerException>
    <Type>System.IndexOutOfRangeException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink />
    <Source>Sdl.Core.PluginFramework</Source>
    <HResult>-2146233080</HResult>
    <StackTrace><![CDATA[ at Sdl.Core.PluginFramework.ObjectRegistry`2.CreateObjects()
    at Sdl.LanguagePlatform.TranslationMemoryApi.TranslationProviderManager.GetTranslationProviderFactories()
    at Sdl.LanguagePlatform.TranslationMemoryApi.TranslationProviderManager.CreateTranslationProvider(Uri translationProviderUri, String translationProviderState, ITranslationProviderCredentialStore credentialStore)
    at Sdl.ProjectApi.TranslationProviderCache.CreateTranslationProvider(Uri translationProviderUri, String translationProviderState, ITranslationProviderCredentialStore credentialStore)
    at Sdl.ProjectApi.TranslationProviderCache.GetTranslationProvider(Uri translationProviderUri, String translationProviderState, ITranslationProviderCredentialStore credentialStore, Boolean performUpdate, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.GetTranslationProviderLanguageDirection(ITranslationProviderItem translationProviderItem, LanguagePair languageDirection, Boolean performUpdate, Boolean refreshCache)]]></StackTrace>
    </InnerException>
    </InnerException>
    </Exception>
    <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio16</ProductVersion>
    <EntryAssemblyFileVersion>16.2.10.9305</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 10 Enterprise</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>user</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>ComputerName</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>16776756 MB</PhysicalMemory>
    </Environment>
    </SDLErrorDetails>

    emoji
  • Hello again ,

    Researching, I also found this unresolved quesstion from two years ago by  which seems to have the same issue.

    community.rws.com/.../sdl-sdk-api-pretranslatefiles-randomly-fails

    Maybe it will assist your investigation.

    emoji
  • Hello Lydia,

    I would like to inquire if we have any news regarding the bug and if a fix is scheduled.

    It has been almost a month since it was reported, there is no update, and based on the lack of a resolution for the aforementioned similar bug I am getting worried that this one will be ignored too.
    As you may understand this is a pretty serious problem, halting our production and it only occurred after upgrading to Trados 2021.
    For the time being, we are forced to revert to Trados 2017, for each project that this bug occurs, making maintenance almost a nightmare (two different sets of software automations based on the edition of Trados).
    Please inform me.

    emoji