Netflix / flamescope

FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.
Apache License 2.0
3k stars 168 forks source link

flame graphs sometimes do not render correctly; uncaught exception #50

Closed bmahler closed 6 years ago

bmahler commented 6 years ago

Sometimes when I select ranges of time the flamegraph comes out broken (no text and not clickable). Looking at my console I see the following exception:

Uncaught (in promise) TypeError: Cannot read property 'match' of undefined
    at main.js:17
    at F (main.js:17)
    at SVGRectElement.<anonymous> (main.js:17)
    at SVGRectElement.<anonymous> (main.js:1)
    at G.each (main.js:1)
    at G.attr (main.js:1)
    at HTMLDivElement.<anonymous> (main.js:17)
    at G.each (main.js:1)
    at T (main.js:17)
    at O (main.js:17)

It appears to happen when I pick bigger time windows. Attached a stack file that you can drop into examples. Selecting the bottom left to top right pixels leads to a broken flame graph. Smaller selections can also trigger the issue.

mesos-agent.stacks.1.zip

Here's an example of what it looks like:

image

spiermar commented 6 years ago

Apparently this is being caused by empty frame name strings strings. The flame graph plugin should handle this, so I'll submit a fix for it, but it also might be a trace file parsing issue generating the empty frame names.

spiermar commented 6 years ago

d3-plugin is patched and the flame graphs are not broken anymore, but the lack of a name is due to a parsing issue. It isn't parsing ->. This should be fixed shortly too.

spiermar commented 6 years ago

b67c750ce7fe4fca6c0a67326a889516dec36475 closes the issue.

brendangregg commented 6 years ago

I hopefully fixed this with b67c750ce7fe4fca6c0a67326a889516dec36475. Please reopen if it is still an issue.

bmahler commented 6 years ago

Looks good on all of my examples, thank you very much for fixing this!