ModelInference / perfume-frontend

Web-based frontend for Perfume tool
Other
1 stars 0 forks source link

Re-inferring a model causes dagre-d3 failure in Chrome 48+ #97

Closed bestchai closed 4 years ago

bestchai commented 4 years ago

On Chrome 48+, models now infer normally (following the SVGGraphicsElement.getTransformToElement() fix/workaround). However, if you enter a log and regexes and successfully infer a model but then press Infer model again without changing the input, the model often shows up broken. See below for the results with the built-in "Browser caching" example.

brokenmodel

This occurs on Chrome 48 and 49, often but not every single time. It always produces the following stack trace, which is somewhat but not extremely informative.

stacktrace

It seems to indicate that we fail to (re?)populate some part of the model (likely edges) before asking dagre-d3 to draw everything.

Because this occurs on Chrome 48+ but not Firefox (no other browsers tested), it seems likely that it's related to the missing SVGGraphicsElement.getTransformToElement() function to which dagre-d3 applied a workaround. A potential ultra-fast test would be to see if my old manual workaround fixes this issue and therefore if dagre-d3's official workaround is faulty.

[Issue created by ohmann: 2016-02-02] [Last updated on bitbucket: 2016-02-10]

[Comment created by stanleyrya: 2016-02-08] @ohmann: as far as I can tell, this takes care of the issue :)

2749031cb971

[Comment created by ohmann: 2016-02-03] That would be a good thing to try. Ryan, if your Chrome updated to 48 and you can reproduce this bug, see if Yuriy's suggestion fixes it.

[Comment created by brunyuriy: 2016-02-02] I've verified that this happens on my Chrome 48. When we select a new log from the "examples" button menu, the model and invariants clear, preventing this problem from happening. Should we just run that clear procedure whenever the "Infer model" button is clicked?

[Comment created by ohmann: 2016-02-10] Merged in: 532f4e20b6e5