[1, 2] In this jurisdiction the rule is well established that a warrant may be quashed only for its failure to charge a crime or a lack of jurisdiction of the court to try the case — defects which appear on the face of the record. In ruling upon a motion to quash the judge rules only upon a question of law. He is not permitted to consider “extraneous evidence,” that is, the testimony of witnesses or documents other than the specific statutes or ordinances involved. “Therefore, when the defect must be established by evidence aliunde the record, the motion must be denied.” State v. Cochran, 230 N.C. 523, 525, 53 S.E. 2d 663, 665 (1949). See also State v. Vestal, 281 N.C. 517, 189 S.E. 2d 152 (1972); State v. Lee, 277 N.C. 242, 176 S.E. 2d 772 (1970); State v. McBune, 276 N.C. 60, 170 S.E. 2d 913 (1969); State v. Cooke, 248 N.C. 485, 103 S.E. 2d 846 (1958), appeal dismissed, 359 U.S. 951, 3 L.Ed. 2d 759, 79 S.Ct. 737 (1959); State v. Andrews, 246 N.C. 561, 99 S.E. 2d 745 (1957).
With one exception, the same rule applies to a motion to quash a bill of indictment. See State v. Bass, 280 N.C. 435, 186 S.E. 2d 384 (1972) (authorities collected at 450-51, 186 S.E. 2d at 395); State v. Allen, 279 N.C. 492, 183 S.E. 2d 659 (1971); State v. Wilkes, 233 N.C. 645, 65 S.E. 2d 129 (1951). The exception relates to conditions precedent to the finding of a valid bill of indictment by the grand jury. G.S. 9-23 (1969) provides that defects or irregularities in the drawing or organization of the grand jury must be challenged by a motion to quash the indictment, made before the petit jury is sworn and impaneled to try the issue. Upon such a challenge the judge hears evidence and finds the facts upon which he bases his conclusions of law. State v. Wright, 274 N.C. 380, 163 S.E. 2d 897 (1968); Miller v. State, 237 N.C. 29, 74 S.E. 2d 513, cert. denied, 345 U.S. 930, 97 L.Ed. 1360, 73 S.Ct. 792 (1953).
 When the defense is that the warrant or indictment charges the violation of an unconstitutional ordinance or statute, the motion to quash is appropriate provided the constitutional infirmity appears upon the face of the record. “In passing upon such motion, the court treats the allegations of fact *162in the warrant, or indictment, as true and considers only the record proper and the provisions of the statute or ordinance.” State v. Vestal, supra at 520-21, 189 S.E. 2d at 155; State v. Anderson, 275 N.C. 168, 166 S.E. 2d 49 (1969); State v. Furio, 267 N.C. 353, 148 S.E. 2d 275 (1966). See also State v. Greenwood, 280 N.C. 651, 187 S.E. 2d 8 (1972); State v. Brewer, 258 N.C. 533, 129 S.E. 2d 262, appeal dismissed, 375 U.S. 9, 11 L.Ed. 2d 40, 84 S.Ct. 72 (1963); State v. Hales, 256 N.C. 27, 122 S.E. 2d 768 (1961).
 If an ordinance or statute upon which a warrant or indictment is based “is generally constitutional and for some circumstance peculiar to the situation of accused is unconstitutional that is a matter which is properly triable under the general issue or a plea of not guilty.’’ 16 C.J.S. Constitutional Law § 96(b), at 344 (1956). Upon a motion to quash the judge may not hear evidence tending to show that the ordinance, valid on its face, is being enforced in a manner which deprives the defendant of his constitutional rights, find the facts, and determine the constitutional question upon his findings. In a criminal prosecution in which the defendant contests his guilt he may not “waive his constitutional right of trial by jury. . . . [T]he determinative facts cannot be referred to the decision of the court even by consent — they must be found by the jury.” State v. Muse, 219 N.C. 226, 227, 13 S.E. 2d 229 (1941) (citations omitted). See also State v. Hill, 209 N.C. 53, 182 S.E. 716 (1935). If the judge, on a motion to quash the warrant or indictment, were to hear evidence, find the facts against the defendant, and overrule his motion, upon trial of the issue before the jury, the defendant would not be bound by the facts which the judge had found.
