
474 N.W.2d 116 (1991)
STATE of Iowa, Appellee,
v.
Lois Ann BEAN and Merlin Clair Bean, Appellants.
No. 90-634.
Court of Appeals of Iowa.
May 29, 1991.
*117 Jerald W. Kinnamon and Jon M. Kinnamon, Cedar Rapids, for appellants.
Bonnie J. Campbell, Atty. Gen., Thomas S. Tauber, Asst. Atty. Gen., Jerry H. Folkers, County Atty., and Bryan H. McKinley, Asst. County Atty., for appellee.
Considered by OXBERGER, C.J., and HAYDEN and HABHAB, JJ., but decided en banc.
HAYDEN, Judge.
In 1978 Merlin Bean and Lois Bean, husband and wife, were jointly charged with first-degree burglary. However, the Beans failed to appear for their arraignment.
In December 1988, after an interval of more than ten years, the Beans finally appeared for arraignment on the 1978 first-degree burglary charges. The Beans later entered pleas of guilty to lesser charges. Merlin Bean pleaded guilty to burglary in the second degree, and Lois Bean pleaded guilty to attempted burglary in the second degree. The court later sentenced Merlin Bean to a prison term of up to ten years and Lois Bean to a prison term of up to five years. Both Merlin and Lois appeal.
Lois Bean contends she should be allowed to withdraw her plea of guilty to the charge of attempted burglary in the second degree. She argues the district court lacked jurisdiction to accept this plea because no such charge existed under Iowa statutes at the time the alleged crime occurred in 1978. The State agrees the crime of attempted burglary did not exist under the Iowa statutes in effect in 1978. However, the State argues Lois waived this issue by entering her guilty plea and by failing to raise the issue in her motion in arrest of judgment.
Both Lois and Merlin contend they should be permitted to withdraw their guilty pleas because the pleas were induced by ineffective assistance of counsel. They complain their initial attorney failed to explore a defense based on the statute of limitations and failed to explore the possibility evidence seized from their home in *118 1978 could have been suppressed. They ask the appellate court either to dispose of this issue on direct appeal or, if it deems the present record inadequate, to reserve the issue for a future postconviction proceeding.
In addition, both Lois and Merlin contend they should be permitted to withdraw their guilty pleas because the guilty plea colloquy was deficient. They contend the district court failed to advise them, or to determine they understood, the trial rights waived by their guilty pleas would include the right to confront and cross-examine the witnesses against them.
Finally, both Lois and Merlin contend the sentencing court erred by failing to give them credit for time served on these charges prior to sentencing. They request a remand so the proper amount of credit may be determined. The State concedes the sentencing court failed to give any credit for time served. The State joins in requesting a remand so the proper amount of credit may be determined.
Our scope of review on the constitutional issues raised by the defendants is de novo. See State v. Niehaus, 452 N.W.2d 184, 187 (Iowa 1990). We will not consider constitutional issues if we may decide the case on another ground. Renda v. Polk County, 319 N.W.2d 250, 253 (Iowa 1982) (quoting Dubuque & Dakota Railway v. Diehl, 64 Iowa 635, 640, 21 N.W. 117, 120 (1884)). On all other issues, our scope of review is for errors of law. Iowa R.App.P. 4. We will address the issues in the order presented.

I. Conviction for a Non-Statutory Crime

Lois Bean pleaded guilty to a lesser included charge of attempted burglary in the second degree in violation of Iowa Code sections 713.1 and 713.6. Lois alleges the trial court was without jurisdiction to accept her plea and enter judgment on a nonexistent crime. The problem arises because the legislature did not enact the crime of attempted burglary in the second degree until 1981. The purported crime was committed in 1978. This was three years before Iowa Code section 713.6 established attempted burglary in the second degree as a crime.
The State argues Lois waived her argument because she did not raise it in a motion in arrest of judgment, as required by Iowa R.Crim.P. 8(2)(d). The State further asserts Lois is really urging her conviction was an ex post facto application of the law. The State argues since constitutional rights may be waived, Lois waived any ex post facto claim by her plea and her failure to assert this ground in her motion in arrest of judgment.

