MATE: vala-appmenu-applet crashes panel with VSCode

I see two crashes in appmenu when VSCode is running:

  1. If the window.titleBarStyle = native, I get occasional crashes in libappmenu-mate (and a crash of the panel) when minimising VSCode.
  2. If the window.titleBarStyle = custom, the same crash occurs every time VSCode is minimised.

This is a summary of the error code I see in dmesg:

[ 2464.279780] mate-panel[10860]: segfault at ... ip ... sp ... error 4 in libappmenu-mate.so[...] likely on ...
  • vala-appmenu-applet (package) version: vala-panel-appmenu-common (= 0.7.6+dfsg1-4build4)
  • VSCode (package) version: 1.98.1-1741624510

If there is any other debug output that would be helpful, please advise.