A jury convicted him of attempted first-degree murder, but North Carolina’s appeals court found a problem during his trial.