Smart Light example crashing while pairing

The example from GitHub - apple/swift-matter-examples: An Embedded Swift Matter application running on ESP32-C6 (smart-light) crashes every time I try to pair it.
My setup is
Ubuntu 24.04
Swift DEVELOPMENT-SNAPSHOT-2024-06-13-a-ubuntu22.04
ESP-IDF 5.2.1
ESP-Matter 1.2
Pairing with an iPhone 11 Pro to HomeKit with a Homepod Mini

The crash happens in the 1st stage of pairing (before wifi connection and the certification warning)

Logs : ESP32 log · GitHub



This looks like an object that got released that isn't allocated or is unexpectedly null.

 closure #1 (__C.esp_matter.attribute.callback_type, Swift.UInt16, Swift.UInt32, Swift.UInt32, Swift.UnsafeMutablePointer<__C.esp_matter_attr_val_t>?, Swift.UnsafeMutableRawPointer?) -> Swift.Int32 in __idf_main.RootNode.init(attribute: (__idf_main.MatterAttributeEvent, __idf_main.Endpoint, __idf_main.Cluster, Swift.UInt32, Swift.UnsafeMutablePointer<__C.esp_matter_attr_val_t>?) -> (), identify: (__C.esp_matter.identification.callback_type, Swift.UInt16, Swift.UInt8, Swift.UInt8) -> ()) -> __idf_main.RootNode?

is calling release and that is blowing up. it does seem like there are events processed in the log.

There are a couple issues like this on the swift-matter-examples repo. I don't have an esp32-c6 anymore handy to try to root cause so any help would be awesome.

I have the same issue
my setup:
Macos Sequoia
ESP-IDF 5.2.1
ESP-Matter 1.2
Pairing with an iPhone 15 Pro to HomeKit with a Homepod Mini
and i got the same log as well, exactly the same


Is it also possible to use a Raspberry Pi pico W for Matter?

See my reply in this thread: Is device supported? - #9 by Philippe_Hausler

I don't think there is any public information or examples on Matter on Pico W. It's probably a lot of non-trivial work, and it's not clear whether the hw specs would make it even possible at all.


Thanks sorry I forgot that.

In my personal opinion the ESP32-C6 seems to be more complex than the Raspberry pi pico. Is that true?