When the objections mentioned in Section 504 appear upon the face of the indictment or information, they can only be taken by demurrer, except that the objection to the jurisdiction of the court over the subject of the indictment or information, or that the facts stated do not constitute a public offense, may be taken after the arraignment of the defendant, or may be taken at the trial, under the plea of not guilty, and in arrest of judgment.
Okla. Stat. tit. 22, § 512