AX notes · Incident

Rapid taps and an unlocked Retry button: a 600 ms result-card lock, and the 28 crashes a stress run found next

Keep result-card buttons from accepting taps for a short while after they appear (600 ms in this game). If a burst of taps runs on, the next tap can restart the level before the player has seen the result.

By Stephen Game development 11 min read Last updated

If a result card appears while the player is still hammering the screen, a leftover tap can hit the card's Retry button and restart the level before the player has even seen the result. On October 2, 2026 we reproduced an operator report ("I still had hearts and it suddenly started over") from Arrow Knots, our then-unreleased puzzle game, on a Galaxy S21: eight taps on a blocked arrow, 70 ms apart, drained all three hearts in under 250 ms, and the loss card that followed had a Retry button that took taps the instant it showed.

After locking the card buttons for 600 ms, the operator asked for a stress run that plays all 300 levels back to back. Its first pass crashed the app 28 times; the cause was a spring animation overshooting until an index in the drawing code hit -1. Below: how both defects were reproduced and fixed, and how to check another game for the same things.

Contents (10)
  1. Three hearts gone within 250 ms, and no lock on the card's button
  2. Ignore the bouncing arrow, drop hearts one at a time, lock the card for 600 ms
  3. The agent guessed the "crash" was a misreading. The app could crash after all
  4. First stress run: 5,091 seconds, 30 failures
  5. A spring overshot and the draw code read points[-1]
  6. We blocked one arrow, not the whole board
  7. 1.8 million fuzz taps never touched the draw code
  8. From an eight-tap burst to a 300-level run in six steps
  9. Next on an R8 release build: the level-22 tap and the eight-tap burst
  10. FAQ

Three hearts gone within 250 ms, and no lock on the card's button

In Arrow Knots you tap an arrow and it slides out head first. If something is in the way, it pokes forward, bounces back, and you lose a heart. On level 50 the navy arrow in the top-left corner was blocked by a purple arrow near the top right. The agent tapped that arrow over adb:

adb shell 'for i in 1 2 3 4 5 6 7 8; do input tap 360 534 & sleep 0.07; done; wait'

Every tap on that arrow during the bounce back counted as a new mistake. The device log shows three blocked taps within 160 ms; the other five taps arrived after game over. Per the session report, the heart display jumped to the final count in a contact callback, so the hearts were still on screen at the moment the last one was lost. On a loss the code waits 550 ms and shows the loss card, and the card's button had no input lock. In this run the last tap (08:37:11.427) came before the card appeared, and the log shows no restart.

The operator's own guess in the report, that it seemed to happen on mistakes, pointed the right way. The commit message names this path as the cause: the next tap lands on the loss card's Retry button and restarts the level unseen.

The operator's symptom could also be explained by the crash found later. That crash also came from tapping a blocked arrow, which is a mistake, and reopening the app after it starts the level over. A crash can restart the level even with hearts left; a restart through the card means the hearts were already at zero and only the display lagged. What this session reproduced on the device was the crash itself, and we read the card path as a possibility that follows from the button's missing lock in the code. With no log from the operator's S24 we could not tell which one it was, and the two fixes below closed both paths.

Ignore the bouncing arrow, drop hearts one at a time, lock the card for 600 ms

The first fix made four changes:

The same eight-tap burst now cost two hearts instead of three; the eighth tap arrived after the arrow was home and counted as a new mistake. Hammering the button area right after the loss card appeared left the card in place, and a tap after 600 ms restarted the level as it should.

Arrow Knots store screenshot: the level 23 clear card with three stars, time, best combo, mistakes, score and a Next button, with three hearts at the top
An Arrow Knots result card (store screenshot). Buttons on cards like this now ignore taps for 600 ms after they appear.

The agent guessed the "crash" was a misreading. The app could crash after all

The report had a second symptom: tap the top-left of level 50 quickly and the app closes. On the build before the fix, the agent mixed rapid taps on that arrow, the pause button and the Retry button for 30 seconds, and ran three fresh-install monkey runs on the fixed build. No crash showed up in the log. In its 08:49 report the agent wrote that the operator may have taken the sudden restart for a crash, and asked for the operator's Galaxy S24 to be plugged in over USB if the app had really closed.

The operator had the fix committed, then asked for a hard stress test, coordinated with the other session so nothing was left broken. The crash came out of the suite built for that request. Don't close an unreproduced crash as "the user probably misread it." Run a test that plays the game for well over an hour on the same device first (85 minutes for the first pass here, 99 for the rerun).

First stress run: 5,091 seconds, 30 failures

The agent started with an engine fuzz test: 20 random games on each of the 300 levels, about 1.8 million taps through the rules engine, with zero rule violations, exceptions or dead ends. Then a stress script ran on the S21 in four phases:

Each level checks logcat for FATAL EXCEPTION and ANRs and checks that the process is alive with pidof (a foreground check was added after the first pass, because of level 37). The first pass took 5,091 seconds and reported 30 failures. Twenty-eight were what the script judged a crash or ANR, the first on level 80 and the last on level 298. Cumulative failures were 1 by level 50, 5 by level 100, 11 by level 200 and 30 by level 300. The other two were not app bugs: on level 37 the app went to the background without any crash record (we took it as something outside sending it home), and on level 84 uiautomator could not read the Next button while confetti was animating.

Bar chart: the first 300-level stress pass had 28 crashes and 2 harness or environment failures; the rerun after the fix had none.
Of the first pass's 30 failures, 28 were crashes; the rerun after the fix had none.

The crash buffer had already been cleared, so the top of the first stack trace was gone and only the draw path was left. That means we could not confirm directly that all 28 were the same exception; we treat them as one cause because the rerun after the fix had zero crashes.

A spring overshot and the draw code read points[-1]

