System.OutOfMemoryException comes while RunAutomaticTast works

Hellow,
recently I'he met the problem with SDL Trados 2019 API:
error occurs while the task (to apply Perfect Matches) is running:

AutomaticTask perfectMatchTask = newProject.RunAutomaticTask(targetFiles.GetIds(), AutomaticTaskTemplateIds.PerfectMatch);
And comes error: "System.OutOfMemoryException".

It happens (in multilingual project) if previous file (*.sdlxliff) size is about 40 Mb and more. But at the same time SDL Trados 2019 it self work with the same files just fine.

In other projects (one lang or multylingual) with small previous *.sdlxliff size it works without errors.

My PC RAM = 16 GB and while program works, about 6 GB is free. So it is not a hardvire issue.
May be there are some solutions to increase available memory or enother useful hints which I don't know?
Please Help!

Parents Reply Children
  • Hellow there is enother issue with "System.OutOfMemoryException". But now it's from SDL Trados 2022 - 17.0.6.14902 itself.
    Screenshot of a 'Task Results' window showing an error. The task 'Analyze Files' failed with a 'System.OutOfMemoryException' error on file 'docx.sdlxliff' at the 'Analyze Files' origin.

    And here is Error Details:

    <SDLErrorDetails time="13.12.2024 12:31:50">
    <ErrorMessage>Exception of type 'System.OutOfMemoryException' was thrown.</ErrorMessage>
    <Exception>
    <Type>System.OutOfMemoryException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink />
    <Source>mscorlib</Source>
    <HResult>-2147024882</HResult>
    <StackTrace><![CDATA[ at System.String.ReplaceInternal(String oldValue, String newValue)
    at System.String.Replace(String oldValue, String newValue)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XmlNodeBuilder.XmlBuilder.XmlEscape(String unescaped)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XmlNodeBuilder.XmlBuilder.AddText(String text)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.FileManager.WriteZippedFile(XmlBuilder builder, String filePath)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.EmbedDependencyFile(XmlBuilder builder, IDependencyFileProperties file)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.AutoEmbedOrLinkDependencyFile(XmlBuilder builder, IDependencyFileProperties file)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.AddDependencyFile(XmlBuilder builder, IDependencyFileProperties file)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.SetDependencyFiles(FileSkeleton fileHeader, XmlBuilder builder)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.WriteFileComplete(FileSkeleton fileHeader, XliffFormattingXmlTextWriter writer)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.WriteSdlXliff(XliffFormattingXmlTextWriter writer)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileWriter.WriteSdlXliffToFile(String tempOutputFile)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileWriter.Complete()
    at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.Complete()
    at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.Complete()
    at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.Complete()
    at Sdl.ProjectApi.AutomaticTasks.TranslationMemoryLookupContentProcessor.Complete()
    at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.Complete()
    at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.Complete()
    at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.Complete()
    at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.Complete()
    at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
    at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
    at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.Parse(String targetFilePath)]]></StackTrace>
    </Exception>
    <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio17</ProductVersion>
    <EntryAssemblyFileVersion>17.0.6.14902</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 10 Enterprise LTSC</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>workst</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>WorkST</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>29247220 MB</PhysicalMemory>
    </Environment>
    </SDLErrorDetails>

    And problem with "AutomaticTask perfectMatchTaskemains in Trados 2022 in the same way.



    Generated Image Alt-Text
    [edited by: RWS Community AI at 5:39 AM (GMT 0) on 13 Dec 2024]
  • Hello,
    the same error occures in Trados 2022. Previous message was banned as spam. So screen and eeror log attached to this message.Screenshot of Trados Studio error message displaying 'Analyze Files' task failed with an 'Exception of type 'System.OutOfMemoryException' was thrown.'

    <SDLErrorDetails time="13.12.2024 12:31:50">
      <ErrorMessage>Exception of type 'System.OutOfMemoryException' was thrown.</ErrorMessage>
      <Exception>
        <Type>System.OutOfMemoryException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2147024882</HResult>
        <StackTrace><![CDATA[   at System.String.ReplaceInternal(String oldValue, String newValue)
       at System.String.Replace(String oldValue, String newValue)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XmlNodeBuilder.XmlBuilder.XmlEscape(String unescaped)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XmlNodeBuilder.XmlBuilder.AddText(String text)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.FileManager.WriteZippedFile(XmlBuilder builder, String filePath)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.EmbedDependencyFile(XmlBuilder builder, IDependencyFileProperties file)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.AutoEmbedOrLinkDependencyFile(XmlBuilder builder, IDependencyFileProperties file)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.AddDependencyFile(XmlBuilder builder, IDependencyFileProperties file)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.SetDependencyFiles(FileSkeleton fileHeader, XmlBuilder builder)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.WriteFileComplete(FileSkeleton fileHeader, XliffFormattingXmlTextWriter writer)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffWriter.WriteSdlXliff(XliffFormattingXmlTextWriter writer)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileWriter.WriteSdlXliffToFile(String tempOutputFile)
       at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileWriter.Complete()
       at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.Complete()
       at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.Complete()
       at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.Complete()
       at Sdl.ProjectApi.AutomaticTasks.TranslationMemoryLookupContentProcessor.Complete()
       at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.Complete()
       at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.Complete()
       at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.Complete()
       at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.Complete()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
       at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.Parse(String targetFilePath)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio17</ProductVersion>
        <EntryAssemblyFileVersion>17.0.6.14902</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Enterprise LTSC</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>workst</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>WorkST</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>29247220 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>



    Generated Image Alt-Text
    [edited by: RWS Community AI at 6:07 AM (GMT 0) on 13 Dec 2024]