The Texas man accused of the murder of six people had a long history of violent conduct, Situations like this in the past have been prevented by the early intervention of authorities. Offenders like this display a pattern of repeat criminality which can be identified if you know what you are looking for.
I think considering he had already been violent against kids and other people, and the fact that here was a protection against abuse order more needed done. I think considering his history he should have been made to go for psychological evaluation to figure out how much of a threat he really was and what he was cable of.
We shouldn't arrest people for crimes they have not yet committed. I believe criminals who have a history of repeat offenses should be required to attend therapy as a part of their punishment and rehabilitation. If we simply held people for crimes they "might" commit, nearly everyone stuck in rush hour traffic would be sent to jail.
Domestic violence unfortunately is fairly common and it would be impossible for the police to stop things like this from happening. The protective order against Haskell (the killer) was dismissed in October of 2014 so it looks like he was making positive progress on the situation and the divorce. There's no way for the police to predict who will snap like this.
This is truly a terrible incident, but I don't think it could've been avoided. You can't arrest people and hold them without them actually having committed a crime. It would make society so much worse if people were held in jail based on possible future actions. I am not sure what could be done about this but there was nothing that the police could have done.