The mystery of the “Object reference not set to an instance of an object” error in Trados Studio
“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 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...
You can convert all straight quotes in the text into chevrons with one replacement.
We already know how to quickly convert straight quotes into guillemets (chevrons) in Trados Studio and memoQ. Sometimes you get to do this not in the “cat” (that is not in the CAT tool, a computer-aided translation tool) but right in the so-called “monotext,” i.e., the text in the target language in Word.
The easiest way is to use regular expressions that are indispensable in such cases.
In Word, press CTRL+H. The Find and Replace dialog window appears:
Press the More >> button there. Additional parameters will appear in the dialog window:
In this window, select the Use wildcards check box; it turns on the mode of regular expressions. Next, enter in the Find field: request \"([!^13]@)\"
, and in the Replace field: code «\1»:
Like in Trados Studio and memoQ, this replacement should not be performed blindly. The text may contain unusual cases or simply mistakes, and blind autocorrect will “miss.”
In other words, pressing the Replace All button is reasonable only if you are 100% sure that all straight quotes in the text are actually used as quotes (and not as inch marks, for instance), that all of them are in pairs, etc. Generally, it’s better to go through all the cases one by one pressing the Replace button and checking whether the replacement is correct. Usually, there are only a few quotes in the text.
Hidden text function
helps to see non-visible defects
Look at the picture:
It is a screen shot from Word document. Yes, it is the first stanza from famous Lewis Carroll's “Jabberwocky.” Of course, there are many non-existing words there, that is why Word underlines them. But everything else seems to be ok.
BUT no: there are many defects in these four lines! The problem is your eyes do not catch them, as they are hidden.
To see them, you need to make the hidden text visible by pressing CTRL+SHIFT+8 (number 8, not F8 key) or clicking the following button on the ribbon:
(It is on the Home tab of the Word ribbon.) Then we see:
As we can see, the defects are many. The 1st line ends with multiple trailing spaces. There are several double spaces in the 2nd one. (This is the only problem on the picture, that could be caught with “unaided eye.”) The 2nd and the 3rd lines have line breaks instead of paragraph signs (and due to this, lines 2-4 are actually a single paragraph with two line breaks). The 4th line contains unnecessary non-breaking spaces instead of regular ones. (The small circlets here are not the degree signs, they are non-breaking spaces. We will discuss them in the upcoming posts.)
Strictly speaking, all these issues are errors, and they require correcting. And, to catch such issues, you need just to make them visible.
When working on a text, you sometimes need to enter some special character, for example, euro sign, degree sign, section mark etc. Of course, you can open Character Map each time and copy the necessary characters from there. But it lasts so long. If you need to enter many such characters, you will naturally seek a way to do this quickly.
There is a relatively easy and quick way to insert special characters into the text. To do this, you need to press ALT key and then to enter a special code on the additional numeric keypad (yes, exactly: entering via numeric keys above the basic keypad with letters is impossible). It is so called entering via ALT codes. A special 4-digit code is assigned to each character. Try to remember several ALT codes for the most frequently used characters. But what to do, if there is no separate numeric pad at all, for example, on a 13" laptop? In this case, Fn key helps: it allows to enter digits by letters keys :) Here are the equivalents:
Here is how they look on the keyboard:
Subscribe to our mailing list
You have subscribed successfully.