gchq/CyberChef · error · OperationError
Ψ1 start must be between 1 and 43
Error message
Ψ1 start must be between 1 and 43
What it means
Thrown when the Ψ1 (S1) wheel start position args[52] is outside 1–43. Each Colossus wheel has a fixed number of cam positions; Ψ1 has 43, so a valid start must be between 1 and 43 inclusive.
Source
Thrown at src/core/operations/Colossus.mjs:433
addition: [
{Qswitches: [args[32], args[33], args[34], args[35], args[36]], Equals: args[37], C1: args[38]}
],
addNegateAll: args[39],
totalMotor: args[40]
};
const settotal = parseInt(args[42], 10);
if (settotal < 0 || settotal > 9999)
throw new OperationError("Set Total must be between 0000 and 9999");
// null|fast|slow for each of S1-5,M1-2,X1-5
const control = {
fast: args[43],
slow: args[44]
};
// Start positions
if (args[52]<1 || args[52]>43) throw new OperationError("Ψ1 start must be between 1 and 43");
if (args[53]<1 || args[53]>47) throw new OperationError("Ψ2 start must be between 1 and 47");
if (args[54]<1 || args[54]>51) throw new OperationError("Ψ3 start must be between 1 and 51");
if (args[55]<1 || args[55]>53) throw new OperationError("Ψ4 start must be between 1 and 53");
if (args[56]<1 || args[57]>59) throw new OperationError("Ψ5 start must be between 1 and 59");
if (args[51]<1 || args[51]>37) throw new OperationError("Μ37 start must be between 1 and 37");
if (args[50]<1 || args[50]>61) throw new OperationError("Μ61 start must be between 1 and 61");
if (args[45]<1 || args[45]>41) throw new OperationError("Χ1 start must be between 1 and 41");
if (args[46]<1 || args[46]>31) throw new OperationError("Χ2 start must be between 1 and 31");
if (args[47]<1 || args[47]>29) throw new OperationError("Χ3 start must be between 1 and 29");
if (args[48]<1 || args[48]>26) throw new OperationError("Χ4 start must be between 1 and 26");
if (args[49]<1 || args[49]>23) throw new OperationError("Χ5 start must be between 1 and 23");
const starts = {
X1: args[45], X2: args[46], X3: args[47], X4: args[48], X5: args[49],
M61: args[50], M37: args[51],
S1: args[52], S2: args[53], S3: args[54], S4: args[55], S5: args[56]
};
View on GitHub (pinned to 4290ea7539)
Solutions
- Set args[52] (Ψ1/S1 start) to an integer 1–43.
- Use 1-based indexing for all Colossus start positions.
- If copy-pasting wheel settings, verify each against that wheel's valid range.
Example fix
// before // args[52] = 0 // 0-based, throws (must be >= 1) // after // args[52] = 1
Defensive patterns
Strategy: validation
Validate before calling
const v = Number(args[52]);
if (!Number.isFinite(v) || v < 1 || v > 43) { /* fix Ψ1 start before run */ } Type guard
function inRange(v, lo, hi) { const n = Number(v); return Number.isFinite(n) && n >= lo && n <= hi; } Try / catch
null
Prevention
- Use 1-based indexing for all Colossus wheel starts.
- Each wheel has a distinct max (Ψ1 = 43).
- Validate per-wheel ranges before running.
When it happens
Trigger: Colossus.run checks args[52]<1 || args[52]>43. Zero, negatives, or values above 43 throw. Because comparisons are on raw arg values, a string like '50' coerces in the comparison, while '' (empty) yields false comparisons and slips through (latent gap).
Common situations: User sets a start position copied from a different wheel's range, enters 0-based index (0 instead of 1), or leaves a stale value after switching wheel programs.
Related errors
- Ψ2 start must be between 1 and 47
- Ψ3 start must be between 1 and 51
- Ψ4 start must be between 1 and 53
- Ψ5 start must be between 1 and 59
- Μ37 start must be between 1 and 37
AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13).
Data as JSON: /api/errors/b93e578a61f42196.
Report an issue: GitHub.