CELEBRATING MASS

What is the sacramental effectiveness of a Mass celebrated by a priest while not in the state of grace? Also, praying to intercessors instead of directly to God, and how to know if one’s marriage is valid in the Church.