"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>

  • Hi ,

    What method are you using to select all the Target text?

    Is this merged documents or one single file-based sdlxliff?

    Have you accidentally included the file start or end of the sdlxliff in your selection?

    Is there any unusual content in the file?

    Is this an unusually large file?

     

    Hope one of my questions triggers something useful...

    All the best,

    Alison

  • I was selecting by holding left mouse button and scrolling (what a pity thought that there is no other way to do it - e.g Select All anywhere in the menus). The file was not merged, single sdlxliff (with excel file inside). I guess, I might have accidentally included the file start (but I shouldn't Studio be be prone to this rather than locking up like that?). No unusual content. 501 TUs long (I've been selecting much longer files this way).
  • Hi ,

    When does the error occur? Simply after you've tried to highlight the text? Or have you performed an action after highlighting, that triggered the error.

    Normally if one includes the file start or end, it does not matter if all one is going to do is copy the text. If one tries to perform an action that is not possible (deleting for example) a simple message appears saying that the action cannot be performed on the file start/end but the software does not freeze. Unless there is another factor involved, such as a very large file or 'temperamental' 3rd party content for example. 

    When you say 'Excel file inside' do you mean that the original file was an Excel file, or that it is included as content in another format, a Word file for example, before conversion to .sdlxliff?

    Run a little test as follows:

    Try left-clicking once in the first segment before the first character. Now, using your mouse, drag the right-hand scroll bar down to the end of the document (without moving your cursor).

    Hold down the Shift key then left-click once in the last segment after the last character.

    It may take a moment or three but the whole text should become selected with no error message.

    If you've done exactly as I described and an error message occurs, there is definitely something wrong.

    Hopefully someone who knows more than I will be able to suggest what that might be...

    All the best,

    Ali

  • It happened after I tried to highlight the text. Orignal file was Excel. I managed to copy the text the way you are suggesting. I was just hoping that if I post it here, someone from SDL will see this and treat it as a (nasty) bug report. BTW is there any official channel users could report bugs directly to SDL ?
  • Hi again Krzysztof,

    If you were able to copy the text the way I suggested then I'm surprised your usual method didn't work. The reason I suggested the method I did is because it is easier to be more precise in what you select. I find the gradual highlighting of the text within the document more prone to failure through my shaky hands ;-))

    Regarding the 'official channel', I'm sure when  or one of the other SDL guys reads this they will be able to ask you for any further information they need to decide if this is a bug and report it. Here is as good a place as any.

    All the best,

    Alison

  • Hi Krzysztof,

    I was having the same problem with that error message, and was also forced to kill Studio repeatedly.

    As you might have noticed, one of the first things that Paul often suggests is to reset your windows layout or reset Studio.

    But there seem to be cases where these "resets" don't help. If so, it would be handy if SDL provided a Studio "Cleaner" tool.

    For example, I had a problem with the "Insert Symbols" section disappearing from the Studio "Advanced" ribbon. I had this problem for as long as I can remember, probably back to Studio 2014 or earlier.

    Reinstalling Studio or "resetting" Studio or the windows layout did not appear to help.

    Today I reformatted my hard drive and did a fresh reinstall of Windows 10 and all my programs, including the latest version of Studio. That solved the disappearing "Insert Symbols" problem along with several other Studio problems that had been plaguing me for years.

    I may be wrong, but this seems to indicate that something more than a Studio "reset" or windows layout "reset" is needed in some cases.

    If this is truly the case, it would be nice if there was a Studio "Cleaner" tool that would eliminate absolutely every trace of old and new versions of Studio from your system and make a fresh install of Studio possible without having to wipe your hard drive and reinstall the operating system and all programs.

    Nuance, for example, provides a "Cleaner" tool for every new version of Dragon.

    Like Studio, Dragon is a huge program cobbled together from old and new pieces and I have had to use the Dragon "Cleaner" several times in the past to get rid of mysterious errors that just would not go away otherwise. I actually learned about the "Cleaner" from Nuance support. They suggested it when they were unable to track down mysterious errors.

    By the way, it appears that I got rid of the error message you are having by rearranging my Studio windows to a non-standard layout. Not that I am recommending that. I think I just got lucky for a change.

    Best regards,
    Bruce Campbell
    ASAP Language Services
  • Hi Bruce,

    That's not a bad idea if all else fails. When I'm testing Beta builds if I want a clean install then after uninstalling I manually remove the following folders (or tun a DOS batch file to do the same thing):

    c:\Users\[USERNAME]\Documents\Studio 2017\Projects\projects.xml

    c:\Users\[USERNAME]\Documents\Studio 2017\Project Templates\

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

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

    c:\Users\[USERNAME]\AppData\Roaming\SDL\ProjectApi\14.0.0.0\

    c:\Users\[USERNAME]\AppData\Local\SDL\SDL Trados Studio\14\

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

    c:\ProgramData\SDL\SDL Trados Studio\14\

    c:\ProgramData\SDL\SDL Trados Studio\14.0.0.0\

    c:\ProgramData\SDL\SDL Trados Studio\Studio5\

    c:\Program Files (x86)\SDL\SDL Trados Studio\Studio5\

    Then reinstall Studio. If that still fails to help then I'd recommend logging a support case. But perhaps all you need as a clean up tool is something that automates this. It is a bit drastic but does a good job of removing everything to be able to start afresh.

    Regards

    Paul

    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

  • Hi Paul,

    Yes, a cleaning tool to shutdown (if necessary) and uninstall *all* versions of Studio and then delete the associated folders would be very useful.

    Another tool to shutdown and reset Studio would also be handy.

    That way you would not have to keep repeating yourself in the forums and listing the folders that have to be deleted to reset Studio or to thoroughly clean Studio off a computer.

    All you would have to tell users is to go to the Studio folder in the start menu and run StudioReset or StudioCleaner (which would then first warn people in detail of what they were going to do).

    Running a tool like this would be much easier than trying to remember a list of folders and then carefully deleting or renaming each of them, especially since the list would probably differ based on the version of Studio installed.

    When a new version of Studio was installed, it would be nice if new reset and cleaner tools were also automatically installed.

    That way people wouldn't have to search through the forums trying to find this information when they need it.

    I can't imagine this would be very difficult for the programmers to set up and it would probably save you a lot of time dealing with users.

    Best regards,
    Bruce Campbell
    ASAP Language Services
  • Also the general idea of displaying meaningless/cryptic error dialog boxes should be reconsidered by developers. I don't get it. What kind of information such messages like "Range is not valid" or "object reference not set to an instance of an object" are conveying to users especially if they are given no choice of action? They are just a pure annoyance, such as the pop-up balloons that can not be switched off in the editor, which obscure the editing view... I've been using trados for years and frankly I am really annoyed that new problems emerge with each new release/update which are not quickly (or never) dealt with.
  • Unknown said:
    All you would have to tell users is to go to the Studio folder in the start menu and run StudioReset or StudioCleaner (which would then first warn people in detail of what they were going to do).

    Maybe... although I can still imagine a few problems with permissions and different level of clean up we should entertain.  I think I will add such a tool to our backlog though... we could do a clever job of this in the appstore team with sensible options including info on what the impact of each one will be so users can backup where appropriate first.

    Thanks for the idea.

    Regards

    Paul

    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