Error message "Failed to save target content: stack empty"

Hi everyone,

Working on a project in Trados Studio (2021 SR1 - 16.1.6.4276) with two Word source files, whenever I try to export or finalise either of the target files, I get the error message "Failed to save target content: stack empty". 

I have tried closing and reopening Studio and Windows, updating to the latest version of Studio, downloading and running the "TM Repair" plugin, creating a new project and generating new source files, exporting the TM to .TMX format, creating a new TM and importing the .TMX file, and opening the source file without a TM, copying all source to target and doing an Export to target, all to no avail with the same error message. In other words, spent all morning trying to figure this out.

I have tried searching the help pages and the internet in general, and come up with very little recent information on this issue. It doesn't appear to be a problem with the TM. Or with Studio, because I was able to re-export a file I finished yesterday. Is it to do with the source Word files? 

If anyone else has had this problem and successfully fixed it, I would be grateful to know how you did it. 

Thank you!

  • Hello ,

    I haven't seen the error 'stack empty' before.

    Could you please post the full error message as follows- this should help is find the issue

    Error message dialog box with an 'X' icon indicating an error. Instructions are listed: 1) Click on the icon, 2) Save the XML file to your desktop, 3) Add file to the thread.

    Lydia Simplicio | 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


    Generated Image Alt-Text
    [edited by: Trados AI at 5:12 AM (GMT 0) on 29 Feb 2024]
  • Hi Stephen,

    Here is the XML file. 

    Many thanks!

    <SDLErrorDetails time="26/05/2021 13:49:26">
      <ErrorMessage>Failed to save target content: Stack empty.</ErrorMessage>
      <Exception>
        <Type>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>System</Source>
        <HResult>-2146233079</HResult>
        <StackTrace><![CDATA[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
       at System.Collections.Generic.Stack`1.Pop()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Context.DocxWriterContext.PopFormattingGroup()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldMarkupDataEventsPublisher.PublishEventsFrom(IEnumerable`1 container)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.FieldContentRoute.Handle(FieldParagraphUnitFound paragraphUnitFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldMarkupDataEventsPublisher.PublishParagraphUnit(IParagraphUnit paragraph)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.PublishSubParagraphContent(Entity entity, Action`1 publisher, Action`1 subParagraphPreProcessor)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.WriteFieldEntity(Entity entity, Action`1 publisher, Action`1 subParagraphPreProcessor)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.HandleCurrentEntity(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.WriteTagContent(String content)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Consumers.Writer.FIeld.ComplexFieldPlaceholderConsumer.Consume(ComplexFieldPlaceholderFound placeholderFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.ComplexFieldPlaceholderFoundRoute.Handle(ComplexFieldPlaceholderFound complexFieldPlaceholderFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldMarkupDataEventsPublisher.PublishFieldPlaceholder[T](IFieldPlaceholderFound fieldPlaceholder)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.FieldPlaceholderFoundRoute.PublishField[T](IFieldPlaceholderFound fieldPlaceholderFound, Boolean hasTranslatableInstrText)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.FieldPlaceholderFoundRoute.Handle(FieldPlaceholderFound fieldPlaceholderFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.MarkupDataEventsPublisherService.VisitPlaceholderTag(IPlaceholderTag tag)
       at Sdl.FileTypeSupport.Framework.Bilingual.PlaceholderTag.AcceptVisitor(IMarkupDataVisitor visitor)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.MarkupDataEventsPublisherService.PublishEventsFrom(IEnumerable`1 container)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ParagraphUnitEventsPublisherService.PublishNonEmptyActiveParagraph(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ParagraphUnitEventsPublisherService.PublishParagraphUnitAndNonEmptyActiveParagraph(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ReplaceTargetContentService.PublishParagraphUnitAndUpdateReplacedContentPosition()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.ReplaceTargetContentRoute.Handle(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Publish(Entity parsedEntity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Parser.DocumentParser.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.DocumentWriter.Process()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.SequencedFilesWriterService.WriteParagraphsFoFile(KeyValuePair`2 paragraphsInFile, String extractedArchivePath, String targetFolderPath)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.SequencedFilesWriterService.WriteFiles(SequencedFilesWriterServiceConfiguration configuration)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.SequencedFilesWriterService.Execute(SequencedFilesWriterServiceConfiguration configuration)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.Writer`2.Write(SequencedFilesWriterServiceConfiguration configuration)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.FileWriter.WriteFiles[TService](SequencedFilesWriterServiceConfiguration config)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.FileWriter.WriteAllFiles()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.FileWriter.WriteFiles(String extractedArchivePath, String targetFolderPath)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.DocxWriter.WriteFiles()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.DocxWriter.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.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.Tmfc.TmfcReaderImpl.vv_Visit(TmfcReaderImpl* , FrameworkFileContainerField* field)
       at FrameworkFileContainerField.vv_AcceptFrameworkVisitor(FrameworkFileContainerField* , FrameworkFieldVisitor* visitor)
       at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.vv_VisitStartEndField(TmfcReaderImpl* , StartEndField* startEnd)
       at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.b_VisitNext(TmfcReaderImpl* )
       at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReader.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
       at Sdl.TranslationStudio.Editor.TranslationEditor.SaveMonolingualAsJobRequest.Execute(IJobExecutionContext context)
       at Sdl.Desktop.Platform.Implementation.Services.Job.<_worker_DoWork>b__47_0()
       at Sdl.Desktop.Logger.Log.Resources(Object message, Action action)
       at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>SDL Trados Studio</ProductName>
        <ProductVersion>Studio16</ProductVersion>
        <EntryAssemblyFileVersion>16.1.6.4276</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Famille</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1036</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>SUZANNEBREAD6BD\Suzanne</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>SUZANNEBREAD6BD</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>3122516 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

  • I posted a reply but it seems to have disappeared, so I'm posting it again just in case. Apologies if it now appears twice...

    Many thanks!

    <SDLErrorDetails time="26/05/2021 13:49:26">
      <ErrorMessage>Failed to save target content: Stack empty.</ErrorMessage>
      <Exception>
        <Type>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>System</Source>
        <HResult>-2146233079</HResult>
        <StackTrace><![CDATA[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
       at System.Collections.Generic.Stack`1.Pop()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Context.DocxWriterContext.PopFormattingGroup()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldMarkupDataEventsPublisher.PublishEventsFrom(IEnumerable`1 container)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.FieldContentRoute.Handle(FieldParagraphUnitFound paragraphUnitFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldMarkupDataEventsPublisher.PublishParagraphUnit(IParagraphUnit paragraph)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.PublishSubParagraphContent(Entity entity, Action`1 publisher, Action`1 subParagraphPreProcessor)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.WriteFieldEntity(Entity entity, Action`1 publisher, Action`1 subParagraphPreProcessor)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.HandleCurrentEntity(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldContentWriterService.WriteTagContent(String content)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Consumers.Writer.FIeld.ComplexFieldPlaceholderConsumer.Consume(ComplexFieldPlaceholderFound placeholderFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.ComplexFieldPlaceholderFoundRoute.Handle(ComplexFieldPlaceholderFound complexFieldPlaceholderFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.Field.FieldMarkupDataEventsPublisher.PublishFieldPlaceholder[T](IFieldPlaceholderFound fieldPlaceholder)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.FieldPlaceholderFoundRoute.PublishField[T](IFieldPlaceholderFound fieldPlaceholderFound, Boolean hasTranslatableInstrText)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.FieldPlaceholderFoundRoute.Handle(FieldPlaceholderFound fieldPlaceholderFound)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.MarkupDataEventsPublisherService.VisitPlaceholderTag(IPlaceholderTag tag)
       at Sdl.FileTypeSupport.Framework.Bilingual.PlaceholderTag.AcceptVisitor(IMarkupDataVisitor visitor)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.MarkupDataEventsPublisherService.PublishEventsFrom(IEnumerable`1 container)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ParagraphUnitEventsPublisherService.PublishNonEmptyActiveParagraph(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ParagraphUnitEventsPublisherService.PublishParagraphUnitAndNonEmptyActiveParagraph(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ReplaceTargetContentService.PublishParagraphUnitAndUpdateReplacedContentPosition()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Writer.ReplaceTargetContentRoute.Handle(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Publish(Entity parsedEntity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Parser.DocumentParser.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.DocumentWriter.Process()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.SequencedFilesWriterService.WriteParagraphsFoFile(KeyValuePair`2 paragraphsInFile, String extractedArchivePath, String targetFolderPath)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.SequencedFilesWriterService.WriteFiles(SequencedFilesWriterServiceConfiguration configuration)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.SequencedFilesWriterService.Execute(SequencedFilesWriterServiceConfiguration configuration)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.Writer`2.Write(SequencedFilesWriterServiceConfiguration configuration)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.FileWriter.WriteFiles[TService](SequencedFilesWriterServiceConfiguration config)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.FileWriter.WriteAllFiles()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.FileWriters.FileWriter.WriteFiles(String extractedArchivePath, String targetFolderPath)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.DocxWriter.WriteFiles()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Writer.DocxWriter.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.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.Tmfc.TmfcReaderImpl.vv_Visit(TmfcReaderImpl* , FrameworkFileContainerField* field)
       at FrameworkFileContainerField.vv_AcceptFrameworkVisitor(FrameworkFileContainerField* , FrameworkFieldVisitor* visitor)
       at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.vv_VisitStartEndField(TmfcReaderImpl* , StartEndField* startEnd)
       at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.b_VisitNext(TmfcReaderImpl* )
       at Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReader.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
       at Sdl.TranslationStudio.Editor.TranslationEditor.SaveMonolingualAsJobRequest.Execute(IJobExecutionContext context)
       at Sdl.Desktop.Platform.Implementation.Services.Job.<_worker_DoWork>b__47_0()
       at Sdl.Desktop.Logger.Log.Resources(Object message, Action action)
       at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>SDL Trados Studio</ProductName>
        <ProductVersion>Studio16</ProductVersion>
        <EntryAssemblyFileVersion>16.1.6.4276</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Famille</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1036</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>SUZANNEBREAD6BD\Suzanne</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>SUZANNEBREAD6BD</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>3122516 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

  • Hi Steven,

    Have you been able to look into this any further?

    Thanks again!

  • Hello

    Apologies for the delay-

    When replying to someone, It's a good idea to tag them, so a notification is sent and replies aren't missed. (see below).

    Would you be able to share the files(s) with me swhale[@]sdl.com please and I can take a look, as it does appear to be an issue with the actual source files themselves.

    Screenshot of a Trados Studio tip showing how to tag a user in a reply to ensure they receive a notification, with a highlighted example of tagging '@Steven'.

    Lydia Simplicio | 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


    Generated Image Alt-Text
    [edited by: Trados AI at 5:12 AM (GMT 0) on 29 Feb 2024]
  • Hi

    Apologies for the delay in responding, and thanks for the tip about tagging!

    I have just sent you the file in an email with an address including "sets".

    Many thanks again!

  • Hello ,

    Thanks for the file.

    I will take a look and get back to you ASAP.

    Lydia Simplicio | 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