A. Jurisdiction of the Trial Court
Lois attacks the trial court's jurisdiction. She asserts the court lacked authority to enter judgment and sentence on an act which was not a crime at the time of its commission.
A court may have subject matter jurisdiction but for one reason or another may not be able to entertain the particular case. In such a situation we say the court lacks authority to hear that particular case. Sometimes we have referred to "lack of authority to hear the particular case" as lack of jurisdiction of the case....
* * * * * *
Subject matter jurisdiction can be raised at any time. The basis for extending the "at any time" rule to cases in which the court has subject matter jurisdiction but lacks authority to hear the particular case might be subject to question. But up to now our cases have so extended it.
Christie v. Rolscreen Co., 448 N.W.2d 447, 450 (Iowa 1989) (citations omitted).
The issue here is not whether the district court lacked subject matter jurisdiction. Rather the issue is whether the court lacked authority to hear the case. Although termed "jurisdiction," it concerns the court's authority to act as it did. See id.
Jurisdiction of the subject matter is derived from the law. It can neither be waived nor conferred by consent of the accused. Objection to the jurisdiction of the court over the subject matter may be *119 urged at any stage of the proceedings, and the right to make such an objection is never waived.
21 Am.Jur.2d Criminal Law § 339 (1981).
As jurisdiction may be raised at any time, even on our own motion, we look to see if the Iowa district court had jurisdiction over the crime charged. The Iowa Constitution provides:
The district court shall be a court of law and equity, which shall be distinct and separate jurisdictions, and have jurisdiction in civil and criminal matters arising in their respective districts, in such a manner as shall be prescribed by law.
Iowa Const. art. V, sec. 6.
The district court certainly had jurisdiction over criminal acts in general. The real question is whether the court had jurisdiction to enter judgment and sentence on an act not a crime at the time of its commission.
We begin our inquiry with the fact there is no common law crime in Iowa. State v. Di Paglia, 247 Iowa 79, 84, 71 N.W.2d 601, 604 (1955). The only crimes in Iowa are those created by statute. Id; State v. Coppes, 247 Iowa 1057, 1061-63, 78 N.W.2d 10, 13-14 (1956). Additionally, all criminal procedure in Iowa is statutory. State v. Thompson, 241 Iowa 16, 20, 39 N.W.2d 637, 640 (1949).
Since the court derives its jurisdiction from the law, its jurisdiction extends only to those matters that the law declared to be criminal in nature. When the court undertakes to incarcerate a person for an offense where no criminality is attached, it acts beyond its jurisdiction.
21 Am.Jur.2d Criminal Law § 336 (1981).
The trial court only has jurisdiction "in such a manner as [ ] prescribed by law." Iowa Const. art. V, sec. 6. Our reading of the Iowa constitution convinces us the trial court did not act "in such a manner as [] prescribed by law." It therefore acted outside its jurisdiction.
We vacate the trial court's judgment and sentence of Lois for attempted burglary in the second degree. We remand for a trial in accordance with the law in effect at the time of the act charged.

B. Ex Post Facto Application of the Law
Attempted burglary was not a crime at the time of the charged offense. Applying the present statute so as to make an act a crime which was innocent at the time of its commission or to raise its punishment is an ex post facto application of the law. See Bouie v. Columbia, 378 U.S. 347, 353, 84 S.Ct. 1697, 1702, 12 L.Ed.2d 894, 899-900 (1964); State v. Quanrude, 222 N.W.2d 467, 469-70 (Iowa 1974). Both the United States Constitution and the Iowa Constitution prohibit enactment of ex post facto laws. U.S. Const. art. I, sec. 10; Iowa Const. art. I, sec. 21. The United States Supreme Court has held the principle also applies to judicial construction of penal statutes. Bouie, 378 U.S. at 352-55, 84 S.Ct. at 1701-03, 12 L.Ed.2d at 899-900. Ex post facto application of penal laws by judicial process would violate due process of law, requiring fair notice of the forbidden action. Id. at 355, 84 S.Ct. at 1703, 12 L.Ed.2d at 900.
We now apply this principle to the case before us. Ex post facto laws are void. The ex post facto application of penal statutes renders those judgments void. 16A Am.Jur.2d Constitutional Law § 640 (1979). Penal statutes which have an ex post facto effect thus are to be applied prospectively only. Id.
The trial court entered judgment and sentenced Lois for an action not a crime at the time of its commission. Thus its judgment is void as a matter of law.
Without question, a void judgment may be attacked and vacated at any time. Such a judgment or order is characterized as void where the court lacks jurisdiction of the parties or subject matter, or lacks the inherent power to enter the contested order.

