Skip to content

render-svg-call-graph: issues in correctly rendering the SVG #600

Description

@NGC-4151

I'm testing rev.ng's SVG rendering capabilities with the following commands (on the latest Docker build of the develop branch, version 97f20b7):

revng2 quick artifact render-svg-call-graph app.x86.elf -o x86-callgraph.svg
revng2 quick artifact render-svg-cfg app.x86.elf -o x86-cfg.svg

Both generated SVGs seem to suffer from a few issues that prevent them from being rendered properly:

  1. Top-level tags/comments/whatever are preventing the files from being opened. The callgraph begins with something like /binary: <svg width="2565.199951" xmlns=..., causing Chromium-based apps (including VS Code) to fail to open the file; here's an example error message:
This page contains the following errors:
error on line 1 at column 1: Start tag expected, '<' not found

You can fix this by removing the text or using proper XML comment syntax.

  1. A typo prevents nodes from being distributed correctly on the screen. viewbox should be viewBox.
  2. The file is missing CSS and/or other styling information, leaving edges invisible and nodes solid black. Node labels are also invisible, but I'm not sure if that's an artifact of the lack of styling or the XML structure.

Thanks for your work on the project! Let me know if there's any other information I can provide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions