The Analysis menu is the default destination when the passed-in menu index is nil (i.e.,
MENU_TOOLS_UNSORTED, in your case, evaluates to
nil). The menu IDs (along with other useful variables) are defined in init.lua, so it's likely that init.lua wasn't loaded (because Wireshark couldn't find it in the expected location). This is typical when running Wireshark from a build directory. See
similar problem.
To resolve this, copy init.lua and console.lua from your build directory to your home directory:
- $HOME/.wireshark/ (*nix)
- %APPDATA%/Wireshark/ (Windows)
and restart Wireshark.
-Tony