# Getting an error when logging out of application

**URL:** <https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611>\
**Category:** Ignition\
**Created:** [May 30, 2013, 6:08pm UTC](https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611 "2013-05-30T18:08:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mluedecke](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mluedecke](https://forum.inductiveautomation.com/u/mluedecke)\
**Post date:** [May 30, 2013, 6:08pm UTC](https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611/1 "2013-05-30T18:08:41Z")

</div>

For one of my applications, I am getting the following error when I press the Logout button.

[b]Traceback (most recent call last):

File “event:mouseReleased”, line 1, in

java.lang.IllegalStateException: java.lang.IllegalStateException

```
caused by IllegalStateException

```

Ignition v7.6.1 (b2278)  
Java: Sun Microsystems Inc. 1.6.0\_31  
[/b]

If I open the application and immediately press logout, it works fine. However, if I change the main part of the screen then press the logout button, I get the above error.

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [May 30, 2013, 8:43pm UTC](https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611/2 "2013-05-30T20:43:43Z")

</div>

If you select the details tab and then select full you will get the entire stack trace of the error message.

---

<div class="post-metadata">

**Author:** ![onestank](https://avatars.discourse-cdn.com/v4/letter/o/ba9def/32.png) [@onestank](https://forum.inductiveautomation.com/u/onestank)\
**Post date:** [September 9, 2013, 4:30pm UTC](https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611/3 "2013-09-09T16:30:46Z")

</div>

I am getting the same error. The full error is:

[code]Traceback (most recent call last):  
File “event:menu:Logout”, line 1, in   
at com.inductiveautomation.factorypmi.application.runtime.ClientContextImpl.getScriptManager(ClientContextImpl.java:427)

```
at com.inductiveautomation.factorypmi.application.FPMIApp$AppContextImpl.getScriptManager(FPMIApp.java:483)

at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:150)

at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:266)

at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)

at com.sun.proxy.$Proxy20.propertyChange(Unknown Source)

at java.beans.PropertyChangeSupport.fire(Unknown Source)

at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)

at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)

at java.awt.Component.firePropertyChange(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at javax.swing.JRootPane.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.removeNotify(Unknown Source)

at javax.swing.JComponent.removeNotify(Unknown Source)

at java.awt.Container.remove(Unknown Source)

at java.awt.Container.remove(Unknown Source)

at com.inductiveautomation.factorypmi.application.runtime.ClientPanel.setContentPane(ClientPanel.java:684)

at com.inductiveautomation.factorypmi.application.runtime.ClientPanel.shutdownApp(ClientPanel.java:884)

at com.inductiveautomation.factorypmi.application.runtime.ClientPanel.logout(ClientPanel.java:894)

at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities$1.run(SecurityUtilities.java:248)

at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.runAction(SecurityUtilities.java:259)

at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.logout(SecurityUtilities.java:254)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

```

java.lang.IllegalStateException: java.lang.IllegalStateException

```
at org.python.core.Py.JavaError(Py.java:495)
at org.python.core.Py.JavaError(Py.java:488)
at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:188)
at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:459)
at org.python.core.PyObject. __call__ (PyObject.java:371)
at org.python.core.PyObject. __call__ (PyObject.java:375)
at org.python.pycode._pyx84.f$0(<event:menu:Logout>:1)
at org.python.pycode._pyx84.call_function(<event:menu:Logout>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:552)
at com.inductiveautomation.factorypmi.application.runtime.RuntimeMenu$JythonMenuActionListener.actionPerformed(RuntimeMenu.java:168)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

```

Caused by: java.lang.IllegalStateException  
at com.inductiveautomation.factorypmi.application.runtime.ClientContextImpl.getScriptManager(ClientContextImpl.java:427)  
at com.inductiveautomation.factorypmi.application.FPMIApp$AppContextImpl.getScriptManager(FPMIApp.java:483)  
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:150)  
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:266)  
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)  
at com.sun.proxy.$Proxy20.propertyChange(Unknown Source)  
at java.beans.PropertyChangeSupport.fire(Unknown Source)  
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)  
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)  
at java.awt.Component.firePropertyChange(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at javax.swing.JRootPane.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.removeNotify(Unknown Source)  
at javax.swing.JComponent.removeNotify(Unknown Source)  
at java.awt.Container.remove(Unknown Source)  
at java.awt.Container.remove(Unknown Source)  
at com.inductiveautomation.factorypmi.application.runtime.ClientPanel.setContentPane(ClientPanel.java:684)  
at com.inductiveautomation.factorypmi.application.runtime.ClientPanel.shutdownApp(ClientPanel.java:884)  
at com.inductiveautomation.factorypmi.application.runtime.ClientPanel.logout(ClientPanel.java:894)  
at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities$1.run(SecurityUtilities.java:248)  
at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.runAction(SecurityUtilities.java:259)  
at com.inductiveautomation.factorypmi.application.script.builtin.SecurityUtilities.logout(SecurityUtilities.java:254)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.lang.reflect.Method.invoke(Unknown Source)  
at org.python.core.PyReflectedFunction. **call** (PyReflectedFunction.java:186)  
… 48 more

Ignition v7.6.2 (b2368)  
Java: Oracle Corporation 1.7.0\_25  
[/code]

---

<div class="post-metadata">

**Author:** ![onestank](https://avatars.discourse-cdn.com/v4/letter/o/ba9def/32.png) [@onestank](https://forum.inductiveautomation.com/u/onestank)\
**Post date:** [September 9, 2013, 4:34pm UTC](https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611/4 "2013-09-09T16:34:40Z")

</div>

we have a client event script

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [October 14, 2013, 9:59pm UTC](https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611/5 "2013-10-14T21:59:32Z")

</div>

Does this happen if you logout from any window from the project or just certain windows. Do you have any property changes scripts that could be running while trying to logout?

---

<div class="post-metadata">

**Author:** ![onestank](https://avatars.discourse-cdn.com/v4/letter/o/ba9def/32.png) [@onestank](https://forum.inductiveautomation.com/u/onestank)\
**Post date:** [October 17, 2013, 8:51pm UTC](https://forum.inductiveautomation.com/t/getting-an-error-when-logging-out-of-application/6611/6 "2013-10-17T20:51:38Z")

</div>

I haven’t noticed that any particular page causes the issue. I will try and see if I can recreate issue by trying to logout from several different pages. I have tried to logout from a page that has property change scripts on them but Ignition just logged me out, as it should have. Haven’t seen the issue for sometime now. It is very sporadically happening.
