Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/state/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,15 @@ export class Extension implements vscode.Disposable {
* Runs the given async function, displaying an error message and returning
* the specified value if it throws an exception during its execution.
*/
public async runPromiseSafely<T>(
f: () => Thenable<T>,
public runPromiseSafely<T>(
f: () => T,
errorValue: () => T,
errorMessage: (error: any) => string,
) {
this.dismissErrorMessage();

try {
return await f();
return f();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this! Even if it does work this is not desirable; we want to await f here, otherwise we won't catch potential errors.

} catch (e) {
if (!(e instanceof CancellationError)) {
this.showDismissibleErrorMessage(errorMessage(e));
Expand Down
227 changes: 227 additions & 0 deletions test/suite/commands/synchrony.md
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very flaky unfortunately. As said in the ticket, whether a problem occurs or not is very dependent on hardware (and the rest of the system); I encounter the bug fairly frequently on my workstation after hours of coding, but not at the start of a session or on my home computer (M3 MacBook).

Copy link
Contributor

@petertheprocess petertheprocess Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for me with my high-end workstation, is there any memory leak or doing some operation whose complesity grows with time? For me it only happens when the workspace is large and keep open for hours.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect there's a memory leak somewhere, but haven't found it. At some point I expected the problem was the history buffer growing, but even after limiting it in a local build of Dance nothing changed.

It's also been much, much worse for the past couple of months. Now both my workstation and MacBook start to struggle hard after <1 hour of editing. It seems different documents degrade at different rates, though.

Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
# 1

> behavior <- character

```

^ 0




































































b
```

## 1 down
[up](#1)

- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump
- .select.down.jump

```





































































b
^ 0
```
Loading