
180 S.W.3d 418 (2005)
Ex parte Donald COUNTRYMAN.
No. 05-05-01266-CR.
Court of Appeals of Texas, Dallas.
December 13, 2005.
*419 Steven R. Lafuente, Dallas, for Appellant.
Louis W. Conradt Jr., Crim. Dist. Atty., and Christian T. Souza, Asst. Crim. Dist. Atty., Kaufman, for State.
Before Justices WHITTINGTON, WRIGHT, and MAZZANT.


*420 OPINION
Opinion by Justice WRIGHT.
Donald Countryman was arrested on November 29, 2004 for unlawful possession of a firearm by a felon. On July 6, 2005, appellant filed an application for writ of habeas corpus seeking dismissal under article 32.01 of the code of criminal procedure because the State had not obtained an indictment by the next term of court. See TEX.CODE CRIM. PROC. ANN. art. 32.01 (Vernon Supp.2005). The State obtained an indictment on July 14, 2005. The trial court conducted a hearing on the application for writ of habeas corpus on July 22, 2005, and denied relief by written order on September 8, 2005. Appellant contends on appeal that the trial court erred in denying relief. We reverse the trial court's order denying habeas corpus relief and order the indictment dismissed.

Standard of Review
In reviewing the trial court's decision to grant or deny habeas corpus relief, we view the facts in the light most favorable to the trial court's ruling. Ex parte Peterson, 117 S.W.3d 804, 819 (Tex.Crim.App. 2003) (per curiam). We will uphold the ruling absent an abuse of discretion. Id. We afford almost total deference to the judge's determination of the historical facts that are supported by the record, especially when the fact findings are based on an evaluation of credibility and demeanor. Id. We afford the same amount of deference to the trial judge's application of the law to the facts, if the resolution of the ultimate questions turns on an evaluation of credibility and demeanor. Id. If the resolution of the ultimate questions turns on an application of legal standards, we review the determination de novo. Id.

Cognizability of Claim
The State contends that appellant's issues are not cognizable by application for writ of habeas corpus. The State asserts that appellant is being held on a parole violation warrant and also that the State could obtain a new indictment if the current indictment were dismissed. Therefore, the State argues, even if appellant were granted habeas corpus relief, he would not be entitled to immediate release from confinement. We disagree with the State.
"The writ of habeas corpus is an extraordinary writ." Ex parte Weise, 55 S.W.3d 617, 619 (Tex.Crim.App.2001); see also Headrick v. State, 988 S.W.2d 226, 228 (Tex.Crim.App.1999). Generally, a pretrial writ of habeas corpus is not appropriate when resolution of the question, even when resolved in favor of the applicant, would not result in immediate release. See Headrick, 988 S.W.2d at 228. But see Ex parte Watkins, 73 S.W.3d 264, 274-75 (Tex.Crim.App.2002) (pretrial habeas corpus available to address collateral estoppel claim based on double jeopardy even though resolution in favor of applicant would not result in dismissal of charges). In determining whether an issue is cognizable by habeas corpus, we consider a variety of factors, including whether the alleged defect would bring into question the trial court's power to proceed. Ex parte Weise, 55 S.W.3d at 619.
In this case, if relief were granted, the indictment would be dismissed and appellant would be released from confinement on that charge. See Ex parte Martin, 6 S.W.3d 524, 529 (Tex.Crim.App.1999). Dismissal of the indictment would affect the trial court's power to proceed in the case. See Ex parte Weise, 55 S.W.3d at 619; Ex parte Seidel, 39 S.W.3d 221, 223 (Tex.Crim.App.2001) (generally district *421 court lacks jurisdiction over case where no indictment or information filed). The fact that appellant may be subject to an administrative parole warrant does not alter the fact that he would be entitled to have the criminal charge dismissed because the State failed to timely obtain an indictment. Appellant is not in custody as a result of prior sentences. See Anderson v. State, 986 S.W.2d 811, 813-14 (Tex.App.-Amarillo 1999, pet. ref'd). He is being detained specifically as a result of the charge of being a felon in possession of a firearm. Therefore, we conclude the parole warrant does not affect the cognizability of appellant's claim.
Nor does the fact that the State may obtain a new indictment if the present indictment is dismissed alter the cognizability of appellant's claim. While relief to the accused may only be temporary, upon dismissal of the charges, the accused repossesses certain liberty interests: he is out of jail and off bail until the grand jury presents an indictment. See Ex parte Martin, 6 S.W.3d at 529.
Therefore, we conclude appellant's article 32.01 claim is cognizable by application for writ of habeas corpus.

