
183 Wis.2d 125 (1994)
515 N.W.2d 302
STATE of Wisconsin, Plaintiff-Respondent,
v.
Melvin ANITON, Defendant-Appellant.[]
No. 93-0104-CR.
Court of Appeals of Wisconsin.
Submitted on briefs September 8, 1993.
Decided March 15, 1994.
*126 For the defendant-appellant the cause was submitted on the briefs of Mark S. Rosen and Michael S. Holzman of Rosen and Holzman, Ltd., of Waukesha.
For the plaintiff-respondent the cause was submitted on the briefs of James E. Doyle, attorney general, and William L. Gansner, assistant attorney general.
*127 Before Wedemeyer, P.J., Sullivan and Schudson, JJ.
SULLIVAN, J.
Melvin Aniton appeals from a judgment of conviction for possession of a controlled substance, cocaine, with intent to deliver. See §§ 161.16(2)(b)1 and 161.41(1)(c)4, STATS. Aniton argues that his conviction must be reversed, and the complaint dismissed with prejudice, because he did not make an initial appearance and receive a finding of probable cause within forty-eight hours of being taken into custody after a warrantless arrest. Because Aniton pled guilty, we conclude that he waived his right to appellate review of these nonjurisdictional defects and we affirm his conviction.
The police arrested Aniton without warrant on February 1, 1992, at the General Mitchell International Airport in Milwaukee with 250 grams of cocaine in his possession. The State filed a criminal complaint on February 4th. Aniton appeared personally and with counsel before Court Commissioner Harry Halloway[1] on February 6, and moved to dismiss for lack of jurisdiction. Commissioner Halloway denied Aniton's motion. On February 12, Aniton appeared before Commissioner Thomas Cooper, waived his right to a preliminary hearing, pled not guilty, and upon a finding of probable cause, was bound over for trial. Aniton subsequently entered a guilty plea on March 11 and, on May 21, was sentenced to ten years imprisonment.
*128 Aniton argues that the State failed to secure his initial appearance "within a reasonable time," as required by § 970.01(1), STATS.[2] Aniton also argues, and the State concedes, that he did not have the benefit of a judicial finding of probable cause within forty-eight hours of his warrantless arrest, as required by County of Riverside v. McLaughlin, 500 U.S. 44, , 111 S. Ct. 1661, 1669-71 (1991).[3] Aniton contends that these two defects violated his constitutional rights and caused the circuit court to lose subject-matter jurisdiction. Aniton asserts that these defects required dismissal of the complaint with prejudice. We conclude that Aniton's guilty plea waived his right to challenge the alleged violation of § 970.01(1), STATS., and the conceded violation of Riverside's forty-eight hour rule.[4]
*129 [1, 2]
A guilty plea, made knowingly and voluntarily, waives all nonjurisdictional defects and defenses, including alleged violations of constitutional rights prior to the plea. Mack v. State, 93 Wis. 2d 287, 293, 286 N.W.2d 563, 566 (1980). Thus, Aniton has waived any constitutional defects of which he complains. In contrast, the circuit court's subject-matter jurisdiction is derived from law, is not waivable and may be raised despite a guilty plea. Id. Therefore, if any of Aniton's alleged errors affected the trial court's jurisdiction over the subject matter, as Aniton asserts they do, his guilty plea would not affect his right to review of those issues.
[3-6]
Criminal subject-matter jurisdiction is the "power of the court to inquire into the charged crime, to apply the applicable law and to declare the punishment." Id. at 294, 286 N.W.2d at 566. The circuit court's subject-matter jurisdiction attaches when the complaint is filed. See State v. Estrada, 63 Wis. 2d 476, 492, 217 N.W.2d 359, 367, cert. denied, 419 U.S. 1093 (1974). The circuit court lacks criminal subject-matter jurisdiction only where the complaint does not charge an offense known to law. See Mack, 93 Wis. 2d at 295, 286 N.W.2d at 567. Once criminal subject-matter jurisdiction attaches, it continues until a final disposition of *130 the case. See State v. Asfoor, 75 Wis. 2d 411, 424, 249 N.W.2d 529, 534 (1977).
[7]
The law is clear on the issue of criminal subject-matter jurisdiction. Aniton does not allege that the complaint failed to charge an offense. Aniton has failed to show how either of his alleged violations in any way prevented the trial court from obtaining criminal subject-matter jurisdiction or from retaining criminal subject-matter jurisdiction once it had attached with the filing of the complaint.[5] Because Aniton's claims do not raise jurisdictional issues, we conclude that the waived review of these issues by entering his guilty plea. Although this court possesses discretion to review nonjurisdictional errors, see Mack, 93 Wis. 2d at 296-97, 286 N.W.2d at 567, we decline to do so in this case.
By the Court.Judgment affirmed.
SCHUDSON, J. (concurring).
Although Aniton's guilty plea waived his right to appellate review of a Riverside violation, it is important to emphasize that a guilty plea does not preclude appellate discretion to review the reasonableness of a Riverside violation.
In its brief to this court the State writes:
On this record, the state must concede that the Gerstein-Riverside forty-eight hour rule was violated. The state does not concede that there was an unreasonable delay in the conducting of Aniton's initial appearance.
*131 The State goes on to note the considerable uncertainty surrounding the circumstances of Aniton's first appearance in court, and the reasons for delay in providing either a probable cause review or a formal initial appearance. Thus, the State explains, this court has no way to know whether the delay was reasonable.
As the State correctly argues, that uncertainty could have been erased had Aniton filed a motion challenging "defects in the institution of the proceedings," under § 971.31(2), STATS.,[1] within ten days after arraignment, as required under § 971.31(5)(a), STATS.[2] The trial court could have held a hearing to determine the length of delay and the reasons for delay. Then, within our discretion to review, see Mack v. State, 93 Wis. 2d 287, 296-297, 286 N.W.2d 563, 567 (1980), we could have considered any constitutional challenge Aniton might have made to the trial court's conclusion.
As the State implicitly acknowledges, under State ex rel. Van Ermen v. Burke, 30 Wis. 2d 324, 338, 140 N.W.2d 737, 744 (1966), the potential for "absolute discharge" has not been determined but may exist as the appropriate remedy "in order to prevent a pattern of police practice involving unreasonable lengths of detention." In my opinion, our decision in this case does not preclude that potential. Further, our decision does not preclude appellate evaluation of that issue merely *132 because a defendant pleads guilty. We should not require a defendant, who otherwise would plead guilty, to go to trial in order to preserve a Riverside challenge.
Thus, I trust that our decision in this case will not vitiate the strength of Riverside. For what some day might prove to be an unreasonable delay resulting from negligent, intentional, malicious, or persistent police practice, our discretionary review may become critical. Indeed, to the extent that courts would restrict review of such alleged Riverside violations, they would increase the potential for just such police practices, particularly during times of jail-overcrowding and inadequate criminal justice resources.
Here, because Aniton failed to pursue and litigate the Riverside issue as required by §§ 971.31(2) and 971.31(5)(a), STATS., he denied the trial court the opportunity to effectively review his challenge. In my opinion, that, not his guilty plea, foreclosed our opportunity to review his constitutional challenge. Accordingly, I respectfully concur.
NOTES
[]  Petition to review denied.
[1]  The exact date on which Aniton made his initial appearance and received a probable cause determination is unknown. The judgment docket entry on this point is unclear. Aniton and the State agree his initial appearance and probable cause determination were not within forty-eight hours of his arrest but were no later than February 6.
[2]  Section 970.01(1), STATS., provides, in part:

