There is a class of error that arises when an HDS file is corrupted. The specific message will depend on the file concerned and where in the file the corruption occurred. The most likely reason for file corruption is breaking into a task at the wrong moment, or trying to write to a file at the same time.
If you want to process simultaneously from different sessions--say one interactive and another in batch--it is wise to redefine the environment variables ADAM_USER, and AGI_USER if you want graphics on the same machine. The environment variables should point to a separate existing directory for each additional session. This will keep the global and application parameters, and the graphics database separate for each session.
The way to look for corrupted HDS files is trace them. Assuming that $ADAM_USER and $AGI_USER are defined,
% hdstrace $ADAM_USER/GLOBALS full
% hdstrace $ADAM_USER/ardmask full
% hdstrace $AGI_USER/agi_cacvad full
traces the GLOBALS file, the application you were running when the weird error occurred (here ARDMASK), and the graphics database for machine cacvad. Once you have identified the problem file, delete it. If that proves to be the globals file, you might want to retain the output from HDSTRACE, so that you can restore their former values. Deleting the graphics database is something you should do regularly, so that's not a problem.
If you have been running KAPPA from ICL, you will need to check of the integrity of the monolith parameter file, instead the individual parameter file. It will be one of these depending on the type of task that failed: graphics, NDF components, or the rest (mostly image processing) corresponding to these three monolith interface files.
% hdstrace $ADAM_USER/kapview_mon full
% hdstrace $ADAM_USER/ndfpack_mon full
% hdstrace $ADAM_USER/kappa_mon full
If that doesn't cure the problem, send the Starlink Software Librarian ussc@star.rl.ac.uk a log of the session demonstrating the problem, and we shall endeavour to interpret it for you, and find out what's going wrong.
KAPPA --- Kernel Application Package