Cooper v. United Development Co., 122 Ill.App.3d 850, 78 Ill.Dec. 510, 513, 462 N.E.2d 629, 632 (1 Dist.1984) (emphasis added).
*120 We determine the trial court was without authority to enter judgment and sentence for an act not a crime at the time of its commission. This is an ex post facto application of the penal code. Such ex post facto judgments are void.
We vacate the judgment of the district court as to Lois and remand this case for a new trial in accordance with the criminal law in effect at the time of commission of the alleged criminal act.
We reverse the trial court on this issue.

II. Ineffective Assistance of Counsel

The defendants next contend their trial counsel rendered ineffective assistance by not filing a motion to suppress evidence and not raising the statute of limitations defense.
Generally, ineffective assistance of counsel claims are preserved for postconviction to allow trial counsel an opportunity to defend the charge. State v. Mulder, 313 N.W.2d 885 (Iowa 1981); State v. Nebinger, 412 N.W.2d 180 (Iowa App.1987). Where the record on direct appeal is not adequate to permit us to resolve the issue, we preserve the defendant's claim for postconviction proceedings so the facts may be so developed. State v. Koenighain, 356 N.W.2d 237, 238 (Iowa App.1984). This also gives the allegedly ineffective attorney the opportunity to explain his or her conduct. State v. Coil, 264 N.W.2d 293, 296 (Iowa 1978).
However, this claim was raised in the trial court in defendants' motion in arrest of judgment. A hearing was held and the issue addressed. The trial court ruled on it in its ruling on the defendants' motion in arrest of judgment. Therefore, we will consider the ineffective assistance claim here.
We deal with defendants' ineffective assistance claim to simplify the trial court's work in any further proceedings. Our ultimate concern in claims of ineffective assistance is with the "fundamental fairness of the proceeding whose result is being challenged." State v. Risdal, 404 N.W.2d 130, 131 (Iowa 1987), quoting Strickland v. Washington, 466 U.S. 668, 696, 104 S.Ct. 2052, 2069, 80 L.Ed.2d 674, 699 (1984). We review de novo the totality of the circumstances relating to counsel's conduct, keeping in mind the presumption that counsel performed competently. Risdal, 404 N.W.2d at 131. The burden is on the defendant to prove by a preponderance of the evidence that (1) counsel failed to perform an essential duty and (2) prejudice resulted. Id.

A. Statute of Limitations
The defendants claim their trial counsel was ineffective for failing to raise statute of limitations defenses for their burglary and failure to appeal charges. We first examine the Iowa Code regarding statute of limitations for criminal offenses.
Iowa Code section 802.3 provides:
In all cases, except those enumerated in section 802.1 and 802.2 [not applicable here], an indictment or information for a felony or aggravated or serious misdemeanor shall be found within three years after its commission.
1. Burglary. The information for the burglary charges was filed in 1978, the same year as the incident occurred. The defendants chose not to appear at their subsequent arraignment. However, the fact their actual arraignment and further proceedings were not commenced until 1988 does not negate the fact the information was filed within the statutory time period.
Additionally, the ten-year lapse between the initial filing of the information and the actual arraignment appears to be the defendants' fault, and not the State's. The defendants thus were not prejudiced by their counsel's failure to raise the statute of limitations regarding the burglary charges. We affirm the trial court on this issue.
2. Failure to Appear. In the renewed proceeding in 1988, the defendants were also charged with failure to appear, based on their failure to appear for their 1978 arraignment. It further appears the defendants left the state for some time during that ten-year period. The defendants contend their trial counsel was ineffective for *121 not raising the statute of limitations defense for this charge as well.
Iowa Code section 802.6 provides:
1. When a person leaves the state with the intention of avoiding prosecution, the indictment or prosecution may be found or commenced within the time herein limited after the person's coming into the state, and no period during which the party charged was not publicly resident within the state is a part of the limitation.

