i came across a problem when all sections that display custom menu (via function callĀ wp_nav_menu()) are not displayed in 404 page.
after some research, i found a solution.
it's to do with permalinks. there's a bug reported since V286. it's still happening to latest version V321.
to fix this problem, choose a permalinks setting does not use numbers, ie year or month. eg
/%category%/%postname%/