Sorry about the trouble. I would like to know if the steps suggested above by @thatsmauri worked for you? If not, I would request you to share a few more details like:
OS and the exact version of Illustrator
Screenshot of the error
Are there any recent changes made to your system? For example, any antivirus, system updates, plugins, or web extensions installed recently.
Does resetting Illustrator Preferences ( https://helpx.adobe.com/illustrator/using/setting-preferences.html) help to resolve the issue? Disclaimer: Please note that resetting preferences will remove all the custom settings, and Illustrator will launch with default settings. You can also take a backup of the folders in case you want to. Location is mentioned in the article.
Also, you may try running the app in the Hidden Admin account (Mac/ Windows) and see if you are able to close Illustrator without this error.