(Emphasis added.)
It appears the defendants did leave the state. They evidently were incarcerated in other states. Apparently they fled Iowa before the arraignment in 1978. It does not appear they returned to Iowa or otherwise "publicly resided" in this state. Rather, the record indicates they were apprehended in Florida, operating under aliases. Only by matching fingerprints were they connected with the Iowa charges and returned to this state.
We agree with the trial court's holding the defendants failed to carry their burden on their ineffective assistance of counsel claim pertaining to this issue. The defendants did not show the pertinent dates or otherwise show how they had been prejudiced by failure to raise the limitations statute for the failure to appear charge.
We affirm the trial court on this issue.
B. Failure to Fully Advise Defendants of Rights Lost by Guilty Plea
The trial court failed to advise the defendants they would lose their right to confront and cross-examine the witnesses against them. The defendants claim their pleas should be set aside for this failure by the trial court.
The defendants are required to object to any defects in the plea proceedings through a motion in arrest of judgment. Iowa R.Crim.P. 8(2)(d). They failed to object on this ground in their motion in arrest of judgment. The only basis in their motion in arrest of judgment even possibly relating to a defect in the plea proceedings is an allegation of ineffective assistance of counsel. Since the ineffective assistance of counsel claim was considered by the trial court after a hearing on the matter, we will review the trial court's findings here. Our scope of review for ineffective assistance of counsel claims remains the same as set out previously.
Iowa R.Crim.P. 8(2)(b) provides in pertinent part:
Before accepting a plea of guilty, the court must address the defendant personally in open court and inform the defendant of, and determine that the defendant understands, the following:
* * * * * *
(3) That the defendant has ... the right to confront and cross-examine witnesses against the defendant,...
As stated above, the defendants had the opportunity to be heard and present evidence on this issue. However, the trial court found counsel was not ineffective. The trial court stated in its findings the defendants failed to carry their burden to show counsel was ineffective. We agree with the trial court.
We affirm the trial court on this issue.

III. Credit for Time Served

The defendants complain the trial court failed to give them credit for time served. Iowa Code section 901.6 provides:
In every case in which judgment is entered, the court shall include in the judgment entry the number of the particular section of the Code and the name of the offense under which the defendant is sentenced and  a statement of the days credited pursuant to section 903A.5 shall be incorporated into the sentence.

(Emphasis added.)
Section 903A.5 provides the district court with direction on calculating the days credited to an inmate for time served prior to sentencing. It states in pertinent part:
However, if an inmate was confined to a county jail or other correctional or mental facility at any time prior to sentencing, or after sentencing but prior to the case having been decided on appeal, because of failure to furnish bail or because of being charged with a nonbailable offense, the inmate shall be given *122 credit for the days already served upon the term of the sentence. The clerk of the district court of the county from which the inmate was sentenced, shall certify to the warden the number of days so served.
An inmate shall not receive credit upon the inmate's sentence for time spent in custody in another state resisting return to Iowa following an escape, or for time served in an institution or jail or another jurisdiction during any period of time the person is receiving credit upon a sentence of that other jurisdiction.
The State agrees the trial court failed to follow section 901.6's mandate to state in the judgment entry the days credited to the defendants for time served. We therefore remand this case to the trial court. The trial court shall modify its judgment entry in this case by including therein a statement of days credited to defendant Merlin Clair Bean pursuant to sections 901.5 and 903A.5.

IV. Conclusion

