In IE10 crashes, 'Unable to evaluate expression' error occurs while accessing dom elements

In IE10, when accessing the elements by document.getElementById('element') it throws:

Unable to evaluate expression

And IE10 browser crashes.

While accessing any node element's attribute like element.offsetHeight it throws the above mentioned Js error and the browser crashes (IE10)