Web Browser and Client Freezing

We recently performed an upgrade from 7.8.5 to 7.9.16. After installation we have had a number of clients that are randomly freezing up. The JVM is locking up, but the computer is not. I have also noticed that if you start doing something else like open task manager on the PC the instance of JVM frees up (not always the case). In those cases I get an error popup that seem like it was already triggered, but not showing before the JVM locked up. It appears to me that the memory is being completely used up and potentially causing the issue. These systems are Windows 7 PCs with 4GB RAM. We have our heap size settings at Initial:512M Max:1024M. I have also noticed that running processes have multiple instances of “browsercore32.exe”. I’m wondering if the JxBrowser is having an issue and using up more memory compared to the version in 7.8.5. Here’s the error report shortly after a lockup.Client console output web browser Config Error 2.txt (9.0 KB)

It looks like we found an issue with the web Browser. What is happening is if a listener is added to the JxBrowser and you close the window when the JxBrowser is trying to send a message it freezes JVM. We added a listener to get a log of the Browser to troubleshoot the loading (about:blank). We used the example on the component page. I want to remove said listener which I disabled the initalize script but it appears to be persistent. Does anyone know how I can deactivate the listener.
Here’s the example for adding the listener. I was thinking just browser.removeConsoleListener(IgnitionListener()) @PGriffith @pturmel

	from com.teamdev.jxbrowser.chromium.events import ConsoleListener
		 
		 
	class IgnitionListener(ConsoleListener):
		def __init__(self, target='Web Browser'):
			self.logger = system.util.getLogger(target)
			self.levels = {'DEBUG': self.logger.debug, 'ERROR': self.logger.error, 'LOG': self.logger.info, 'WARNING': self.logger.warn}
	 
	 
		def onMessage(self, event):
			self.levels[str(event.getLevel())](event.getMessage())
	 
	 
	browser.addConsoleListener(IgnitionListener())

Directly calling remove() won’t work, because you’d be trying to remove a new instance of the listener.
I doubt this will actually do a whole lot, but you could instead:

for listener in browser.getConsoleListeners():
	browser.removeConsoleListener(listener)

Closing any JxBrowser related processes at the OS level (or simply rebooting the computer) would also work, probably more reliably.

I disabled the initialize script and published a few days ago, however the clients still report Browser Messages even after a reboot and are randomly freezing.

Blockquote
14:30:13.101 [Browser Events Thread] INFO WebBrowser.BrowserComponent - Web browser frame failed to load. Error = ABORTED, URL =

I'm able to turn on and off the listener, but still see messages like the one above, by loading a URL. Is there an inherent logger as part of the component.
If you look in the client log viewer there are a bunch of the same type of message above. I'm asking because the thread below is looking like the window is closing, but the browser is locked. I was thinking the browser is somehow causing the JVM to get frozen because it's trying to send a message and the window is trying to close. similar to this post.

"AWT-EventQueue-2" #35 prio=6 os_prio=0 tid=0x0000000057999800 nid=0xa8c waiting on condition [0x000000005a56c000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at java.lang.Thread.sleep(Unknown Source)
	at java.util.concurrent.TimeUnit.sleep(Unknown Source)
	at com.teamdev.jxbrowser.chromium.internal.ipc.SocketChannel.waitForPendingPostRequests(SourceFile:145)
	at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:500)
	at com.teamdev.jxbrowser.chromium.Browser.dispose(SourceFile:1632)
	- locked <0x00000000f3628248> (a com.teamdev.jxbrowser.chromium.Browser)
	at com.inductiveautomation.webbrowser.BrowserComponent.onShutdown(BrowserComponent.java:425)
	at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.shutdownComponent(AbstractVisionPanel.java:219)
	at com.inductiveautomation.factorypmi.application.components.util.ComponentVisitor$ShutdownVisitor.visit(ComponentVisitor.java:340)
	at com.inductiveautomation.factorypmi.application.components.util.ComponentVisitor.walk(ComponentVisitor.java:91)
	at com.inductiveautomation.factorypmi.application.components.util.ComponentVisitor.walk(ComponentVisitor.java:69)
	at com.inductiveautomation.factorypmi.application.FPMIWindow.shutdown(FPMIWindow.java:369)
	at com.inductiveautomation.factorypmi.application.FPMIWindow$2.internalFrameClosing(FPMIWindow.java:197)
	at javax.swing.JInternalFrame.fireInternalFrameEvent(Unknown Source)
	at javax.swing.JInternalFrame.doDefaultCloseAction(Unknown Source)
	at com.inductiveautomation.factorypmi.application.FPMIWindow.doDefaultCloseAction(FPMIWindow.java:170)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities$7.run(NavUtilities.java:470)
	at com.inductiveautomation.factorypmi.application.script.builtin.WindowUtilities.doGUIAction(WindowUtilities.java:810)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.closeWindow(NavUtilities.java:467)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.closeWindow(NavUtilities.java:462)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilitiesDispatcher.closeWindow(NavUtilitiesDispatcher.java:175)
	at sun.reflect.GeneratedMethodAccessor241.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)
	at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.__call__(ScriptManager.java:431)
	at org.python.core.PyObject.__call__(PyObject.java:387)
	at org.python.core.PyObject.__call__(PyObject.java:391)
	at org.python.pycode._pyx554.f$0(<event:keyReleased>:101)
	at org.python.pycode._pyx554.call_function(<event:keyReleased>)
	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:636)
	at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:193)
	- locked <0x00000000f3a83c78> (a com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter)
	at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:284)
	at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:57)
	at com.sun.proxy.$Proxy31.keyReleased(Unknown Source)
	at java.awt.Component.processKeyEvent(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(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$500(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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.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$JavaSecurityAccessImpl.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)

   Locked ownable synchronizers:
	- None

A fix for this issue was just merged into Ignition 7.9 and should be available on the next nightly and release.

Thanks,
Jonathan C

We recently upgraded our system to 7.9.18 believing that the issue with the Web Browser would be fixed, however we are still getting reports from users that the application is freezing and they have to end the java task and restart to continue. In looking at the chromium JxBrowser package, it looks like the JxBrowser is 6.18. I noticed on the JxBrowser documentation release notes page that 6.19.1 was put into place to fix zombie processes browsercore32.exe from not being closed. What we have observed is that there may be as many as 5 or 6 of these processes running on a PC. I have yet to catch it happening to get a thread dump. Is there a way to update to at least JxBrowser 6.19.1? Does Ignition 8 use a new 7.x of JxBrowser?