Mootness of Claim
The State also asserts that appellant's claim is moot because the trial court did not conduct a hearing on the application for writ of habeas corpus until after the indictment was returned. In support of its argument, the State relies on State v. Condran, 951 S.W.2d 178 (Tex.App.-Dallas 1997), pet. dism'd, 977 S.W.2d 144 (Tex. Crim.App.1998) (per curiam). We conclude Condran is procedurally distinguishable from the case before us.
In Condran, appellee was charged with sexual assault and aggravated sexual assault. Appellee did not file his application for writ of habeas corpus until after the sexual assault indictment was returned and did not obtain a ruling on his article 32.01 complaint until after the aggravated sexual assault indictment was returned. Id. This Court, relying on Tatum v. State, 505 S.W.2d 548 (Tex.Crim.App.1974), concluded the issue was moot. See id. In Tatum, the court of criminal appeals held that a defendant who waits until after an indictment is returned to raise an article 32.01 speedy trial complaint waives that complaint. See Tatum, 505 S.W.2d at 550. The court reaffirmed that holding in Brooks v. State, 990 S.W.2d 278, 285 (Tex. Crim.App.1999) (defendant waived right to challenge indictment by waiting more than year after indictment returned to file application for writ of habeas corpus).
In this case, appellant filed his application for writ of habeas corpus before the State obtained the indictment. The State then obtained the indictment between the date the application was filed and the date the habeas corpus hearing was held. In 1999, the court of criminal appeals was presented with an article 32.01 issue in a case in the same procedural posture as this case. See Ex parte Martin, 6 S.W.3d at 524. Martin was arrested for forgery in June 1996 and released on bail on July 12, 1996. No indictment was returned by the end of the next term of court. On January 21, 1997, Martin filed an application for writ of habeas corpus, seeking to have the proceedings dismissed under articles 32.01 and 28.061. The grand jury returned an indictment on February 5, 1997 and the trial court conducted a hearing on Martin's application on February 20, 1997. The trial court denied relief, and the court of appeals affirmed. The court of criminal appeals, without reference to the fact that the hearing was held after the indictment was returned, addressed the merits of Martin's complaint. The court identified factors for courts of appeals to use in *422 determining whether the State showed good cause for the delay in obtaining the indictment and remanded to the court of appeals to review the record in light of those factors. See id. at 526-29.
On remand, the court of appeals rejected the State's argument that Martin's claim was moot because the trial court did not conduct a hearing on the application for writ of habeas corpus until after the indictment was returned. See Ex parte Martin, 33 S.W.3d 843, 846 (Tex.App.-Austin 2000) (op. on remand), pet. dism'd, 46 S.W.3d 932 (Tex.Crim.App.2001). The court of appeals went on to conclude the State did not show good cause for the delay in filing the indictment and ordered the indictment dismissed. Id. at 847. The court of criminal appeals dismissed the State's petition for discretionary review as improvidently granted.[1]
The Fort Worth court of appeals likewise rejected a mootness claim raised by the State in a case in which the application for writ of habeas corpus raising article 32.01 was filed before the indictment was returned, but the hearing on the application was not held until after the indictment was returned. See Ex parte Mann, 34 S.W.3d 716, 718 (Tex.App.-Fort Worth 2000, no pet.). The court relied on Ex parte Martin to reach the merits of Mann's claim. See id.
We believe this is in keeping with the purpose of article 32.01. Article 32.01 prevents citizens from being left in jail or on bail for long periods of time without being indicted. Ex parte Martin, 6 S.W.3d at 529. "The State must indict within the period set by article 32.01, show good cause for the delay, or suffer the dismissal of the charges." Id. To allow the State to be dilatory in obtaining an indictment, and then claim the benefit of an indictment obtained between the time an accused asserts his article 32.01 claim and the date a hearing is held on the claim, would defeat the purpose of article 32.01. Therefore, we conclude that as long as an application for writ of habeas corpus raising an article 32.01 claim is filed before an indictment is returned, the fact that a hearing is not held until after the indictment is returned does not render the claim moot.

Good Cause for Delay
We now turn to the merits of appellant's complaints. Article 32.01 provides,
When a defendant has been detained in custody or held to bail for his appearance to answer any criminal accusation, the prosecution unless otherwise ordered by the court, for good cause shown, supported by affidavit, shall be dismissed and the bail discharged, if indictment or information be not presented against such defendant on or before the last day of the next term of the court which is held after his commitment or admission to bail or on or before the 180th day after the date of commitment or admission to bail, whichever is later.
TEX.CODE CRIM. PROC. ANN. art. 32.01. The court of criminal appeals adopted a totality of the circumstances test for determining good cause and set out a list of factors to consider in determining whether the State has shown good cause. Ex parte Martin, 6 S.W.3d at 528. Among the factors to consider are: (1) the length of the delay; (2) the State's reason for the delay; (3) whether the delay was due to lack of diligence on the part of the State; and (4) whether the delay harmed the accused. Id.
*423 In this case, the facts are undisputed that the State did not obtain an indictment within the time provided by article 32.01. The State presented no evidence to explain the reason for the delay, whether the delay was due to lack of diligence on the part of the State, and whether the delay harmed appellant. See Ex parte Martin, 6 S.W.3d at 529 (State must show good cause for delay). Thus, we conclude good cause was not shown for continuing the prosecution, see Ex parte Mann, 34 S.W.3d at 718, and the trial court abused its discretion in denying appellant habeas corpus relief. We resolve appellant's issues in his favor.
We reverse the trial court's order denying appellant habeas corpus relief. We order that the indictment be dismissed.
NOTES
[1]  In its brief, the State speculates about various reasons as to why the court dismissed the PDR, but we decline to speculate. The dismissal order speaks for itself.
