While Sandra Bullock does not get stabbed by her ex-husband in the film, the character she plays, Kate Forster, does receive a letter from a mysterious man, Alex Wyler, who claims to be living in the lake house she's now renting two years in the future. There is no mention of an ex-husband or violence in the movie.
Perhaps you're thinking of a different movie?