"Switched access from wrong domain!" #35

Closed jonmsterling.com
Closed opened by jonmsterling.com
assigned to kento.tngl.sh

Got the following crash, which appears to be triggered in any forest where you have to build SVGs from LaTeX. I didn't notice this before because my SVGs were cached.

Fatal error: exception Failure("Internal error: Invalid_argument(\"Switch accessed from wrong domain!\")\nPlease report this at https://tangled.org/jonmsterling.com/ocaml-forester/issues")

This one is very urgent.

@kento.tngl.sh It seems like the problem may be a mis-use of submit_fork. In particular, switches are local to a domain (afaict) and it's a no-no to use a switch created in one domain from a different domain.

@jonmsterling.com Can you confirm this is now fixed? I added a test that fails before the latest changes.

Thanks! It appears to be kind of "fixed", but the behaviour is that I run forester build and then it waits without feedback for a very long time (presumably it is building the SVGs), and then once that is done it builds the trees themselves with appropriate live feedback.

It would be nice if we could restore the progress information so that the user can tell what is happening.

The progress should now be shown

It's working great now, thanks!

Thanks so much for fixing this so quickly. I wonder if there are any architectural lessons here that we might extract? Or are we sure that there's no other cross-domain uses of switches in the codebase?

Sign up or Sign in to add to the discussion.