Object reference not set to an instance of an object when generating target translations

Hi all - I'm hitting a strange error trying to generate target translations to Russian (from English) on one file. All of the other files in the project generated fine. This is on Trados Studio 2022 SR1.

Here's the stack it's giving:

<ErrorMessage>Object reference not set to an instance of an object.</ErrorMessage>
<Exception>
<Type>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
<HelpLink />
<Source>Sdl.FileTypeSupport.Filters.Xml_2.Core</Source>
<HResult>-2147467261</HResult>
<StackTrace><![CDATA[ at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.WriteStartTag(ElementNode elementNode)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.WriteTagWithAttributes(String tagContent, IAbstractTag tag, IAbstractTagProperties tagProperties)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.WriteStartTag(ITagPair tagPair)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.VisitTagPair(ITagPair tagPair)
at Sdl.FileTypeSupport.Framework.Bilingual.TagPair.AcceptVisitor(IMarkupDataVisitor visitor)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.VisitChildren(IEnumerable`1 container)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.VisitSegment(ISegment segment)
at Sdl.FileTypeSupport.Framework.Bilingual.Segment.AcceptVisitor(IMarkupDataVisitor visitor)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.VisitChildren(IEnumerable`1 container)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.InlineTagWriter.Write(IXmlNodeWriterService writerService, IParagraph paragraph)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.NodeWriterConsumer`1.ReplaceWithTranslatedContent(NodeParagraphUnit nodeParagraphUnit, T xmlNode)
at Sdl.FileTypeSupport.Filters.Xml.Core.Writer.NodeWriterConsumer`1.Consume(XmlNodeMessage`1 message)
at Sdl.FileTypeSupport.Filters.Xml.Core.Messaging.Consumer`1.TryConsume(IMessage message)
at Sdl.FileTypeSupport.Filters.Xml.Core.Messaging.InMemoryMessageBus.Publish(IMessage message)
at Sdl.FileTypeSupport.Filters.Xml.Core.Messaging.MessagePublisher.PublishXmlNodeMessage[T](T node)
at Sdl.FileTypeSupport.Filters.Xml.Core.XmlNodes.XmlNodesDispatcher.ReadAndDispatchNodes()
at Sdl.FileTypeSupport.Filters.Xml.GenericXmlWriter.WriteTargetFile()
at Sdl.FileTypeSupport.Filters.Xml.GenericXmlWriter.FileComplete()
at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.FileComplete()
at Sdl.FileTypeSupport.Framework.Integration.FileGenerator.FileComplete()
at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.FileComplete()
at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.FileComplete()
at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.FileComplete()
at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.OnEndFile()
at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.<>c.<HandleFile>b__15_1(ISdlXliffStreamContentHandler handler)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.HandleFile()
at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.ContinueScanning()
at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ContinueParsing()
at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseNext()
at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
at Sdl.ProjectApi.AutomaticTasks.NativeFileGenerator.GenerateFiles(ContentRestriction restriction, Boolean preview, Int32 filePercentBase, Int32 filePercentFactor)
at Sdl.ProjectApi.AutomaticTasks.GenerateTargetTranslation.GenerateTargetTranslationTask.ProcessFile(IExecutingTaskFile executingTaskFile)
at Sdl.ProjectApi.AutomaticTasks.AbstractFileLevelAutomaticTaskImplementation.Execute()]]></StackTrace>
</Exception>

Anyone have any ideas on how to get this file to generate?



Moved code to a code block.
[edited by: Paul at 3:54 PM (GMT 1) on 9 Aug 2023]
emoji
Parents
  •  

    On the error... the problem seems to be related to tags in the XML but I'm not sure exactly.  Maybe try these two things:

    1. make sure you don't have any tag errors in the file, so run the tag verification
    2. take a copy of the sdlxliff and put it into another folder, and then open it as a single file project and immediately save the target file (may bot be helpful if you are using a custom XML filetype)

    Maybe also make sure the XML file was well formed in the first place.  Just in case Studio allowed you to create a project with a file that wasn't well formed but then gets stuck on the saving process at the end.

    If none of that helps try recreating the project for that source file alone, pre-translate from your TM and try to save the target file again.  Sometimes that can help.

    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
Reply
  •  

    On the error... the problem seems to be related to tags in the XML but I'm not sure exactly.  Maybe try these two things:

    1. make sure you don't have any tag errors in the file, so run the tag verification
    2. take a copy of the sdlxliff and put it into another folder, and then open it as a single file project and immediately save the target file (may bot be helpful if you are using a custom XML filetype)

    Maybe also make sure the XML file was well formed in the first place.  Just in case Studio allowed you to create a project with a file that wasn't well formed but then gets stuck on the saving process at the end.

    If none of that helps try recreating the project for that source file alone, pre-translate from your TM and try to save the target file again.  Sometimes that can help.

    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
Children
No Data