There was a old issue with the Debian version of ncurses (
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=33116) where one developer thought the
new_item function wasn't initialising a new ITEM (a struct) properly. Seems there are differences in behaviour with the function (in terms of whether the function argument is a pointer or value, could get a bit confusing) depending on which platform is used. Could affect how the memory is managed and might explain why the seg fault is occurring.