The agent's next guess was memory. Twenty-five levels from level 76 in a fresh process passed with no failure, and the first pass had only crashed after long play.

The 10:28 note gives one clue, that the crashes clustered in the later levels with larger boards (200 and up); the surviving stack was also only the draw path. The agent suspected board size over a leak, guessed that a spring overshoot pushed the index in Track.body() out of range, and at 10:38 tapped an arrow with a far blocker. Memory was checked along the way: a rerun logging memory showed GPU memory moving between 180 and 240 MB rather than climbing.

Arrow 6 on level 22 sits 8.55 cells from the arrow that blocks it. One tap closed the app:

java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 23

A blocked arrow pokes forward all the way to its blocker, so a longer gap means a longer poke. It springs home with spring(dampingRatio = 0.5f, stiffness = 600f), which, per the commit message, overshoots behind the start by about 16% of the poke. The commit message puts the line at "a blocker 6+ cells away," and the TrackTest comment notes an arrow with its blocker 8.55 cells away springing back to travel of about -1.4; per the session log, that is arrow 6 on level 22. Below -1, Track.body(t), which builds the arrow's body polyline, uses floor(t) + 1 as an index and reads points[-1]. That code runs inside draw, so one exception takes the whole app down.

Level 50 has no such arrow at the start, which is why 30 seconds of scripted adb tapping found nothing. Gaps grow as the board clears, so any level could hit it mid-game, and the larger boards in later levels hit it more often.

The second fix bounds the spring with anim.updateBounds(lowerBound = -0.12f) and, if the bound is hit (AnimationEndReason.BoundReached), finishes the trip home with a 120 ms tween. Track.body clamps its index with coerceAtLeast(0) and k < points.size, so no travel value can crash it. The regression test TrackTest draws every arrow in the level pack from travel -40 to 40 past the exit in steps of 0.37, and the agent first confirmed that it fails against the old Track.kt. Three taps on each of four far-blocked arrows (levels 22, 72, 92 and 122) no longer crashed, and the full rerun (300-level campaign plus burst, lifecycle and 12 monkey runs) took 5,935 seconds with zero failures, with the fresh-install monkey check at 3/3.

We blocked one arrow, not the whole board

Locking all board input for a moment would also have stopped the tap problem. The first fix only drops repeat taps on the arrow that is bouncing. The commit just before it added a combo that rewards removing arrows in quick succession, and we think a global lock on a combo board would block legitimate fast play too; the record doesn't say why it wasn't used. Locking only the result card was another option, but hearts would still drain within 250 ms and the player would land on a loss card without knowing why. So the tap guard, the one-heart-per-contact display and the card lock shipped together.

On the crash side, making the draw code safe would have been enough to stop the app dying. The spring bound went in as well because of a reason in the code comment: the overshoot drags the arrow's tail cells behind its start, so the drawing goes wrong even without a crash.

1.8 million fuzz taps never touched the draw code

The engine fuzz test passed on the same day the app crashed 28 times. The rules engine only tracks rule state (blocking, removal, hearts); it never sees animation travel or drawing indexes.

The stress script assumes a debug build. It writes the level into the progress file with run-as and computes tap positions from board bounds printed in a debug log. As of the fix the suite had never run on an R8-minified release build, and only one device, the S21, had run it.

From an eight-tap burst to a 300-level run in six steps

  1. Pick an object that bounces when blocked and send the eight-tap burst above, 70 ms apart. Check that hearts lost match mistakes made, and that a person can actually see the result screen.
  2. Count repeat taps on an animating object as one mistake. Keep a per-object "bouncing" set, and let a tap through once the object can actually leave.
  3. Ignore the result card's buttons and the back key for a fixed time after it appears (600 ms here). Use the same constant for every button that changes the level, such as next and retry.
  4. Find draw code that turns an animation value into an array index and make it safe for any value. Bound springs with updateBounds and finish with a tween on BoundReached.
  5. Write a unit test that draws every shipped object at out-of-range values, and confirm it fails with the fix reverted.
  6. Play every level back to back in one process, mixing deliberate mistakes, deliberate losses with a Retry tap as the card appears, simultaneous taps, lifecycle events and monkey. Judge on three signals (crash or ANR in the log, the process alive, the app in the foreground) and write the full trace to a file as soon as a crash is seen. Our script checks these three after each level (replace the package name with your app's):
adb logcat -d | grep -E "FATAL EXCEPTION|ANR in your.package"
adb shell pidof your.package
adb shell "dumpsys window | grep mCurrentFocus"

The tutorial crash that the fresh-install monkey caught the night before is written up in VIBRATE crash and the fresh-install monkey test.

Next on an R8 release build: the level-22 tap and the eight-tap burst

Next is one tap on arrow 6 of level 22 and the eight-tap burst on level 50, on an R8 release build. Nothing in the record says how 600 ms was chosen, so timing card-to-first-tap in real play recordings and revisiting the value is still open.

FAQ

How do I stop rapid taps from hitting a button that just appeared in Compose?

This game uses clickable(enabled = armed) plus one state that a LaunchedEffect turns on 600 ms after the screen appears. A typical debounce, which takes the first tap and drops the rest, still accepts a first tap carried over from the previous screen, so the lock is timed from when the screen appeared.

Why didn't the monkey test find it?

The fresh-install monkey starts in the tutorial and the first levels. The defect needs a tap on an arrow whose blocker is 6 or more cells away, like arrow 6 on level 22 at 8.55 cells, and it first appeared on level 80 of a run that cleared all 300 levels.

From the October 2 record: two commits in the game repository (08:50 and 12:23 Korea time) and the agent session log between them (device logs and stress-run output).

This note is written from values SugarMount measured itself; an AI coding agent was used to draft it.

All notes on Game development · All AX notes