Dev Tools · 1h ago
Cross-Runtime Bug Hunting: 301 Duplicate IDs in Browser, 0 on JVM
A developer found that a match-3 game's ID generation produced 301 duplicate IDs in the browser but none on the JVM. The bug was caused by System.nanoTime() being clamped in browsers due to Spectre mitigations. The fix replaced the timestamp with a simple static counter.
Meridian48 take
This is a sharp reminder that code relying on clock resolution is fragile across runtimes, and cross-runtime testing can catch subtle bugs without needing a spec.
Read the full reporting
301 duplicate IDs in the browser, 0 on the JVM: one real bug, end to end →
DEV Community
cross-runtime-testingteavm