How to Troubleshoot ap-hotspot

Fig: ap-hotspot error
Figure describes the error faced while accessing the ap-hotspot. the red color marked "Another process is already running"  is the error.

Solution: 
sudo rm /tmp/hotspot.pid
This deletes the process id that is causing the error display.
In order to see which process is running 
 ps -ef | grep ap-hotspot 
It is necessary to keep in mind that whenever you update your system or install the new operating system this updates the version  ap-hotspot  package as well so you should mark hold the hotspot package  i.e.
                    sudo apt-mark hold hostapd