Segfault when switching to a custom keyboard layout from Touch Bar

Solution 1:

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.

  1. Create a folder named <your_layout>.iconset
  2. Put your icons inside. They MUST be named icon_16x16.png, [email protected], icon_32x32.png, …, [email protected].
  3. Run the command iconutil -c icns <your_layout>.iconset
  4. Copy the resulting .icns file to your keyboard layout.

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