If you get the first error, then you will get a multitude of other errors, including those reported. So we have to fix that first error.
Do you think your server might be under a heavy load? For example, does it host several (hundreds of!) other Moodle sites as well as yours?
One thing to check is whether or not your HotPot cache is enabled, as that will not only lighten the load but make it impossible for the "HP" object to be there one moment and gone the next.
- Settings -> Site administration -> Plugins -> Activity modules -> HotPot -> Enable HotPot cache
I suggest you try clearing then HotPot cache, then make sure it is enabled, and re-run the HotPot activity.
If you continue to have problems, please try the JQuiz on my server and let me know if it behaves any differently.
cheers
Gordon