State v. Dobbins, 277 N.C. 484, 178 S.E. 2d 449 (1971), a case in which defendant was prosecuted for the unlawful possession of a shotgun in an area in which a declared emergency existed and for being on a public street in violation of an emergency curfew ordinance, does not indicate a departure from the foregoing rule. In Dobbins, at the defendant’s instance and without any objection by the solicitor, the judge heard evidence upon a motion to quash the warrant upon the grounds (1) that the statutes and ordinances under which the mayor of Asheville had issued a public proclamation declaring a state of emergency were unconstitutional; and (2) no actual state of emergency existed at the time one was proclaimed. Upon findings of fact, *163fully supported by all the evidence, the court found that an actual state of emergency had existed and that the statutes and ordinances under which the mayor had acted were constitutional. He denied the motion to quash upon all the grounds asserted, and the case proceeded to trial upon the warrant. The jury found defendant guilty upon both counts. Upon appeal, defendant did not assign as error the court’s finding that an actual state of emergency had existed. The battleground was whether the statutory scheme of Article 36A (Riots and Civil Disorders) of Chapter 14 of the General Statutes of North Carolina contravened the First, Fourth, Ninth, and Fourteenth Amendments to the United States Constitution and Article I, Section 17, of the North Carolina Constitution — questions of law properly determined upon a motion to quash.
[5, 6] When a defendant undertakes to contest the constitutionality of an ordinance or statute in a criminal proceeding upon grounds which do not appear upon the face of the record, the question may be determined by a special verdict. “ [S] pedal verdicts are permissible in criminal cases, but when such procedure is had, all the essential facts must be found by a jury.” State v. Straughn, 197 N.C. 691, 692, 150 S.E. 330 (1929). A special verdict is defective if any material finding is omitted and will not support a judgment. State v. Ellis, 262 N.C. 446, 137 S.E. 2d 840 (1964) (authorities collected at 451, 137 S.E. 2d at 845); State v. High, 222 N.C. 434, 23 S.E. 2d 343 (1942); State v. McIver, 216 N.C. 734, 6 S.E. 2d 493 (1940); State v. Gulledge, 207 N.C. 374, 177 S.E. 128 (1934); State v. Hanner, 143 N.C. 632, 57 S.E. 154 (1907). Special verdicts are attended with many hazards. See State v. Lueders, 214 N.C. 558, 200 S.E. 22 (1938); State v. Allen, 166 N.C. 265, 80 S.E. 1075 (1914); 3 Strong, N. C. Index 2d, Criminal Law § 125 (1967); Comment, Criminal Law—The Right of the State to Appeal in Criminal Cases, 42 N.C.L. Rev. 887, 891-94 (1964); Note, 13 N.C.L. Rev. 321 (1935). To avoid the pitfalls which lie in wait for even the most circumspect, the constitutionality of a Sunday ordinance is usually tested in a civil action to enjoin the enforcement of the ordinance under the well-established exception which permits such actions upon the allegation that injunctive relief is essential to the protection of property rights and the rights of persons against injuries otherwise irremediable. Whitney Stores v. Clark, 277 N.C. 322, 177 S.E. 2d 418 (1970); Mobile Homes Sales v. Tomlinson, 276 N.C. 661, 174 S.E. 2d 542 (1970); Kresge Co. v. Tomlinson, 275 N.C. 1, 165 S.E. 2d *164236 (1969); Surplus Co. v. Pleasants, 264 N.C. 650, 142 S.E. 2d 697 (1965); Charles Stores v. Tucker, 263 N.C. 710, 140 S.E. 2d 370 (1965); Clark’s Charlotte, Inc. v. Hunter, 261 N.C. 222, 134 S.E. 2d 364 (1964); Surplus Store, Inc. v. Hunter, 257 N.C. 206, 125 S.E. 2d 764 (1962).
 In this case defendants are charged with selling groceries after 6:00 p.m., a time when the ordinance requires all grocery-stores in Monroe to be closed. They defend upon two grounds: (1) The Marts, in addition to other things, sell substantially the same items as newsstands and tobacco stores, filling stations, and garages. (2) A classification which permits the latter to remain open all day and requires the former to be closed except between the hours of 1:00 p.m. and 6:00 p.m. is unreasonable and has no substantial relation to the evil the ordinance seeks to eliminate. Judge Collier, treating this criminal case as if it were a civil action, found facts from which he drew legal conclusions in accordance with defendants’ contentions and quashed the warrants. In finding facts on the motion to quash the warrants the trial judge exceeded his jurisdiction. In this case facts with reference to overlapping items of merchandise offered for sale by the Marts and by newsstands, filling stations and other businesses permitted to remain open all day could have been found only by the jury in a special verdict.
 This Court has held many times that Sunday Observance laws have a reasonable relationship' to the public welfare and are, therefore, a proper exercise of the police power. Ordinances prohibiting the exercise of all occupations generally on Sunday except those rendering essential services and providing products necessary to health or contributing to the recreational aspects of Sunday have been upheld when the exceptions are reasonable and do not discriminate within a class between competitors similarly situated. Kresge Co. v. Tomlinson, supra; Charles Stores v. Tucker, supra; Clark’s Charlotte, Inc. v. Hunter, supra.
 The Monroe Ordinance on its face does not discriminate against the Marts insofar as it applies to other grocery stores, for all are required to remain closed except between 1:00 p.m. and 6:00 p.m. See Charles Stores v. Tucker, supra at 715, 140 S.E. 2d at 374. The acts with which defendants are charged in the warrants are violations of the ordinance. Prima facie, no constitutional infirmity in the ordinance bars this prosecution. The motion to quash, therefore, should have been overruled. State v. Chestnutt, 241 N.C. 401, 85 S.E. 2d 297 (1955).
*165The judgment quashing the warrants is reversed, and this cause is remanded to the Superior Court of Union County for trial.