Segfault when switching to a custom keyboard layout from Touch Bar
I'm using the Bépo layout and I was experiencing the same issue.

I recreated the .icns file using the iconutil command. I just provided the 16x16, 16x16@2x and 32x32 icons.


Create a folder named &lt;your_layout&gt;.iconset
Put your icons inside. They MUST be named icon_16x16.png, icon_16x16@2x.png, icon_32x32.png, …, icon_512x512@2x.png.
Run the command iconutil -c icns &lt;your_layout&gt;.iconset
Copy the resulting .icns file to your keyboard layout.


Since then I had no more TouchBar crash on layout switch.