brahman,
Thanks for advice! When TotalCommander invokes Compare It! by internal cm_CompareFilesByContent then everything works as expected without crashes.
Off-by-one error in highlighting searched words
The problem was absence of quotes. Check this for configuration in TC. In short, %T should be replaced with "%T\" for this to work. Anyway, Compare It! should not crash, I will fix that.