The judgment of the trial court on Lois's guilty plea on attempted burglary in the second degree is vacated. Lois's case is remanded for a new trial in accordance with this opinion.
All of the defendants' objections premised on ineffective assistance of counsel are denied. The defendants raised the ineffective assistance claim to their first trial attorney in their motion in arrest of judgment. They had full opportunity to be heard. The trial court held they did not carry their burden. Therefore, their ineffective assistance of counsel claims regarding their first trial counsel are not preserved for postconviction proceedings.
The judgment and sentence of Merlin Clair Bean is affirmed. His case is remanded to district court for resentencing so as to give Merlin credit for time served according to the applicable provisions of the Iowa Code.
AFFIRMED IN PART, REVERSED AND VACATED IN PART, AND REMANDED WITH DIRECTIONS.
OXBERGER, C.J., and SCHLEGEL and SACKETT, JJ., concur.
HABHAB, J., specially concurs.
DONIELSON, J., dissents in part.
HABHAB, Judge (specially concurring).
I agree with the conclusion reached by the majority. However, I disagree with the analysis utilized in determining the judgment should be reversed.
My difficulty with the majority analysis is two-fold. First, I disagree with the majority's characterization of this situation as an ex post facto problem. The Iowa Supreme Court recently discussed ex post facto in State v. Kaster, 469 N.W.2d 671 (Iowa 1991), saying:
We have repeatedly held that legislation violates the ex post facto clause of both the Iowa and federal constitutions when it "punishes as a crime an act previously committed, which was innocent when done, which makes more burdensome the punishment for a crime, after its commission, or which deprives one charged with crime of any defense available according to the law at the time when the act was committed." State v. Soppe, 374 N.W.2d 649, 652 (Iowa 1985) (quoting Beazell v. State, 269 U.S. 167, 169-70, 46 S.Ct. 68, 68, 70 L.Ed. 216, 217 (1925)); State v. Anderson, 338 N.W.2d 372, 375 (Iowa 1983); see also In re Ponx, 276 N.W.2d 425, 428 (Iowa 1979); State v. Quanrude, 222 N.W.2d 467, 470 (Iowa 1974).
Here, Bean was charged with a crime that was in existence at the time she committed the crimethat being burglary. She is not being punished for a crime that was "innocent when done." Additionally, it seems to me the purpose of ex post facto is to prevent people from being charged or sentenced to a greater extent because of the enactment of a new statute. Bean pleaded guilty to a crime that carried a lesser sentence than the one she was charged with. The charge accompanying attempted burglary was not more punitive in nature. I do not believe the majority's use of ex post facto is correct.
*123 Secondly, I disagree with the majority's jurisdictional argument. There is no question the district court has jurisdiction of criminal cases. That aside, I believe this case turns on whether the trial court acted beyond its authority because it could not impose a sentence for a crime which was not in existence at the time the crime was committed. I believe the majority's reliance on ex post facto and jurisdiction is misplaced and would reverse based on the trial court's lack of authority to impose a lawful sentence.
DONIELSON, Judge (dissenting in part).
I respectfully dissent to that part of the majority opinion which vacates Lois Bean's plea of guilty to attempted burglary in the second degree. A knowing and voluntary plea of guilty waives all defenses or objections which are not intrinsic to the plea itself. State v. Morehouse, 316 N.W.2d 884, 885 (Iowa 1982). While it is true a challenge to the subject matter jurisdiction of the court can be raised at any time, Christie v. Rolscreen Co., 448 N.W.2d 447, 450 (Iowa 1989), the majority correctly points out that Lois is not challenging the subject matter jurisdiction of the district court. Nor has appellant challenged the district court's authority to hear the particular case before it. I do not find a "jurisdictional" challenge presented; the majority's reasoning on this issue is strained.
Rather, I find Lois Bean's challenge to the district court's power to enter judgment on her guilty plea to be governed by the doctrine of invited error, i.e., a litigant cannot complain of error which she has invited or to which she has assented. See McCracken v. Edward D. Jones & Co., 445 N.W.2d 375, 378 (Iowa App.1989). In other words, I believe Lois Bean waived any challenge to the court's authority to enter judgment under these circumstances when she entered a knowing and voluntary plea of guilty.
Furthermore, I do not believe Lois' challenge raises a question of ex post facto application of penal laws. The constitution prohibits the enactment of ex post facto laws. Additionally, the United States Supreme Court has held the principle applies to judicial construction of penal statutes as well. Bouie v. Columbia, 378 U.S. at 352-55, 84 S.Ct. at 1701-03, 12 L.Ed.2d at 899-900. However, nothing I have found prohibits a criminal defendant from pleading guilty to a crime in order to avoid the greater penalty accompanying the crime with which defendant is charged (and which was inarguably in existence at the time the offense was committed). Here, more than ten years from the date of the crime, Lois pleads guilty to attempted burglary in the second degree and, not liking the result, wants another "go at it." I would not give in to such manipulations of the legal system. Lois pleaded guilty to a lesser offense than the one with which she was charged. Lois received a lesser penalty than she would have received upon conviction of the crime charged. In other words, defendant has already received a better "deal" than she was entitled to. Therefore, the entry of judgment on the guilty plea did not substantially affect her rights, Iowa R.App.P. 1(b), and this contention is without merit.
