MicrosoftTranslator / DocumentTranslator-Legacy

Microsoft Document Translator (Archive) - Replaced by the MicrosoftTranslator/DocumentTranslation project in this repository.
Other
410 stars 154 forks source link

Object Reference not set to an instance of an object #52

Open rachael-ross opened 6 years ago

rachael-ross commented 6 years ago

Just installed the latest release 1.5OU (msi installation) and I've created a Text translation api service on Azure, etc. I have a bunch of html files that have a mixture of html, javascript, english and chinese that I want to translate into all english. The Document Translator will successfully translate some of them but not others with an exception message of "Object Reference not set to an instance of an object". I don't know what it's hanging up on. I've tried cloning the whole repo, but don't have support installed for building WIX installers and don't have the Power Point Object Library. How can I figure out what's going on? I've attached a screenshot of the error and an example of one of the files it fails on (I appended .txt for github restrictions)

Can't find any log files and nothing in Event Viewer. I've also tried setting the language to Chinese & Auto-Detect. Same result

image

index-7.html.txt

rachael-ross commented 6 years ago

Anyone? Please help.

chriswendt1 commented 6 years ago

The app catches errors too aggressively. In order to debug you will need to turn off catching and step through one by one, then you can remove or modify the catch that prevented you from see or acting o this particular error. There is a global Visual Studio option to turn off catching in debug mode, without changing the code. Version 2.0 and later use Nuget packages for the Office interoperability. You should be able to compile and run without installing separately. You still need to install Wix manually.

madbrenner commented 3 years ago

@chriswendt1 @rachael-ross I encountered this issue recently and tracked down the problem (for me at least) to the AddNodes loop, where the child variable became null, but the loop continued. I have opened a PR with a fix for this here: https://github.com/MicrosoftTranslator/DocumentTranslator/pull/149