This is due to memory allocation mismatch. `MEM_dupallocN` is used on cpp style `ButsTextureUser` pointer. Now fixed by using `MEM_new`. Also pass `uiButArgNFree/Copy` callback fn arguments to avoid the use of default arguments which are C style. Pull Request: https://projects.blender.org/blender/blender/pulls/127690