delivered the opinion of the court:
In December, 1940, the circuit court of Pike county committed plaintiff in error to the' penitentiary for the indeterminate term fixed by statute for the crime of assault with intent to murder. He has sued a writ of error out of this court to review that part of the record which pertains to a motion he filed asking to be discharged for failure to give him a speedy trial within the requirements of section 18 of division XIII of the Criminal Code. Ill. Rev. Stat. 1943, chap. 38, par. 748.
On a preliminary hearing before a justice of the peace, plaintiff in erpor was held to await the action of (he grapd *241jury and bail was fixed, which bail he was unable to give. Thereupon he was ordered held in the county jail. This occurred June 15, 1940, and he remained there until he was committed to the penitentiary on December 14, 1940. The indictment charging the offense was returned in the early part of November and on November 13, 1940, he was before the court with counsel of his own selection and made a motion to quash. Two days later a written motion was filed in which the facts in reference to his confinement in jail were set forth. In the absence of a showing justifying the delay, the facts set forth in the motion should have entitled him to an order of discharge. However, no action was taken on the motion and on December 14, plaintiff in error was granted leave to withdraw the motion. He then entered a plea of guilty and was committed to the penitentiary.
It is not contended that this court, in performing the functions of a reviewing court, has the power to consider matters which have not been passed upon by the trial court, but it is urged that inasmuch as the motion to be discharged for want of prosecution was a part of the court file and in a sense before the court, it thereupon became the duty of the court to pass upon it before taking other action and that, while the motion was pending and undisposed of, the court was without jurisdiction to adjudge other matters. From these premises it is argued that the judgment of conviction and commitment was entered without jurisdiction and therefore void. This theory of attack raises a question as to the character of the constitutional right every one accused of crime has to a speedy trial. If it is a right which, when once accrued, cannot be waived by an accused, then, under the circumstances of this case, plaintiff in error should be discharged, for under the facts of the case it must be assumed that if action had been taken on plaintiff in error’s motion, it would have been favorable to his discharge. It is apparent that a ruling on the *242motion was withheld because of plaintiff in error’s conduct in withdrawing it and the entering of a plea of guilty.
Section 9, article II, of the constitution guarantees a-speedy trial to every person charged with a criminal offense. By section 18 of division XIII of the Criminal Code, the General Assembly interpreted the requirement for a speedy trial to mean that a person held without bail on a criminal offense for more than 120 days shall be discharged unless the delay shall have occurred on the application of the prisoner or unless the court is satisfied that due exertion has been made to procure the evidence on the part of the People and that there are reasonable grounds to believe that a further extension of time of not more than sixty days is needed to procure such evidence.
When the indictment was returned into the circuit court charging plaintiff in error with the crime of assault with intent to murder, the circuit court had jurisdiction of both the subject matter and the person and there can be no question but that the court retained jurisdiction unless jurisdiction of the person was lost by the court’s failure to act upon the motion and in permitting plaintiff in error to withdraw the motion before it was acted upon.
The constitutional requirement that one held in custody for a criminal offense be given a speedy trial has always been considered as a guarantee only against arbitrary and oppressive delays. (People v. Maniatis, 297 Ill. 72; Weyrich v. People, 89 Ill. 90.) The General Assembly gave it a similar interpretation and in the enactment of section 18, division XIII, of the Criminal Code made the constitutional right to a speedy trial subject to the condition that if the trial was delayed by reason of the prisoner’s own application, he was not entitled to a discharge and further, in the interest of a proper enforcement of the Criminal Code, provision was made that if the court found that due exertion had been made on the part of the People to procure the evidence but without avail and that there were reason*243able grounds to believe that if the time for trial was extended the evidence would be available, then the court might extend the time not more than sixty days. These provisions did not leave the right of an accused person to a speedy trial dependent solely upon the lapse of a certain fixed. time following the commitment but reserved for judicial determination questions as to whether the delay had been occasioned at the prisoner’s request or whether under the circumstances there had been ample time for the People to procure the evidence. An accused who wishes to make an application to be discharged for failure to have a speedy trial must in the first instance obtain the ruling of the trial court and if adverse to him he has a right to have such ruling reviewed by writ of error. After judgment and sentence it can not be reviewed on a petition for writ of habeas corpus filed in the trial court or by an original habeas corpus proceeding in this court. People ex rel. Nagel v. Heider, 225 Ill. 347.
To hold, as plaintiff in error contends, that the lapse of the four-months’ period ousted the trial court of jurisdiction, would be to go counter to many rulings of this court made on original petitions for writs of habeas corpus. If the court lost jurisdiction by the lapse of the four-months’ period, as plaintiff in error contends, then the subsequent judgment of conviction and commitment would be void and, being such, would be subject to attack in a habeas corpus hearing. Many petitions for writ of habeas corpus filed as original actions in this court have been denied where the right to a speedy trial was claimed but we have universally held that the trial court had jurisdiction over the person and subject matter and that a writ of habeas corpus could not be used, after a judgment of conviction, to perform the offices of a writ of error. In People v. Heider, 225 Ill. 347, it was said: “The writ is not permitted to take the place of a writ of error for the purpose of reviewing errors of a court having jurisdiction over the *244person and subject matter. If a court has jurisdiction in a criminal case, the question whether errors or irregularities have occurred in the exercise of the jurisdiction can only be determined upon a writ of error. * * * If one charged with a criminal offense should apply to the court having jurisdiction, for his discharge under the statute, it would be necessary for him to bring himself within its provisions and to ask for the judgment of the court on the question whether the requisite conditions existed entitling him to his discharge. If the court should err upon a consideration of the proof offered by him and the People, and deny his application, the decision - could only be reviewed on writ of error. The question whether the court erred could not-be determined on a writ of habeas corpus
Plaintiff in error cites and relies upon language used in People v. Szobor, 360 Ill. 233. That was a review of the ruling of the trial court by a writ of error and what was said there in reference to the court being without jurisdiction to accept a plea or enter judgment after the expiration of the four-months’ period was not necessary to a decision of the case. Insofar as any of the language used in that opinion indicates that, after the expiration of the four-months’ period, the court was without jurisdiction to proceed and could be reviewed on habeas corpus, it is hereby overruled.
Related to plaintiff in error’s first contention is the further question of the right of plaintiff in error to withdraw his motion to be discharged and thereby waive the right he had to have a hearing on the same. The right to a speedy trial is guaranteed by the constitution and should be available to every accused who brings his case within the statute. The right to a hearing is similar to other rights guaranteed by the constitution which this court and other courts have held the accused may waive. In People ex rel. Swanson v. Fisher, 340 Ill. 250, it was held that a defendant charged with a felony could waive his right to *245a trial by jury and in People v. Scudieri, 363 Ill. 84, it was held that a defendant could waive the constitutional guarantee of the-right to be tried by a jury of twelve and could consent to a trial by a lesser number. Also, see Patten v. United States, 281 U. S. 276. Plaintiff in error had the right to waive a hearing upon his application to be discharged for want of a trial within the statutory period and having done so there is nothing in this record to be reviewed except the jurisdictional question which is determined adversely to plaintiff in error.
There being no other question presented, the judgment of the circuit court must be affirmed.