Error appearing between Lumenzia and my plugins

There has been few users who use my plugins (BreakGen and Oniric) that have told me they have had a "Modal State Error when my plugin is active, however after pressing “Ok” in the error window everything works well and they can use my plugin without a problem.

Here’s something that a user told me and it would help us to understand how our plugins interact with each others:

*"hey Mario, so I just installed the new BreakGen and got it to work. But Both Oniric and BreakGen kept giving me a Modal State error. I have noticed that errors kept popping up when using Oniric, but the errors came from the Lumenzia panel. I have a feeling these two plugins are interfering with each other. *
*I’ve uninstalled the Lumenzia and Web Sharpener Plugin and now your plugins work like a charm. *

I’m not sure how to proceed from this but maybe it helps you."

So, I know we execute our code in modal state to make it work in PS, but I cannot figure out what makes the error appear.

The info abovve is the only useful feedback I’ve got from the users.

Does someone knows how could I avoid this error or “fix” it?


For me it sounds like Lumenzia has interval set up, on which they’re constantly trying to do something in a modal state? Usually you’d have something like this just for getters and wouldn’t need modal, but as I said, sounds like a bad implementation.

Don’t take my word for it - I’m not an expert on the matter, so I might be completely wrong here. Just first thoughts

1 Like

I had reports of Lumenzia doing this with my plugin also and assumed the same thing, i.e. it has an interval set up, on which they’re constantly trying to do something in a modal state. In my case I was able to get around it by making sure everything in my plugin executed inside executeAsModal. That way Lumenzia couldn’t get in while mine was executing. To help pin it down, @photonic, ask your customer which button or buttons cause the error and then trace the execution path in yours and see if it ever drops out of executeAsModal as it executes. In mine, I had a function that called multiple functions with their own executeAsModal functions, but the larger function calling the other functions was NOT inside executeAsModal, which gave Lumenzia the opportunity to put Ps in a modal state and block my execution path. Once I put the function that called the other functions inside executeAsModal as well, the problem went away. It’s entirely possible, you know, to embed executeAsModal functions inside each other. It’s just not possible to suspend history inside another suspend history. So, you have to be a little careful in that regard. Basically, you have to be sure EVERYTHING that changes Photoshop or the image is inside executeAsModal.


I’ll try to wrap all the code inside a executeAsModal function! Thanks for this option. I’ll write back when I test the new version with the client!

@gregbenz Have you been told about something like this before?

@photonic I’m not quite clear what the error is. I have seen some plugin collisions where the other plugin didn’t use executeAsModal, which is the only way to consistently avoid the risk of simultaneous activity in unrelated plugins.

Please feel free to email me directly to discuss further to see how to avoid any potential conflict.

1 Like

Thank you very much Greg! I’ll try the solution mentioned above and see what I can do!