findObjectsIn used in computePoints

We have a custom link class that attempts to draw straight lines when possible but falls back to the standard implementation when there is an object in the way. So we use findObjectIn to look for any objects between the source and target of the link. However on a few of our diagrams the diagram doesn’t get displayed correctly (we have some images missing and some of the shapes are incorrectly sized). When I remove the call to findObjectsIn, the diagram is displayed correctly. Should findObjectsIn work in a computePoints implementation? Or is it possibly a timing issue as a refresh of our diagram shows the diagram correctly?

I’m not seeing any exceptions but I do see a caution in the console saying Caution: Failure routing “Link#6800(706528f2-11dc-4777-eb77-6a1fdafc0391)” probably because the .toNode has no real location or because the .toPort is not visible.

In general it should be OK (but slow!) to call findObjectsIn within an override of computePoints.

Is your code making sure not to do anything when either (or both) the fromNode or the toNode have no real location?

I removed the link it was complaining about and the diagram still failed to display correctly. I’m going to try writing a simple implementation of findObjectsIn to see if that fixes it

I replaced the call to findObjectsIn with my own implementation and it fixed the problem. So not sure of the underlying problem, but I guess I can move on.