vuejs / devtools-v6

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools-v6.vuejs.org/
MIT License
24.69k stars 4.14k forks source link

Infinite loop bug. When the developer tools are closed, an infinite loop bug may occur. #2182

Closed nocpp closed 3 months ago

nocpp commented 3 months ago

Vue devtools version

6.6.3

Link to minimal reproduction

https://github.com/nocpp/devtools-test/blob/main/index.html

Steps to reproduce & screenshots

  1. Run this page by using the http service.

    image
  2. Open Google Chrome Developer Tools.

    image
  3. Open vue devtools panel.

    image
  4. Open Google Chrome Task Manager.

    image
  5. Close Google Chrome Developer Tools.

    image
  6. Observe the CPU usage of the task manager.

    image

What is expected?

CPU usage is normal.

What is actually happening?

The CPU usage on this page exceeds 100%.

System Info

- MacBook Pro (13-inch, M1, 2020)
- macOS Monterey 12.5.1
- Chrome 126.0.6478.185 (arm64)

Any additional comments?

After my debugging, I found that the issue was caused by this submission.

Due to the addition of eventListener after shutdown, but the cancellation of eventListener in proxy. js, the sending and listening of events continue to loop indefinitely. Suggest canceling this line.

nocpp commented 3 months ago

same as the issues #2103