Instability

I’ve just got a Pi 3 with Raspbian and installed Kodi (via the normal repository, hence Kodi 15.2), and, once I got the mpeg2 licence and increased both memory allocated to the GPU and the size of the buffer I’m able to play videos via a samba-shared folder over wifi without difficulty. I can watch a whole, long movie or several tv shows without so much as a single glitch.

The problems occur between movies/shows. I’m using the Kore Android app to control Kodi on the PI and sometimes it’ll have trouble connecting to Kodi. Usually this problem resolves itself but not always. Sometimes playback hangs, especially if I’ve started a video then started a second one or a third one. Using top or PS at this point shows that Kodi is running (but not really taxing the CPU too much). Sometimes I wait for 5 mins then discover that the Pi has rebooted itself. I’m not sure if this is one problem or more than one.

Where do I start trying to solve this problem? I got a message the other day (but not always) telling me that a new version (16.1 I think) is available, although this clearly isn’t in the Raspbian respository, nor are there instructions anywhere as to how to get this. I’m happy not to be on the latest version, except that perhaps I’m finding problems which are already solved.

Note that I’m starting Kodi via SSH-ing in and running it:
kodi –standalone &

because when i edited a config file to make it run at boot as per some website’s instructions I got a crash when I browsed samba to add folders.