State attorney fatally wounded in court case after firearm filed as evidence goes off