pxb1988/dex2jar · error · RuntimeException

fail exe

Error message

fail exe 

What it means

BaseAnalyze.exec runs the analyzer over a single IR statement inside a frame. Any exception thrown while Cfg.travel processes the statement is wrapped in a RuntimeException with the message 'fail exe ' plus the statement's toString. It is a wrapper that preserves the original cause, used to point at the exact offending IR statement.

Solutions

  1. Read the wrapped cause (getCause()) and the printed stmt to find the failing statement
  2. Verify the IR is well-formed (Cfg.reIndexNbr/trim) before running the analyzer
  3. Narrow which earlier transformer produced the bad statement and fix or skip it
  4. Catch RuntimeException around analyzer exec in batch translation to skip bad methods

Example fix

// before
analyze.exec(frame, stmt);
// after
try {
    analyze.exec(frame, stmt);
} catch (RuntimeException e) {
    LOG.warn("failed on stmt: " + stmt, e.getCause());
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    analyzer.exec(frame, stmt);
} catch (RuntimeException e) {
    Throwable cause = e.getCause();
    LOG.error("analysis failed at stmt " + stmt + ": " + cause, cause);
}

Prevention

When it happens

Trigger: Any analyzer extending BaseAnalyze whose statement handler throws during Cfg.travel — e.g. null operand values, unexpected statement types, or broken IR invariants in the method being analyzed.

Common situations: Translating malformed or obfuscated DEX that produces inconsistent IR; running analysis passes on an IrMethod already mutated incorrectly by an earlier transformer.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.


AI-assisted analysis of pxb1988/dex2jar@b5bda4fb49 (2026-09-08). Data as JSON: /api/errors/6e4d101d60ace6fe. Report an issue: GitHub.

Appendix: source

Thrown at dex-ir/src/main/java/com/googlecode/dex2jar/ir/ts/an/BaseAnalyze.java:92

        tmpFrame = newFrame(localSize);
        Cfg.dfs(method.stmts, this);
        tmpFrame = null;
    }

    protected void analyzeValue() {
    }

    protected void afterExec(T[] frame, Stmt stmt) {

    }

    @Override
    public T[] exec(T[] frame, Stmt stmt) {
        this.currentFrame = frame;
        try {
            Cfg.travel(stmt, this, false);
        } catch (Exception ex) {
            throw new RuntimeException("fail exe " + stmt, ex);
        }
        frame = this.currentFrame;
        this.currentFrame = null;
        afterExec(frame, stmt);
        return frame;
    }

    protected T getFromFrame(int idx) {
        return (T) currentFrame[idx];
    }

    protected T[] getFrame(Stmt stmt) {
        return (T[]) stmt.frame;
    }

    protected void setFrame(Stmt stmt, T[] frame) {
        stmt.frame = frame;
    }

View on GitHub (pinned to b5bda4fb49)