Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.71k stars 237 forks source link

[Bug]: Rivet page needs to be refreshed if left running for long period. #278

Closed codemile closed 8 months ago

codemile commented 9 months ago

What happened?

Rivet shows "Page is having a problem" after running for awhile. I don't have exact steps to reproduce, but have seen this happen on a canvas with just a few text nodes and nothing else.

What was the expected functionality?

Rivet should run for long periods without issue.

Describe your environment

Windows, Node 20.10.0

Relevant log output

No response

Relevant screenshots

image

Code of Conduct

codemile commented 9 months ago

Here is memory usage on Windows. Just running a Rivet with an empty project and I'm not doing anything else, and memory usage is increasing at a constant rate. About 100mb per minute. This will be my steps to reproduce and I assume if I can stop the memory increasing then I've fixed the bug.

https://github.com/Ironclad/rivet/assets/50146659/ad193e1b-dccb-4761-9524-3adf090caea9

codemile commented 9 months ago

Appears to be a WebView2 related bug and I noticed (without knowing why) if you resize the Rivet window it releases the memory. Did some digging and it seems WebView2 has a 2GB limit so it doesn't matter how much Ram your PC has. I couldn't find any docs yet on reconfiguring the mem limit for WbeVIew2. I know it's not a fix but still would be nice to change it.

mindplay-dk commented 9 months ago

if you resize the Rivet window it releases the memory.

this definitely sounds like a bug in the library - you should probably try to isolate the issue and report it?

abrenneke commented 8 months ago

Fixed in e90d292c6013fa7be5aa8015519b5a805b004cfd