# Compiler crashes after making each mistake

I am trying to make tables in LaTeX. However, each time I make a mistake the compiler crashes even by removing the mistake with the following message:

Runaway argument? {lof ! File ended while scanning use of \@writefile. \par l.19 \begin{document}

Then, I have to delete all files except the .tex file and compile the program again. Would somebody please help me to solve it?

-
Welcome to TeX.SE. Without more information not sure how someone is going to be able to help you. Perhaps the OS, Editor, version that you are using woudl be helpful. Furthermore, we'd probbaly need to see a complete documenent in the form of a Minimum Working Eexample including \documentclass and the appropriate packages that serves as a test case that can reproduce your problem. –  Peter Grill Dec 7 '12 at 8:40
Perhaps you could try just deleting all the temporary files that were created during the first run as they are might have been left in a corrupt state due to the error. Depending on the editor you are using there is usually a pull down menu of the form Trash aux files), or Remove aux files. –  Peter Grill Dec 7 '12 at 8:44

My crystal ball says: your error concerns mismatched curly braces in the \caption or \label of the table, or some other part that is written to external files because it influences cross-references or the ToC or the List of Tables.
It is failing to write to the list of figures, so most likely you have a fragile command in a figure \caption that should be preceded by \protect. But you will need to delete the lof and aux files initially as if a bad file is written on the previous run it is still input at the start of the next run.