tools+docs: a crash-free mission run, a capture that caught no geometry, and a correction
ship_capture_window.sh polls for the flight screen and presses F10 the moment it appears rather than after a fixed sleep. One run gave three results. First, the mission ran with ZERO crashes through t+152s - the first clean mission run, where the three before it ended at 13243 / 11898 / 11497 - and it renders and plays: player ship, starfield, full HUD, no dialog. Second, the capture armed and wrote its file, so the mechanism works in-mission. Third, and against expectation, the file holds NO ship geometry. 329KB, 181 deduped draws: 180 of them share a single vertex shader, all stride=28 vcount=3 prim=8 at full-screen coordinates, plus one full-screen quad, and not one draw has positions outside the 1280x720 rectangle. The budget is not the limit - kShipCaptureBudget is 8000 and only 181 distinct (vbase, WVP) pairs were seen - and the scene was definitely drawing. The known-good capture from an earlier session is 2.9 MB. Fourth, a correction to the previous commit. It said the cache is "REFUTED as the cure". Too strong: this run used the IDENTICAL complete cache as tut4 and produced 0 crashes against tut4's 11497. What four runs support is that a complete cache is not SUFFICIENT to prevent the storm and that run-to-run variance dominates a 3-run comparison - not that the cache does nothing. Next step is static: compare this capture's shape against the known-good one to find why the 3D draws never reach CaptureShipDrawForRE.
This commit is contained in:
45
tools/re-capture/ship_capture_window.sh
Executable file
45
tools/re-capture/ship_capture_window.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
# Take a ship capture INSIDE the mission's clean window.
|
||||
#
|
||||
# The 0x82307128 crash storms the tutorial 56-112s after it starts, but both
|
||||
# runs with a warm cache gave ~1 minute of clean, advancing mission first
|
||||
# (docs/re/title-crash-stl-tree.md). F10 has to be pressed in there, so this
|
||||
# polls for the flight screen and fires immediately rather than on a fixed sleep.
|
||||
#
|
||||
# ship_capture_window.sh [outdir]
|
||||
set -u
|
||||
export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98
|
||||
SD="$(cd "$(dirname "$0")" && pwd)"
|
||||
OUT="${1:-/sylph-home/re/shipcap}"
|
||||
mkdir -p "$OUT"
|
||||
rm -f "$OUT"/xenia_ship_capture_*.log
|
||||
|
||||
( cd "$OUT" && ATTEMPTS=1 timeout 1500 "$SD/tutorial_launch.sh" "$OUT" > "$OUT/launch.log" 2>&1 ) &
|
||||
LAUNCH=$!
|
||||
|
||||
win=""
|
||||
deadline=$(( SECONDS + 900 ))
|
||||
fired=0
|
||||
while [ $SECONDS -lt $deadline ]; do
|
||||
sleep 4
|
||||
screenshot /tmp/sc.png >/dev/null 2>&1 || continue
|
||||
s="$(python3 "$SD/screen_id.py" /tmp/sc.png 2>/dev/null | awk '{print $1}')"
|
||||
if [ "$s" = "flight" ] && [ "$fired" -eq 0 ]; then
|
||||
win="$(xdotool search --name 'Xenia-canary' 2>/dev/null | tail -1)"
|
||||
[ -n "$win" ] || { echo "no window"; break; }
|
||||
echo "FLIGHT at ${SECONDS}s -> F10"
|
||||
xdotool windowactivate --sync "$win" 2>/dev/null; sleep 0.5
|
||||
xdotool key F10; sleep 4
|
||||
# A second press: the capture takes one batch of draws, and the first frame
|
||||
# of a mission may not have the ships in it yet.
|
||||
xdotool key F10
|
||||
fired=1
|
||||
sleep 25
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "--- captures written ---"
|
||||
ls -la "$OUT"/xenia_ship_capture_*.log 2>/dev/null || ls -la /sylph-home/re/xenia_ship_capture_*.log 2>/dev/null || echo "(none)"
|
||||
wait $LAUNCH 2>/dev/null
|
||||
echo "--- crash dumps: $(grep -ac 'CRASH DUMP' "$OUT/canary.stdout" 2>/dev/null) ---"
|
||||
Reference in New Issue
Block a user