Documentation says that:
"This panic is raised when an unhandled exception occurs. Exceptions have many causes, but the most common are access violations caused, for example, by dreferencing NULL. Among other possible causes are: general protection faults, executing an invalid instruction, alignment checks, etc.
Most propably it's caused by trying to use/delete invalid pointer. Can be caused that your code tried to do some action with some object which is deleted or which construction didn't succeed.
Also one candidate for error is double deletion, this could be in case when you are deleting something that you don't own, so either it's deleted already by the real owner or the owner gets the panic when it tried to delete after you have deleted the object already. I would look this second point very carefully, since you are getting the error in exit situation, where all objects are supposed to be deleted.