tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Resizing the dev tools on Kubuntu 24.04 causes a memory leak.

Open AlexanderHott opened this issue 1 year ago • 3 comments

Describe the bug

Resizing the window when the dev tools are open or just the dev tools causes the program to continuously consume memory.

Reproduction

  1. create a new app with bun create tauri-app@latest
  2. bun install
  3. bun run tauri dev
  4. Right click > Inspect Element
  5. Resize the window continuously for a few seconds

You should see memory usage increase without ever going back down

Expected behavior

The app should not consume and hold on to memory.

Full tauri info output

[✔] Environment
    - OS: Ubuntu 24.4.0 x86_64 (X64)
    ✔ webkit2gtk-4.1: 2.44.3
    ✔ rsvg2: 2.58.0
    ✔ rustc: 1.83.0-nightly (0ee7cb5e3 2024-09-10)
    ✔ cargo: 1.83.0-nightly (c1fa840a8 2024-08-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: nightly-x86_64-unknown-linux-gnu (default)
    - node: 21.4.0
    - pnpm: 9.6.0
    - yarn: 1.22.22
    - npm: 10.2.5
    - bun: 1.1.10

[-] Packages
    - tauri 🦀: 2.0.2
    - tauri-build 🦀: 2.0.1
    - wry 🦀: 0.44.1
    - tao 🦀: 0.30.3
    - @tauri-apps/api : 2.0.2
    - @tauri-apps/cli : 2.0.2

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.1
    - @tauri-apps/plugin-shell : 2.0.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite


### Stack trace

_No response_

### Additional context

This might be an issue with WebKitGTK, but I have no idea.

AlexanderHott avatar Oct 09 '24 18:10 AlexanderHott

This might be an issue with WebKitGTK, but I have no idea.

Yeah, i think it is. This is more or less a known issue. Every interaction with the IPC (which resizing also does) is somehow not released when the devtools are open... I'll mark this as an upstream issue though i'm not 100% sure about this myself (though i don't see any way for us to fix it on our side).

FabianLars avatar Oct 10 '24 16:10 FabianLars

I really like the idea of tauri, but some of the issues because of the platform's webview is annoying. I didn't open an issue, but the text selection is pretty janky, and it seems like its a 100% webkitgtk bug. I don't know how much support webkitgtk is getting, but it really seems to be huring the DX and UX of tauri. Are there any plans to put dev effort towards it / a different solution? Is there a different system webview linux users can install to avoid this?

AlexanderHott avatar Oct 15 '24 22:10 AlexanderHott

Are there any plans to put dev effort towards it / a different solution?

Yes, we're heavily understaffed though so don't expect miracles time wise (search this and the wry repo for cef, servo, qt if you want to know more)

Is there a different system webview linux users can install to avoid this?

No

FabianLars avatar Oct 17 '24 08:10 FabianLars