Title: InvalidArgumentException
Last modified: August 29, 2019

---

# InvalidArgumentException

 *  Resolved [wolfnowl](https://wordpress.org/support/users/wolfnowl/)
 * (@wolfnowl)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/invalidargumentexception/)
 * Both WordPress and NextGen Callery are up to date. If I try to add a gallery 
   to a post I get this:
 * InvalidArgumentException thrown
 * RegexIterator::__construct(): JIT compilation failed: no more memory
 * Block Editor/Classic Editor, doesn’t matter. Rebooting computer doesn’t help.
   Neither does switching themes.
 * Mike.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * (@gabyimagely)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/invalidargumentexception/#post-11881210)
 * Hello [@wolfnowl](https://wordpress.org/support/users/wolfnowl/)
 * Let’s first check the server settings to make sure you have everything up to 
   date.
    Reach out to your hosting provider and confirm if these requirements are
   in place [https://www.imagely.com/docs/requirements/](https://www.imagely.com/docs/requirements/)
 * 1.- Temporarily deactivate all your plugins except NextGen Gallery.
    2.- Is the
   problem solved? Then, it was caused by one of your plugins. Please check one 
   by one and find the one causing the problem. 3.- If the problem is not solved
   with the deactivation of the plugins, try changing to a standard WordPress theme,
   it could be a conflict with your current theme.
 * Please let us know how it goes.
 *  [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * (@gabyimagely)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/invalidargumentexception/#post-11991405)
 * Because it has been a month or more since your last reply, I am going to mark
   this as resolved as I assume you have found a solution. Please feel free to reply
   again if you still have questions. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘InvalidArgumentException’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [error message](https://wordpress.org/support/topic-tag/error-message/)

 * 2 replies
 * 2 participants
 * Last reply from: [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/invalidargumentexception/#post-11991405)
 * Status: resolved