Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heap snapshots stuck "building graph layout..." #175

Closed
IanButterworth opened this issue Mar 24, 2024 · 15 comments · Fixed by #179
Closed

heap snapshots stuck "building graph layout..." #175

IanButterworth opened this issue Mar 24, 2024 · 15 comments · Fixed by #179
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@IanButterworth
Copy link

IanButterworth commented Mar 24, 2024

If I take a heap snapshot in chrome devtools then open the graph mode in this viewer I just get building graph layout... it seems indefinitely. There's no error printed to the Window output log

Screenshot 2024-03-24 at 2 33 51 PM

The same is true of heap snapshots collected in the julia profiler, but that is more experimental, so chrome devtools is probably a better reproducer.

@IanButterworth
Copy link
Author

I notice that main has unreleased changes and wanted to see if the issue remains on latest main.

I tried to test latest master but couldn't figure out testing the extension.
Issues:

  • package.json is missing version and engines fields
  • vsce package doesn't create a vsix file to load as a local extension

@connor4312
Copy link
Member

If you run the Toggle Developer Tools command, is there any errors shown there?

Alternatively/preferably, are you able to share a heap snapshot where you see this reproduce?

@connor4312 connor4312 self-assigned this Mar 25, 2024
@connor4312 connor4312 added the info-needed Issue requires more information from poster label Mar 25, 2024
@IanButterworth
Copy link
Author

I'm not sure what a chrome heapsnapshot includes, from a security perspective. Would you mind confirming that your own chrome devtools heapsnapshots don't reproduce? If so I can look into sharing one from a blank VM or something.

@connor4312
Copy link
Member

connor4312 commented Mar 25, 2024

It includes some stuff about your program structure (by way of the heap structure) as well as strings allocated in the heap. If you prefer you can also email it to me at connor@xbox.com rather than posting publicly.

@IanButterworth
Copy link
Author

Ok. Emailed, thanks

@connor4312
Copy link
Member

Thanks! This week we're busy getting the next release out, but I'll take a look at this by the end of next week.

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Mar 25, 2024
@IanButterworth
Copy link
Author

Ah vscode dev tools does show an error in the console
Screenshot 2024-03-25 at 12 26 10 PM

@connor4312
Copy link
Member

Circling back here, how are you opening the graph?

The graph as implemented currently only is relevant for selected objects from the table. It doesn't handle opening the entire heap snapshot (something I should make more explicit) because doing so for heaps of any reasonable size results in absolutely terrible performance as the graphs get very massive very quickly 🙂

@IanButterworth
Copy link
Author

How do you open it for a given object?

@connor4312
Copy link
Member

By clicking the "graph" button beside an object in memory:

Image

connor4312 added a commit that referenced this issue Apr 4, 2024
It's not valid to open a file directly versus focusing a single element. Make it a webview panel instead to avoid the usability issue.

For #175
@IanButterworth
Copy link
Author

I just realized that and it works for the julia heap snapshot! 👍

Screenshot 2024-04-04 at 4 30 50 PM

The behavior I was talking about was from opening via the file open dialog (3rd option here)

Screenshot 2024-04-04 at 4 32 28 PM

Perhaps the UI could give a hint to use the icons if the top level load is taking a long time?

@connor4312
Copy link
Member

connor4312 commented Apr 4, 2024

I made a PR to remove the graph view from that switcher #179

@IanButterworth
Copy link
Author

Is there a place the graph icon is explained? In hindsight it's obvious but it might be worth explaining it in the extension landing page?

@connor4312
Copy link
Member

Good idea, added (in the same PR)

@IanButterworth
Copy link
Author

Looks great, thanks

connor4312 added a commit that referenced this issue Apr 4, 2024
* fix: make heap snapshot graph a panel instead of an editor

It's not valid to open a file directly versus focusing a single element. Make it a webview panel instead to avoid the usability issue.

For #175

* add mention of retainers graph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants