Writing instructions to get a core dump under Ubuntu 16.04 LTS:
As @jtn has mentioned in his answer, Ubuntu delegates the display of crashes to apport, which in turn refuses to write the dump because the program is not an installed package.
To remedy the problem, we need to make sure apport writes core dump files for non-package programs as well. To do so, create a file named ~/.config/apport/settings with the following contents:
[main]
unpackaged=true
[Optional] To make the dumps readble by gdb, run the following command:
apport-unpack <location_of_report> <target_directory>
References: Core_dump – Oracle VM VirtualBox