The man once behind a beloved cartoon character made an off-color appearance in court Friday morning.

Warning: The above video contains strong language that may be unsuitable for some viewers.

SAN DIEGO (CNS/CBS 8) - Peter Robbins, who as a boy famously voiced the character Charlie Brown in the Peanuts cartoons, was scheduled to be sentenced Friday for multiple probation violations, but a judge instead granted a defense request that he be evaluated for mental competency.

Peter Robbins, 58, pleaded guilty two years ago to threatening his girlfriend and stalking a doctor who performed breast-enhancement surgery on her.

At the time, Robbins was sentenced to five years probation and ordered to enter a live-in drug treatment program and other conditions.

Robbins was re-arrested recently for probation violations, including cutting off his GPS bracelet, drinking alcohol and failing to complete domestic violence classes, said Deputy District Attorney Brenda Daly.

Upon hearing today that his attorney had requested a mental competency evaluation, Robbins told Judge Robert O'Neill that he wanted to fire Deputy Public Defender Tom Carnessale and objected vigorously to having to spend more time in custody pending an Aug. 4 hearing.

Robbins proceeded to withdraw his guilty plea.

"I am withdrawing my guilty plea," Robbins told the judge.

"Good luck on that Mr. Robbins," responded Judge Robert O'Neil.

"Good luck to you (expletive)!" shouted Robbins.

Robbins went on a tirade in Friday's hearing, cursing and shouting in the courtroom.

"You just stick me in jail for 124 days. Do you have a conscience? Do you know I have not committed any crime? You revoke my probation, I revoke my criminal threat. I never threatened this woman in order for it to be a criminal threat. She has to believe I would kill her. I wouldn't kill her. I have never had any violent behavior," Robbins told the courtroom.

Robbins continued to yell obscenities at the prosecutor and the judge before telling O'Neill, "I hope you drop dead of a heart attack."

The defendant faces three years and eight months in state prison when he is sentenced on the probation violations, Daly said outside court.

She told reporters that Robbins is a threat to the community.