There have been some reports of HandBrake completing the encode before it reaches the end of the source MKV file (typically, from a MakeMKV Blu-ray rip). As a workaround, remuxing the source file with mkvmerge GUI before feeding it to HandBrake should do the trick.
viewtopic.php?f=11&t=24083
viewtopic.php?f=11&t=24125