The man page of "Xft" contains:
man Xft> XftFont *
man Xft> XftFontOpen (Display *dpy, int screen, ...);
man Xft> XftFontOpen takes a list of pattern elements of the form
man Xft> (field, type, value) terminated with a 0, matches that
man Xft> pattern against the available fonts and opens the matching
man Xft> font.
i.e. the man page suggests to use 0. But on 64 bit platforms, 0 and
NULL are not the same, therefore this causes problems and often
crashes. I noticed this because "mlterm" used 0 instead of NULL in this
function like written in the man page which made mlterm crash often
on x86_64. To fix these crashes I only had to replace 0 -> NULL.
The example in the man page
man Xft> Example:
man Xft> font = XftFontOpen (dpy, scr,
man Xft> XFT_FAMILY, XftTypeString, "charter",
man Xft> XFT_SIZE, XftTypeDouble, 12.0);
doesn't have a terminating argument at all which is probably wrong as well.
Thanks for the fix
Mass update: Close all bugs resolved over one year ago.