Skip to content

Zigbee: Multiple endpoints crash due to static endpoint var #10726

Closed
@FaBjE

Description

@FaBjE

When adding a second Zigbee endpoint the CPU crashes.
I noticed that the same endpoint ID was displayed while I added both endpoints with separate ID's

After some digging I found that the ZigbeeEP class has the endpoint variable as static.
This is not possible as each instance (aka endpoint) must have a unique endpoint ID.
I removed the static and it started working: FaBjE@f0566d8

Unfortunately this breaks several classes as they rely on the endpoint and others being static. For testing I removed those classes so I could compile: FaBjE@2c98584

I think there is some awareness about this issue, but maybe not the severity when trying to use a second endpoint.
Originally posted by @P-R-O-C-H-Y in #10135 (comment)

Activity

P-R-O-C-H-Y

P-R-O-C-H-Y commented on Dec 13, 2024

@P-R-O-C-H-Y
Member

Hi @FaBjE, what version of the esp-arduino core are you using?
I have no issues running multiple endpoints on last Zigbee library commits.
Can you try to use the v3.1.x branch?

self-assigned this
on Dec 13, 2024
FaBjE

FaBjE commented on Dec 13, 2024

@FaBjE
ContributorAuthor

Hi @P-R-O-C-H-Y
Thanks for your swift response!

I use the latest release V3.0.7

When using master / V3.1.x branch the issues are gone indeed :)

P-R-O-C-H-Y

P-R-O-C-H-Y commented on Dec 13, 2024

@P-R-O-C-H-Y
Member

Its fixed in the 3.1.x, but we did not back port zigbee updates to 3.0.x branch.
We will release the 3.1.0 stable release soon. I am closing this issue as it's solved.
Fix was done in this PR: #10551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Zigbee: Multiple endpoints crash due to static endpoint var · Issue #10726 · espressif/arduino-esp32