Initial appearance before a judge. (1) Any person who is arrested shall be taken within a reasonable time before a judge in the county in which the offense was alleged to have been committed.
[3]  To satisfy the requirements of the Fourth Amendment, a person in custody pursuant to a warrantless arrest must have the benefit of a judicial determination of probable cause within forty-eight hours of the arrest, absent a bona fide emergency or other extraordinary circumstances. County of Riverside v. McLaughlin, 500 U.S. 44, , 111 S. Ct. 1661, 1669-71 (1991); State v. Koch, 175 Wis. 2d 684, 696-97, 499 N.W.2d 152, 159 (1993), cert. denied, 114 S. Ct. 221 (1993).
[4]  Although, due to our disposition of this case, we do not reach the issue of the appropriateness of the remedy requested by Aniton for the defects in question, we note the existence of authority which would indicate that dismissal with prejudice is not the appropriate sanction. See United States v. Crews, 445 U.S. 463, 474 (1980) (violation may warrant exclusion of evidence obtained as result of delay); Gerstein v. Pugh, 420 U.S. 103, 119 (1975) ("[A] conviction will not be vacated on the ground that the defendant was detained pending trial without a determination of probable cause."); State v. Koch, 175 Wis. 2d at 699, 499 N.W.2d at 160 (rejecting suppression of evidence as sanction where delay was not for purpose of gathering evidence); State v. Estrada, 63 Wis. 2d 476, 490, 217 N.W.2d 359, 367, cert. denied, 419 S. Ct. 1093 (1974) ("The law is well settled that any statement obtained from a defendant during a period of unreasonable detention is inadmissible in evidence.").
[5]  Aniton cites several cases that explore the circuit court's lack of power to act and loss of competency to exercise its jurisdiction. None of these cases involve criminal prosecutions, and all involve violations of specific statutory time limitations.
[1]  Section 971.31(2), STATS., provides, in part:

[O]bjections based on defects in the institution of the proceedings ... shall be raised before trial by motion or be deemed waived.
[2]  Section 971.31(5)(a), STATS., provides:

Motions before trial shall be served and filed within 10 days after the initial appearance of the defendant in a misdemeanor action or 10 days after arraignment in a felony action unless the court otherwise permits.
