The previous commit's attribution was wrong and is corrected in the roadmap. WRONG: 'the crash is the skeleton walk's' rested on 0 crashes in 2 runs with the walk disabled -- a 25% coin flip presented as evidence. The oldest preserved dump has no [skl] line and ends on the old 'couldn't figure out how to MakeEntityRenderables' fallback, so it predates the walk and faults identically. WRONG: 'it lands at different points each time'. Every dump carries the same numbers to the byte (cr2 7000FA64, EIP 66D9). What varies is how far the log gets, not where the fault is. Resolving the address through btl4opt.map names it exactly: EulerAngles::operator=(const LinearMatrix&)+0x19, a read through the matrix reference. A binary scan finds all three call sites of that operator pass a stack local, so the 1.79GB pointer still has no static explanation -- that is now its own open item rather than a guess. Two theories killed cleanly by the new BT_STACK_LOG probe and a binary scan: ESP drift (drift=0 over 2002 frames; exactly one callee-cleans function exists in the whole binary) and an undersized stack (our PE and the shipped one have identical 1MB/8K geometry). What the probe found matters more: the application is parked in state=2, which is LoadingMission, not WaitingForLaunch. Priority 0 is where the interest manager queues renderer events during load, the gate needs that priority empty, and it never empties -- so the mission never launches and the renderer holds a blank screen by design. The fault arrives ~30s into that wait. Runs that DO launch never print a single [launch] line. So 'crashes half the time' and 'hangs during load' are one event seen twice. A 15x disagreement between two clocks looked like a reconstruction slip -- BTL4.CPP passes GetTicksPerSecond() where ApplicationManager wants a frame rate. Checked against the shipped binary before touching it: same instruction sequence, same kind of static float pushed. Authentic. Documented so nobody 'fixes' it. Also swept every subsystem DefaultData against its real C++ base. Fifteen chain past their immediate parent, but fourteen skip only classes that add no handlers and no attributes, and no class's attribute-ID base disagrees with its index chain -- so there are no gap slots there. The one real defect: Generator is a HeatSink but chained to Subsystem::MessageHandlers, so it ignored every ToggleCooling message. Fixed (compiles next build). Tooling: podrun.sh stages the build over BTL4REC.EXE, exports the host-side VPX board env -- without which the run dies at the iserver handshake rather than merely rendering nothing -- and archives every run's log, marking it -CRASH when it faulted. Before this the only preserved dump was an accident, on a rig where each run costs four minutes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
90 lines
3.0 KiB
Bash
90 lines
3.0 KiB
Bash
#!/bin/bash
|
|
#
|
|
# podrun -- stage the current build and start one pod run, keeping the log.
|
|
#
|
|
# podrun.sh [conf-basename] [tag]
|
|
#
|
|
# podrun.sh # pod_render_rec.conf, our build
|
|
# podrun.sh pod_render_shp # the shipped exe, for A/B
|
|
# podrun.sh pod_render_rec noskl
|
|
#
|
|
# WHY THIS EXISTS
|
|
#
|
|
# Two traps have each already cost a round of wrong conclusions on this rig:
|
|
#
|
|
# 1. STALE BINARY. The confs run BTL4REC.EXE out of ALPHA_1/REL410/BT,
|
|
# while the build writes build410/btl4opt.exe. Forgetting to copy means
|
|
# silently measuring the previous binary. This script always stages and
|
|
# always prints the timestamp it staged, so the evidence is in the log.
|
|
#
|
|
# 2. OVERWRITTEN LOG. serial3 truncates podlog.txt on every launch, so the
|
|
# only preserved crash dump on this rig was an accident. Runs are four
|
|
# minutes and the defect is intermittent, so a lost log is a lost run.
|
|
# Every run is archived to logs/<tag>-<n>.txt when the NEXT one starts.
|
|
#
|
|
# The rule this rig taught: an intermittent fault needs TWO AGREEING RUNS
|
|
# before you believe anything. One run is a story, not evidence.
|
|
#
|
|
set -e
|
|
|
|
BR=/c/VWE/TeslaRel410/emulator/render-bridge
|
|
IMG=/c/VWE/TeslaRel410/ALPHA_1/REL410/BT
|
|
SRC=/c/VWE/TeslaRel410/restoration/build410/btl4opt.exe
|
|
CONF=${1:-pod_render_rec}
|
|
TAG=${2:-$CONF}
|
|
|
|
mkdir -p "$BR/logs"
|
|
|
|
# archive whatever the last run left behind before serial3 truncates it
|
|
if [ -s "$BR/podlog.txt" ]; then
|
|
N=$(ls "$BR/logs" 2>/dev/null | wc -l)
|
|
PREV="$BR/logs/$(printf '%03d' "$N")-prev.txt"
|
|
cp "$BR/podlog.txt" "$PREV"
|
|
if grep -q "page you don't own" "$PREV"; then
|
|
mv "$PREV" "${PREV%-prev.txt}-CRASH.txt"
|
|
echo "archived previous run (CRASHED) -> $(basename "${PREV%-prev.txt}-CRASH.txt")"
|
|
else
|
|
echo "archived previous run -> $(basename "$PREV")"
|
|
fi
|
|
fi
|
|
|
|
if tasklist //FI "IMAGENAME eq dosbox-x.exe" 2>/dev/null | grep -qi dosbox-x; then
|
|
echo "killing running dosbox-x"
|
|
taskkill //F //IM dosbox-x.exe > /dev/null 2>&1 || true
|
|
sleep 2
|
|
fi
|
|
|
|
case "$CONF" in
|
|
*shp*)
|
|
echo "shipped side -- no staging"
|
|
;;
|
|
*)
|
|
[ -f "$SRC" ] || { echo "no build at $SRC -- run build410.sh link"; exit 1; }
|
|
cp -f "$SRC" "$IMG/BTL4REC.EXE"
|
|
echo "staged BTL4REC.EXE <- btl4opt.exe $(ls -la "$SRC" | awk '{print $5" bytes "$6" "$7" "$8}')"
|
|
;;
|
|
esac
|
|
|
|
#
|
|
# HOST-SIDE BOARD ENV. These belong to the VPX device inside DOSBox, not to
|
|
# the guest, so they must be exported here. Launching without them does not
|
|
# merely disable rendering -- the iserver handshake fails outright with
|
|
# "Protocol error : length 65535 too big" and the run dies during boot.
|
|
#
|
|
WORK="$LOCALAPPDATA/Temp/vwe-pod"
|
|
mkdir -p "$WORK"
|
|
export VPXLOG="$WORK/vpxresp.txt"
|
|
export VPX_RESPOND=1
|
|
export VPX_RENDER=1
|
|
export VPX_EXPLODE=1
|
|
export VPX_DUMPDIR="$WORK"
|
|
export VPX_NOMAIN=1
|
|
export VPX_CLEAR=0,0,0
|
|
export RIO_TAP="$WORK/riotap.txt"
|
|
|
|
rm -f "$BR/podlog.txt"
|
|
cd /c/VWE/TeslaRel410/emulator/src/src
|
|
./dosbox-x.exe -conf "$BR/$CONF.conf" > /dev/null 2>&1 &
|
|
echo "launched $CONF (tag=$TAG) -- pid $!"
|
|
echo "watch: tail -f $BR/podlog.txt"
|