Proceeding to stage 2 in fighting the “Object reference not set to an instance of an object” error in Trados Studio
This is the second (and not final yet) part of the post about the multifaceted Object reference not set to an instance of an object error. You can find the first part here.
The error has many causes which means there are many potential ways to get rid of it, too.
If Trados Studio gets started in a regular way and the message about this error appears when you switch between display modes (Projects, Files, Editor in the lower left corner) or dialog boxes, the method below may help sometimes:
Open Trados Studio.
Go to the mode where this error appears.
Click the View tab of the ribbon > press the Reset Window Layout button:
In the box that appears press the OK button.
All the settings for displaying boxes will be restored to their factory defaults.
In case this method doesn’t help, there are others, and we will tell about them, too.
Direct import of Trados Studio translation memories has been added. Previously, you would need to export an SDLTM file into an exchange TMX format first (translation memory exchange) and then import it into memoQ. Starting from version 9.4, memoQ allows importing SDLTM files instantly, without any intermediate conversions.
Integration with Protemos has been implemented. From now on, a single click is enough to create a memoQ project out of a Protemos project or, vice versa, immediately create a symmetric Protemos project for an existing memoQ project.
Numerous changes and improvements concerning the use of machine translation plugins.
In most cases, projects that have disappeared from Trados Studio can be restored.
Another post about Trados Studio errors. The symptoms of the disease are as follows: one fine day you start Trados Studio, and it displays the “An error occurred whilst trying to determine the file version” message:
You press the OK button (there is nothing else to press here anyway). Trados Studio starts as usual, but the list of projects in the Projects section is pristine: there is not a single project. Trados Studio itself works great though, even your custom shortcuts are still there.
The error can be caused by several reasons. SDL described them in this article. Most likely, Trados Studio is not to blame. A general reason is that something has happened to the project files that were already imported into Trados Studio. When starting, it tried to download them but failed due to some reason.
A list containing possible reasons is provided below, from the easy to the complicated.
1. The easiest thing that could have happened: you’d deleted, renamed, or replaced the folder containing the project files. It’s no wonder that Trados Studio failed to download them—it just couldn’t find them in the accustomed place.
Solution: close Trados Studio, bring the files back to the folder where they were (if they’re not lost for good), and then start Trados Studio again. After that, you’ll have to go down the files of all the projects you need and click the files with the SDLPROJ extension in each of them. These are files with settings storing information on what files belong to the project and where they are—Trados Studio will catch them and “get its memory back.”
2. Another possible reason: something has blocked the access to the files: they are where they have to be, but Trados Studio can’t reach them. Oftentimes, it turns out to be a cold-blooded antivirus program that had found the project files suspicious by mistake.
The solution is obvious: “comfort” your antivirus or discover which program had blocked access to the files.
3. The third reason: the project files are physically damaged. This case is the most difficult one as this issue has nothing to do with software but comes from hardware.
“Object reference not set to an instance of an object” is a puzzling and rather unpleasant error in Trados Studio
Object reference not set to an instance of an object is one of the most unpleasant error messages in Trados Studio. Actually, it seems to be coming not from Trados Studio itself but somewhere from .NET. It may appear in other programs, too.
It has a hundred possible reasons, and that what makes it so unpleasant. We’ve just discovered one of those: the message appears when you try to open in Trados Studio an SDLXLIFF file containing segments with a pilcrow.
As a matter of fact, pilcrows are not supposed to be inside segments in the first place, only between them—we should give credit to Studio for that. When it is necessary to split a line right inside the segment, one usually inserts a line break with the help of SHIFT + ENTER. However, as practice shows, anything may happen during the import of files created in other programs into Studio.
In this particular case, no countermeasures can remove the error because the pilcrows can’t be removed. Theoretically, editing of the source text might help, but it is the last refuge of the enthusiast as it may cause problems during further manipulations with the files. By default, the source text is not to be touched.
And how to get rid of this error under “normal” circumstances we’ll tell you later. There is one universal method...
Usually, this error doesn’t prevent you from translating. Nevertheless, you can get rid of it.
First, let’s figure out what causes this error.
When you create a package for translation in Trados Studio, each file you add to it gets converted into the SDLXLIFF format, and the translation is performed in this new file.
The name of the SDLXLIFF file is generated in the simplest way possible: by adding the SDLXLIFF extension to the name of the original file. Thus, a file with the name, for instance, Text_to_translate_asap.docx is transformed into the file Text_to_translate_asap.docx.sdlxliff.
By the way, it means that with the file’s name you can reconstruct the name and type of the source file used for its creation very easily. Apparently, a Trados Studio file with the name Translate_right_now!.xlsx.sdlxliff is created from the Excel fileTranslate_right_now!.xlsx.
Once the translation is completed, you face a reverse task: you need to recreate the original file replacing the source text there with the translated one. This operation is called “Clean” and stands for cleaning the source text off the file. To perform this operation, Trados Studio has to store the source file somewhere.
If the source file is small, it is stored right inside the SDLXLIFF file. If it is big, Trados Studio remembers its location to return to it when needed later.
What file’s size is considered small and what is recognized as big is determined by the parameter in Trados Studio that is hidden here:
It equals 20 MB by default. Looking ahead, we need to say that it’s worth increasing this value.
If the work on the project is performed at the same computer where it has been created, no problems usually occur as Trados Studio knows where all original files are stored. But if the files have been moved or if the package is being sent to another computer, Trados Studio will have no access to them.
If Trados Studio gives out the “Dependency file not found” message, it means that it needs the original files, but it has “lost” them. That’s why it will wonder, “Would you like to browse for this file?”—i.e., ask for specifying the path to them.
It will be great if you have the original files. Then you say “Yes” to the question and just specify the path to them. The error disappears, Trados Studio calms down and proceeds with operation as usual.
If you don’t have the original files or if you decided not to specify the path to them, answer “No” as there is no other option actually. You’ll be able to keep working on the text, but some operations with files won’t be available (in particular, Save Target As, Preview, Generate Target Translations, etc.). In most cases, you won’t need them anyway.
Generally, this error doesn’t prevent you from continuing translating: you’ll be able to finish the translation, create the return package, and send the translation to the customer. Since the package was created on their computer, such a problem is not going to puzzle them.
But there are situations when Trados Studio refuses to work because of this error. In this case, the most important is to save the translation memory you’ve been using. It keeps all the segments you’ve translated if you had been confirming them while translating. You’ll be able to use them in the fixed Trados Studio package.
Waste no time on copying and confirming email addresses in Trados Studio: you can move and confirm them all at once.
Let’s assume you have a Word file containing a lot of email addresses, like this one:
(All names, addresses, and phone numbers here are random.)
You have to translate this text in Trados Studio. You create a project, and the text there looks this way:
However, as you can see, the text includes a very big number of email addresses that don’t need to be translated. If you “translate” them and confirm each segment one by one, it will take much time. But there is a way to copy them to target and confirm them all in no time.
Let’s take advantage of the distinctive feature of email addresses, that is the at sign, @. We have to find and filter out all the segments containing this sign. To do this, go to the Review tab on the ribbon and enter this sign in the Search field. Since we’re looking for it in the source language only, it’s important to select In Source in the search pane:
Press the ENTER key. The work pane will feature only the segments containing the @ sign, that is, in our case, email addresses:
Now click the cell with the number of the first segment (2), scroll the list to the end, and click the cell with the number of the last segment holding the SHIFT key. All segments will get highlighted:
Now go to the Home tab and press the Copy Source to Target button.
What’s left is confirming all the filtered segments. To do this, highlight them all again, right-click the number of any cell, and change the status to Translated:
Then, go to the Review tab again and reset the filter with the Reset Filters button:
That’s how we’ve got all the email addresses copied to target cells and all the segments containing the addresses confirmed.
This method can be used for filtering and confirming any segments if they have a distinct feature that can be used for filtering.