Repository navigation
Commit 121b086
Fix a real OpenCV.js readiness race hanging the seeded demo
cv.onRuntimeInitialized (the callback OpenCV.js is supposed to call once
its WASM runtime is ready) could silently never fire, even though OpenCV
was actually fully loaded and usable underneath - confirmed live: cv.Mat
existed and worked while the app sat frozen on "Loading OpenCV.js..."
for 400+ seconds, with nothing else watching for real readiness. Every
path that awaits cvReadyPromise (Compute Background, the seeded demo's
skip-to-results restore, resume) hung at that exact point - "the seeded
demo just loads like usual, need to retrack everything" was this same
hang, not a regression in the restore logic itself.
Fixed with a polling fallback alongside the callback: every 250ms, does
a real `new cv.Mat().delete()` call (proof OpenCV actually answers, not
just that the property exists) - whichever signal fires first wins,
idempotent so neither path double-fires. Root cause not fully pinned to
one line in OpenCV.js's own bootstrapping (looks like a build/timing
quirk in this exact pinned version), so the fix doesn't depend on
diagnosing that exactly. Verified locally end to end: a full seeded-demo
run now correctly restores all 24 real overrides and completes with
"tracking skipped, everything else recomputed fresh."
Also this pass: the events-table legend's Poke/Entry swatches were
showing the Raster tab's bold solid colors, not the pale/white colors
this specific table actually uses (an earlier readability override) -
legend now matches what the table really shows. Logged the fixed-size
tracking crosshair/X as a real, deliberately-deferred polish item in
KNOWN_LIMITATIONS.md, found during a full dry run through all three
clips.
85/85 tests passing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent a1c130d commit 121b086
3 files changed
Lines changed: 47 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
412 | 420 | | |
413 | 421 | | |
414 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | | - | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
1268 | 1284 | | |
| 1285 | + | |
1269 | 1286 | | |
1270 | 1287 | | |
1271 | 1288 | | |
1272 | 1289 | | |
1273 | | - | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
1274 | 1301 | | |
1275 | 1302 | | |
1276 | 1303 | | |
| |||
0 commit comments