NationalSecurityAgency/ghidra · error · RuntimeException

No transaction

Error message

No transaction

What it means

RuntimeException('No transaction') thrown by State.requireTx() when the tx field is null. Commands that mutate the trace must do so inside an RmiTransaction; requireTx() ensures one is open. Calling a mutating command outside a started transaction fails here.

Source

Thrown at Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/rmi/jpda/JdiCommands.java:102

			throw new RuntimeException("No trace started");
		}
		return trace;
	}

	public void requireNoTrace() {
		if (trace != null) {
			throw new RuntimeException("Trace already started");
		}
	}

	public void resetTrace() {
		trace = null;
		resetTx();
	}

	public RmiTransaction requireTx() {
		if (tx == null) {
			throw new RuntimeException("No transaction");
		}
		return tx;
	}

	public void requireNoTx() {
		if (tx != null) {
			throw new RuntimeException("Transaction already started");
		}
	}

	public void resetTx() {
		tx = null;
	}

}

public class JdiCommands {

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Start a transaction (the start-tx command) before issuing mutating trace commands.
  2. Guard by checking state.tx != null before mutating, or catch RuntimeException.
  3. After commit/reset, open a new transaction before further mutations.

Example fix

// before
state.requireTx().mutate(...);

// after
if (state.tx == null) {
    throw new IllegalStateException("Open a transaction before mutating the trace");
}
state.requireTx().mutate(...);
Defensive patterns

Strategy: validation

Validate before calling

if (state.tx == null) {
    throw new IllegalStateException("Open a transaction first");
}
state.requireTx().mutate(...);

Try / catch

try {
    state.requireTx();
} catch (RuntimeException e) {
    if ("No transaction".equals(e.getMessage())) {
        // start a transaction before mutating
    }
}

Prevention

When it happens

Trigger: Issuing a trace-mutating command that calls requireTx() before a transaction has been started (tx is null), or after the transaction was committed/reset (resetTx sets tx=null).

Common situations: Command sequence that skips the start-transaction step; transaction was ended/reset and mutations continued; a long script whose transaction timed out or was committed mid-flow.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/49ce66ef7516c598. Report an issue: GitHub.