Roadmap 0.11, Fixes

FX.446 BimCraft: "No IFC model is open with id null" now and then while a model loads

  • Fix
  • Built · in the lab
  • BimCraft

WHAT WAS WRONG: after an IFC opened, model-ui's opened() queued an idle-time warm (mui-keys.js warmPicks, PERF.37: the pick snapshot and the LOD list for Properties) that runs up to 4 s later. If another file was opened in that time, IfcModel.load closed the old model first, so the same editor read mid null until the new model was adopted; the queued warm then built the LOD list (lod-ui.js infoList -> new ModelWriter -> IfcPlacer -> GetModelSchema(null)) and threw "No IFC model is open with id null" (console error; seen in browser-views2, browser-part2, browser-r52 and twice in browser-04 under full runs, also on the code before PERF.71/78). A close of the model with the warm queued did the same.

CHANGED (2026-11-22, /lab a Discord member only): warmPicks remembers the editor and model id it was queued for and drops the warm when, at run time, the editor is another one, its model id changed (reopen, reload) or the model is not open (mid null or IfcAPI.IsModelOpen false); the newest open queues its own warm, and a click reads the model as before. File public_html/assets/apps/bimcraft/a Discord member/mui-keys.js; lib/ifc unchanged (sync --check ok).

TESTS: new tools/bimcraft-test/browser-open-race.mjs holds every idle callback and runs the warm exactly in the window (A: during a reopen over the house, B: after the office opened, C: after a close). On the old mui-keys.js (served with --old, nothing on disk changed) 5 passed, 2 failed (A and C: the exact error); on the new 24 passed, 0 failed in 3 rounds (the office's own warm still builds its LOD list, the stale one reads nothing). browser-04 three times: 170/2, 169/3, 170/2, never the id-null error (the 2 are the known Z-unit and 6.000 m rows the original fails too; the third in run 2 a walk-collision flake). BimCraft guard (browser-main-10) 10/0. node bin/test-bimcraft.mjs: 843 of 847 files open; the 4 that fail are 3 binary DXFs and the generated 1000 MB DXF (reader, not this code path), all 217 partial-mode checks pass.

UNTESTED: a full set of page tests run together (where browser-04 used to show it); other async readers of ST.editor during a load (e.g. a panel a person clicks mid-load) were not changed.

Add a comment

Community comments

No comments yet

Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.

Sign in or create a free account to add a comment.