I see the following notice when I create or edit a segment, and define that it should be pre-processed:
WARNING: /var/www/piwik.dfo.no/public_html/plugins/Live/Visitor.php(161): Notice - Undefined index: customVariables - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
Is it possible that you have the custom variables plugin disabled?
From the looks at the code I can see it might happen when Custom Variables plugin is disabled. You can try to change the following file to make it work: https://github.com/piwik/piwik/pull/9830/files or alternatively to enable the CustomVariables plugin until we have released a new version that contains the fix