Generally speaking, there are 2 basic components to every crime: the criminal act (actus reus) and the criminal intent (mens rea). Thus, the prosecution must prove not only that the defendant committed an act prohibited by the law, but that he/she also had the intent to commit the criminal act beyond a reasonable doubt for the defendant to be adjudged guilty.
Accident/Mistake of Fact
If a criminal act is committed accidentally, i.e., without criminal intent or an act of recklessness that rises to the level of criminal negligence, the mens rea is negated. Likewise, if an individual honestly and mistakenly believes a fact that would render a criminal act justified, no crime actually occurs.
Self-Defense/Defense of Others/Defense of Property
Under California law, self-defense (and the defense of others) justifies a criminal act when an individual 1) reasonably believes that he/she is in imminent danger of being killed, seriously injured, or unlawfully touched; 2) believes that immediate force is necessary to prevent the imminent danger; and, 3) the amount of force exerted does not exceed the amount of force necessary to defend against the imminent danger. An individual in the state of California may also reasonably defend his/her home and property when it is reasonably believed that either is threatened by imminent harm or danger. Under this theory, you may justifiably use force against an intruder who breaks into your home or a trespasser who refuses to leave your property.
A defendant may be not guilty by reason of insanity if it can be proved by a preponderance of the evidence that the crime was committed only because 1) the defendant didn't understand the nature of his/her act; or, 2) he/she couldn't distinguish right from wrong. Unlike other criminal defenses, the insanity defense does not completely absolve the individual from criminal liability; instead of serving a sentence in the county jail or state prison system, a defendant found not guilty by reason of insanity will be confined to a state mental health facility.
Voluntary intoxication is not a valid defense to a criminal act, primarily because it is considered to be "reasonably foreseeable" that a criminal act may occur if an individual chooses to become intoxicated through the use of drugs or alcohol. However, if the intoxication is involuntary - for example, someone secretly slips a drug into your drink - the criminal intent behind any criminal act committed under the influence is negated and the charges must be dismissed.
Similar to self-defense, a criminal act compelled by the reasonable belief that one's life is in immediate danger because of another's threats or menacing actions is excused under California law. Likewise, criminal charges must be dismissed when a criminal act is committed only to avoid an even greater harm under the necessity defense.
Police misconduct, abuse and excessive force are serious problems in California and can result in significant doubt of a defendant's criminal liability. Examples of police misconduct that can result in a dismissal of charges include, but is not limited to: planting evidence; embellishing facts in police reports or testimony; unwarranted arrests and lack of probable cause; coerced confessions; and, entrapment. Entrapment is especially common in child pornography and drug cases. If any of these things have happened in your case, it is imperative to tell your lawyer as soon as possible to help win your case.