When any of the objections mentioned in Section 1004 appears on the face of the accusatory pleading, it can be taken only by demurrer, and failure so to take it shall be deemed a waiver thereof, except that the objection to the jurisdiction of the court and the objection that the facts stated do not constitute a public offense may be taken by motion in arrest of judgment.
Ca. Pen. Code § 1012