Just looking at the the !Arithmetic overflow line of that error message and the one below, my guess is that you are using some kind of table markers in a slightly unusual way, and it thinks it needs to make a table with no columns, and thus divides by 0.
As the bottom line says \p, my guess would be that you have a \p soon after the start of a table. The l.505 says that it met the error somewhere near line 505 of your USFM file, but sometimes it gets it wrong.