Error when trying to generate Preview in Studio 2017: Value cannot be null. Parameter name: stream

I am no longer able to generate preview of xlf files. I get this error message:

Error message window in Trados Studio stating 'Value cannot be null. Parameter name: stream' with an OK button.

I recently updated to this version:

Version information for SDL Trados Studio 2017 SR1 - 14.1.10016.54660 displayed at the bottom of the program window.

One of our linguist is having the same problem with this version:

14.1.10017.54688
Some of my colleagues have
14.1.10011.20356
and it runs without problems.
This problem is new, so we suspect it is a problem with the later versions. Can you fix the bug urgently, or can we downgrade to a fully functional version?
This is rather urgent!
thanks


Generated Image Alt-Text
[edited by: Trados AI at 11:17 AM (GMT 0) on 29 Feb 2024]
emoji
  • Hi Tina, SDL Community members, I found out that it works when the document behind is a word but not when it's an XML like it's the case for us who are facing this issue with that error message. Hope this can help to diagnose the issue and have it fixed as soon as possible.

  • Hello ,

    It would be helpful if you could post the full error stack please as this provides a lot of information-

    Here is a community Wiki that explains the type of information we need and how to post it -

    https://community.sdl.com/product-groups/translationproductivity/w/customer-experience/4159/how-to-get-help-quickly-in-the-sdl-community-technical-forums

    Also please explain exactly when you get this message and if you are using perhaps Worldserver or Groupshare etc.

  • Hi Steven,

    I work in Tina's team and I'm the linguist she mentioned is being affected.

    We work with translation files that are fed into Trados in XML format. During translation of the files, we need to access the original file as it contains specific XML fields allowing us to get additional info on the legal context of specific words and expressions. To do so, with a segment selected, we go to "View" and then click onto "Preview" (the eye icon) and a panel gets prompted on the right:

    Trados Studio interface showing an error message in a red box stating 'El valor no puede ser nulo. Nombre del par metro: stream' when trying to access the 'Origin' tab in the preview panel.

    The issue is that when we try to click onto the "Origin" tab (to see the useful hidden contents of the original file fed into Trados), an error message is prompted (the one mentioned by Tina - mine is in Spanish):Close-up of the error message in Trados Studio with the 'Origin' tab selected, displaying 'El valor no puede ser nulo. Nombre del par metro: stream' in a red-bordered dialog box.

    She uses Worldserver to import the exported XML data into Trados. I'm the linguist so I don't have a clear overview of what happens before I get the Trados package. In any case, I hope I could provide you with additional information for troubleshooting or understanding what the issue is, when it occurs and how it can be fixed. Also, as mentioned in a previous comment, this seams to affect only those Trados files that have been generated from an XML, as I don't have this issue when I attempt to access the preview of a Trados file generated from a Word document:

    Trados Studio screenshot showing the 'Preview' panel on the right with the 'Origin' tab selected, but without any visible error message.

    Please find attached the requested full stack error.

    <SDLErrorDetails time="17/07/2019 17:48:10">
      <ErrorMessage>El valor no puede ser nulo.
    Nombre del parámetro: stream</ErrorMessage>
      <Exception>
        <Type>System.ArgumentNullException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <ParamName>stream</ParamName>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2147467261</HResult>
        <StackTrace><![CDATA[   en System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
       en System.IO.StreamReader..ctor(Stream stream)
       en Sdl.FileTypeSupport.Bilingual.WsXliff.WsPreviewXmlTweaker.WriteOutDefaultStyleSheet(String transformPath)
       en Sdl.FileTypeSupport.Bilingual.WsXliff.WsPreviewXmlTweaker.DoTweak(INativeOutputFileProperties outputFileProperties)
       en Sdl.FileTypeSupport.Bilingual.WsXliff.WsPreviewFileTweaker.Tweak(INativeOutputFileProperties outputFileProperties)
       en Sdl.FileTypeSupport.Framework.Core.Utilities.NativeApi.AbstractFilePostTweaker.TweakFilePostWriting(INativeOutputFileProperties outputFileProperties)
       en Sdl.FileTypeSupport.Framework.Integration.FileGenerator.ExecuteTweakers(PostGenerationMessageReporterAdapter messageAdapter)
       en Sdl.FileTypeSupport.Framework.Integration.FileGenerator.RunPostWritingOperations()
       en Sdl.FileTypeSupport.Framework.Integration.FileGenerator.FileComplete()
       en Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.FileComplete()
       en Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.FileComplete()
       en Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.FileComplete()
       en Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.FileComplete()
       en Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.vv_Visit(TmfcReaderImpl* , FrameworkFileContainerField* field)
       en FrameworkFileContainerField.vv_AcceptFrameworkVisitor(FrameworkFileContainerField* , FrameworkFieldVisitor* visitor)
       en Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.vv_VisitStartEndField(TmfcReaderImpl* , StartEndField* startEnd)
       en Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReaderImpl.b_VisitNext(TmfcReaderImpl* )
       en Sdl.FileTypeSupport.Bilingual.Tmfc.TmfcReader.ParseNext()
       en Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
       en Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
       en Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
       en Sdl.TranslationStudio.Editor.Previews.GeneratePreviewJobRequest.CreatePreviewFile(IFileTypeManager fm, IAbstractGenerator generator, GenerateType generateType)
       en Sdl.TranslationStudio.Editor.Previews.GeneratePreviewJobRequest.Execute(IJobExecutionContext context)
       en Sdl.Desktop.Platform.Implementation.Services.Job.<_worker_DoWork>b__46_0()
       en Sdl.Desktop.Platform.Implementation.Services.Log.Resources(Object message, Action action)
       en Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e)
       en System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       en System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>SDL Trados Studio</ProductName>
        <ProductVersion>14.0.0.0</ProductVersion>
        <EntryAssemblyFileVersion>14.1.10017.54688</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 7 Home Premium </OperatingSystem>
        <ServicePack>Service Pack 1</ServicePack>
        <OperatingSystemLanguage>3082</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>Tony-PC\Tony</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>TONY-PC</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>6272880 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    Thanks for your time and your assistance.

    Regards,

    Tony Conde

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 11:18 AM (GMT 0) on 29 Feb 2024]
  • Hello Steven

    Any news on this - you can see the full details from Tony below.

    Thanks

  • Hello ,

    My apologies for the delay in getting back to you (please see the 'signature' below).

    The error stack clearly references WorldServer XLIFF files (trying to be read) being read as XML as being the issue here

    FileTypeSupport.Bilingual.WsXliff.WsPreviewXmlTweaker

    From the screen shots you provided, you are no longer trying to preview XML files- as these have been converted to xlf- before import into Studio (Xliff)

    Screenshot showing Trados Studio interface with a file path highlighted, indicating the file type as .xlf.sdlxliff.

    Therefore, its impossible (afaik) to generate a preview as its the conversion that has is causing the issues.

    An option here would be to adapt your workflow and ensure the files are xml.sdlxliff and not xml.xlf.sdlxliff

    Screenshot of a Trados Studio tip suggesting to type @username when replying to ensure the user receives an email notification.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 11:17 AM (GMT 0) on 29 Feb 2024]
  • Hello

    I do not understand this. It works for everyone else, except for Tony and myself - same files, same project. And it worked for us as well until recently. I am trying to have my Studio downgraded to see if this will solve the issue.

    best regards

    Tina

  • Hi Steven

    Thanks for the feedback but, as Tina pinpointed, this explanation doesn't clarify why some people can and others can't preview the original file given the fact they're all generated by the same workflow. Can you have this investigated a bit further? I'm unable to have my current version downgraded so I'll have to work on this weekend's package without having access to this feature. Thank you.

    Regards,

    Tony

  • Have you tried resetting Studio? If this is working for others using the sae version of Studio then I'd recommend you carry out a reset and try again.

    You could use this app for the reset and this will also explain what you will lose by carrying out a reset before you do it:

    appstore.sdl.com/.../

    But if you'd rather do this manually then rename this folder (just add _old to the end or something, it's not important what you rename it to) and restart Studio:

    c:\Users\[USERNAME]\AppData\Roaming\SDL\SDL Trados Studio\14.0.0.0

    So the path would become this:

    c:\Users\[USERNAME]\AppData\Roaming\SDL\SDL Trados Studio\14.0.0.0_old

    If you can't find this folder then you need to unhide your hidden files/folders:

    www.howtogeek.com/.../

  • Hi Paul

    I don't know whether the other people that Tina mentioned have access to that feature do have the same mention as me (Tina and I don't event share the same version number). What I meant to say in my previous comment is that Steven considers it's a Worldserver extraction issue and - if this would be the case - nobody should have access to that feature, as the all files ae generated by the same workflow.

    No, I haven't reset Trados. Would this still be needed after this answer? Thanks.

  • No, I haven't reset Trados. Would this still be needed after this answer? Thanks.

    I think Steve was probably guessing based on the mention in the stack trace.  I think you should do two things:

    1. Make sure you are fully updated to the latest version of 2017

    2. If you already are or if it still fails after that run a reset

    You said this:

    some people can and others can't preview the original file

    So in this case it's clear the problem lies with your installation.  I'm not sure what you are previewing exactly but I think Steve is confusing the XML preview which will not be possible for you as the files are coming from WorldServer first.  Perhaps the update will reset your WorldServer components and resolve this for you.

    You could also try manually fixing that part by running this:

    c:\ProgramData\Package Cache\SDL\SDLTradosStudio2017_SR1\modules\WorldServerComponents.msi