flamegraph
flamegraph copied to clipboard
Error in generated SVG: invalid Char value 27 (<0x1b>) (macOS)
The generated svg cannot be opened. Firefox refuses to load the svg at all while Chrome shows this:
This page contains the following errors: error on line 414 at column 105864: PCDATA invalid Char value 27 Below is a rendering of the page up to the first error.
The problem is the char <0x1b>
at the specified location in the file:
When I delete it from the file, it loads without errors.
What OS are you on? I'm guessing this might be part of the perf or dtrace data.
I'm on macOS 11.6 (as stated in the title).
@jonhoo have you seen anything like this before? Seems like this might make more sense as an inferno issue?
Happy to help if you have more questions. The project I benchmarked is https://github.com/ffactory-ofcl/fourinarow-server in case you want to try.
Huh, no, haven't seen anything like it. It does suggest that there's a weird Unicode code point in a function name or something. The fact that you get a SVG suggests that Inferno is handling the code point just fine, but it needs to be escaped somehow in the output. It'd be helpful to know some more context here, like where this code point appears in the SVG, and what value it's a part of.
The context would be my project, which I linked above. You can try building and running it for a few seconds, it'll most probably contain the code point - that is if the bug comes from my project and not from running on mac.
Sidenote @jonhoo: big fan of your videos :)
Ah, sorry, what I meant was context in the sense of the surrounding context of the indicated file. That is, can you copy-paste the surrounding lines of the SVG, as well as (if you can) the lines of the generated trace file that's fed into inferno that contain the problematic code point?
I am able to reproduce when using VSCode ritwickdey.LiveServer
extension to serve the above SVG.
I'm having the same issue, on macos as well.
See earlier comments from @jonhoo. I will close this; please direct future issues to the inferno issue tracker.
I've created https://github.com/jonhoo/inferno/issues/313 to track this issue upstream.