Baldhor / Homey-ESPhome-Enhanced

This is an Homey app which adds support for ESPHome devices. ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. More information on their homepage: https://www.esphome.io/
GNU General Public License v3.0
4 stars 3 forks source link

[BUG] Memory Leak in low level native api client #68

Closed Baldhor closed 8 months ago

Baldhor commented 8 months ago

Describe the bug Just found this in the logs:

                            "pingTimer": {
                                "_idleTimeout": 15000,
                                "_idlePrev": {
                                    "_idleTimeout": 15000,
                                    "_idlePrev": {
                                        "_idleTimeout": 15000,
                                        "_idlePrev": {
                                            "_idleTimeout": 15000,
                                            "_idlePrev": {
                                                "_idleTimeout": 15000,
                                                "_idlePrev": {
                                                    "_idleTimeout": 15000,
                                                    "_idlePrev": {
                                                        "_idleTimeout": 15000,
                                                        "_idlePrev": {
                                                            "_idleTimeout": 15000,
                                                            "_idlePrev": {
                                                                "_idleTimeout": 15000,
                                                                "_idlePrev": {
                                                                    "_idlePrev": {
                                                                        "_idleTimeout": 15000,
                                                                        "_idlePrev": {
                                                                            "_idleTimeout": 15000,
                                                                            "_idlePrev": {
                                                                                "_idleTimeout": 15000,
                                                                                "_idleStart": 630000,
                                                                                "_repeat": 15000,
                                                                                "_destroyed": false
                                                                            },
                                                                            "_idleStart": 629961,
                                                                            "_repeat": 15000,
                                                                            "_destroyed": false
                                                                        },
                                                                        "_idleStart": 629960,
                                                                        "_repeat": 15000,
                                                                        "_destroyed": false
                                                                    },
                                                                    "expiry": 644960,
                                                                    "id": -9007199254739710,
                                                                    "msecs": 15000,
                                                                    "priorityQueuePosition": 1
                                                                },
                                                                "_idleStart": 643144,
                                                                "_repeat": 15000,
                                                                "_destroyed": false
                                                            },
                                                            "_idleStart": 643143,
                                                            "_repeat": 15000,
                                                            "_destroyed": false
                                                        },
                                                        "_idleStart": 642827,
                                                        "_repeat": 15000,
                                                        "_destroyed": false
                                                    },
                                                    "_idleStart": 642826,
                                                    "_repeat": 15000,
                                                    "_destroyed": false
                                                },
                                                "_idleStart": 642825,
                                                "_repeat": 15000,
                                                "_destroyed": false
                                            },
                                            "_idleStart": 642824,
                                            "_repeat": 15000,
                                            "_destroyed": false
                                        },
                                        "_idleStart": 642823,
                                        "_repeat": 15000,
                                        "_destroyed": false
                                    },
                                    "_idleStart": 642822,
                                    "_repeat": 15000,
                                    "_destroyed": false
                                },
                                "_idleStart": 632894,
                                "_repeat": 15000,
                                "_destroyed": false
                            },
                            "pingInterval": 15000,
                            "pingAttempts": 3,
                            "pingCount": 0,
                            "supportsRawBLEAdvertisements": true
                        },

It looks like a nice leak in the low level native api client.

Baldhor commented 8 months ago

No, it's just a circular reference.