Due to essential maintenance, access to Trados cloud will be unavailable on Saturday 30 August from 00:00 to 12:00 UTC.

"Range is not valid" error - no way to dismiss it

Occurred when I tried to select all target text in Studio 2017 SR1 (going from bottom to the top). An error pops-up, which can not be dismissed and forces me to kill trados using Task Manager.

Error details:
<SDLErrorDetails time="2017-08-10 12:54:18">
<ErrorMessage>Range is not valid.</ErrorMessage>
<Exception>
<Type>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
<ParamName />
<HelpLink />
<Source>Sdl.DesktopEditor.Control</Source>
<HResult>-2147024809</HResult>
<StackTrace><![CDATA[ w AbstractFrameworkDocument.GetMarkupDataRanges(ContentRange range)
w Sdl.TranslationStudio.Editor.Comments.AddCommentCondition.IsSelectionEntireSingleRevision()
w Sdl.TranslationStudio.Editor.Comments.AddCommentCondition.GetValue()
w Sdl.Desktop.Platform.Extensions.AbstractCondition.get_Value()
w Sdl.TranslationStudio.Editor.Comments.Actions.AddCommentAction.IsEnabledWithSelection(IContentSelection selection)
w Sdl.TranslationStudio.Editor.AbstractActiveRangeAction.IsActionEnabled()
w Sdl.TranslationStudio.Editor.Comments.Actions.AddCommentAction.IsActionEnabled()
w Sdl.TranslationStudio.Api.Editor.AbstractActiveDocumentAction.UpdateAction()
w Sdl.TranslationStudio.Editor.AbstractActiveRangeAction.sideBySideEditor_Target_Entered(Object sender, EventArgs e)
w System.EventHandler.Invoke(Object sender, EventArgs e)
w System.Windows.Forms.Control.OnGotFocus(EventArgs e)
w System.Windows.Forms.Control.WmSetFocus(Message& m)
w System.Windows.Forms.Control.WndProc(Message& m)
w System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
w System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
w System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></StackTrace>
</Exception>
<Environment>
<ProductName>SDL Trados Studio</ProductName>
<ProductVersion>14.0.0.0</ProductVersion>
<EntryAssemblyFileVersion>14.1.6284.6</EntryAssemblyFileVersion>
<OperatingSystem>Microsoft Windows 10 Pro</OperatingSystem>
<ServicePack>NULL</ServicePack>
<OperatingSystemLanguage>1045</OperatingSystemLanguage>
<CodePage>1250</CodePage>
<LoggedOnUser>Biurotron\mieczu</LoggedOnUser>
<DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
<ComputerName>BIUROTRON</ComputerName>
<ConnectedToNetwork>True</ConnectedToNetwork>
<PhysicalMemory>16753196 MB</PhysicalMemory>
</Environment>
</SDLErrorDetails>

  • Unknown said:
    Also the general idea of displaying meaningless/cryptic error dialog boxes should be reconsidered by developers. I don't get it.

    We do have an item of work to try and do something more with these.  It's not always easy as sometimes the messages are generated by .NET and not Studio itself.  We also can't always know exactly what they are telling us and more detail is needed to find the issue.  But we do try to improve these messages and have already improved many even if you have not noticed this.

    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

  • Thanks for your answer Paul. It's nice to know that someone is actually thinking about these issues.
    Perhaps .NET could be told to save those messages in a log file, rather than bothering users with meaningless feedback?
    I also noticed in SR1 that when I get the "object reference not set to an instance of an object" error (which does occur randomly), the editor refuses to accept any further keyboard input and I have to restart Studio to be able to continue with editing, fortunatelly without resorting to the task manager in this case.
    Is it the result of these error-handling improvements you are referring to?
    I am asking this, because this behaviour is really annoying. Before that I was able at least to fnisish the sentence I've been working on before restart. Now I have to leave it as is, unfinished and when I finally get back to where it stopped, I sometimes forget about many things.
  • Here is a simple way to generate the "Range is not valid" error in Studio 2017 (fully up-to-date).

    This is probably similar to what happened to Krzysztof.

    First type Ctrl-Home to move to the top of the file. This places the cursor at the left-hand side of the file header tag.

    Then press the right arrow key.

    I have tried this in two projects and in both cases the "Range is not valid" error occurred.

    Pressing Escape seems to dismiss the error, but at times I have ended up in a loop where the error keeps popping up and cannot be dismissed.

    I am not sure what I did to end up in the loop.

    Regards,
    Bruce Campbell
    ASAP Language Services
  • I get the same issue but in my case the trigger doesn't include any use of the keyboard. It happens when:

    • I'm working on multiple files with a filtered view (Draft and Not translated) to be precise.
    • There are 2 or more file header tags shown together (like in the screenshots)
    • Double clicking somewhere on the second, third, etc. tag (not just dragging or typing on) seems to cause the error. I couldn't reproduce these errors when clicking anywhere in the first file header tag.

    I have attached 2 zip files with 2 of these errors (one causes a loop that forces me to force-quit Studio and the other one can be dismissed with the escape key) with their respective screenshots. On both, I've included where exactly I was clicking because the location/type of tag seems to make a difference, but I'm just guessing.

    No loop:

    no loop.zip

    With loop:

    with loop.zip

  • Hi,

    Could you confirm, please if you still receive the same error with Studio 2017 ( with CU11 or CU 12 installed) or when using Studio 2019?

    Thank you

    Sorina
    QA Engineer