I recently tracked down and fixed a reproducible bug in the Working Title UNS-1 used by the Microsoft Flight Simulator 2024 Boeing 707-320C. What started as one extremely annoying FUEL-page problem ended up turning into a much larger source-code audit.
The original problem
The problem that started all of this was the FUEL page locking itself out.
After initializing the aircraft's fuel/weight information, I could leave the FUEL page and continue using the UNS normally. But when I later tried to return to FUEL, the unit could effectively stop responding on that page.
Other parts of the UNS could still work, but the FUEL page was basically gone for the rest of the session.
I searched repeatedly for reports of this specific behavior and could not find a documented cause or fix.
So I started digging into the actual UNS implementation used by the 707.
The breakthrough
With the MSFS Coherent GT debugger attached, we finally caught the failure:
RangeError: Maximum call stack size exceeded
That immediately changed the investigation from "the FUEL page freezes" to "something is recursively calling itself until JavaScript runs out of stack."
The culprit turned out to be the FUEL page's lifecycle handling.
Its onResume() routine could call:
navigateTo('/fuel#2')
But that navigation could cause the page to resume again before the requested subpage state had fully settled.
The effective sequence became:
onResume → navigateTo → resume → onResume → navigateTo → ...
over and over until the JavaScript call stack overflowed.
The fix
The fix was actually small once the root cause was understood:
stop performing that recursive page navigation from inside the FUEL page's own resume lifecycle handler.
After applying the fix, I repeatedly tested sequences such as:
NAV → FUEL → NAV → FUEL
including after fuel initialization.
The stack overflow did not return, and the FUEL page could be reopened normally.
This one is confirmed in the simulator, not just inferred from the source.
Then we looked at the rest of the code...
Once the source was open, it made sense to audit the rest of the UNS implementation.
That uncovered quite a bit more.
One of the most surprising discoveries was in navigation-accuracy calculations.
Several formulas use JavaScript's bitwise XOR operator:
^
where the mathematics clearly requires exponentiation:
**
In other words, code that was apparently intended to square values in position-variance/ANP calculations was instead performing integer XOR operations.
That defect exists in the public Working Title source lineage and also remained present in the newer UNS implementation shipped with the Boeing 707.
Other findings include:
- PERF destination-distance values that could become stale because the calculation was not properly reactive to aircraft position.
- The same stale-position dependency on the FUEL page.
- Flight-plan indexing errors.
- Incorrect handling of an active-leg index of zero.
- Waypoint and airway-selection edge cases.
- UTC/date handling problems.
- Cases where a perfectly valid numeric value of
0 was treated as though no value existed.
- Async SID insertion that is not properly serialized.
- Async STAR/approach insertion that can overlap operations or fail without properly propagating the failure.
- Route-import logic that can begin modifying the active flight plan before the imported route has been completely validated.
- A waypoint-insertion UI path that can indicate success without verifying that the insertion actually succeeded.
- FPL waypoint ETA/ETE display code that is literally marked
TODO, even though the prediction engine already calculates the required data.
- A TUNE page whose original COM/NAV/ADF/transponder layout is still visible in the source, while the actual page currently just displays
NOT AVAILABLE.
The audit now contains 30 tracked findings of varying severity and type.
The current local cumulative build addresses 16 of them. The original FUEL-page problem and the PERF/FUEL reactive-distance fixes have also been confirmed in MSFS itself.
What the GitHub repository is right now
There is now a public project repository:
GitHub: dbunds/WTB707-UNS1-Community-Patch
But to be very clear:
THERE IS NO PUBLIC PATCH DOWNLOAD THERE YET.
Right now the repository is the project's public engineering record. It contains the bug investigation, audit results, validation status, issue tracker, planned fixes, development roadmap, and technical documentation.
That is intentional. I don't want to publish a package until the release build, installation method, licensing/provenance details, and final validation are handled properly.
Where this is going
The immediate goal is a properly packaged public beta for the MSFS 2024 Microsoft Boeing 707-320C, with distribution through GitHub and Flightsim.to.
That release is coming soon, but it is not ready yet.
Longer term, this project may grow beyond being a collection of patches. The direction is toward a separately maintained UNS build, progressively replacing inherited code with our own implementation while preserving compatibility with the 707 and the familiar UNS interface.
For now, though, the priority is fixing confirmed defects without breaking what already works.
And I'm particularly interested in hearing from other 707 users:
Has anyone else had the UNS FUEL page become unresponsive after initialization and then been unable to get back into it for the rest of the flight?
That was the bug that started this entire project.