2024-09-24 08:12 PM
Hi,
I'm experiencing some issues on Linux with code generation in MX. The system I'm running is:
STM32CubeMX version 6.12.1
Pop!_OS (Ubuntu based) version 22.04
Generating code for a Nucleo-H755ZI-Q [although I doubt this matters]
Specifically, when clicking the "Generate Code" button in MX, nothing happens and the following Java error is logged in the background:
2024-09-24 19:39:38,855 [ERROR] ProjectManagerView:732 -
com.teamdev.jxbrowser.ObjectClosedException: Attempted to use a closed object.
You're trying to call a method of a closed object. Usually, it happens when you
call the `close()` method of an object (or its owner) prior to calling methods
of that object.
Another common cause of this exception is working with cached DOM or JavaScript
objects. For example, if you navigate to another web page and try to call
a method of a DOM or a JavaScript object from the previous page, you will get
this exception.
It's also possible that the native Chromium process has crashed. In that case,
all the objects that belong to that process are closed automatically.
The following article explains this exception in detail: https://links.teamdev.com/jxbrowser-object-closed-exception
at com.teamdev.jxbrowser.internal.CloseableImpl.checkNotClosed(CloseableImpl.java:41) ~[STM32CubeMX:?]
at com.teamdev.jxbrowser.browser.internal.BrowserImpl.mainFrame(BrowserImpl.java:233) ~[STM32CubeMX:?]
at com.st.microxplorer.plugins.userauth.WebApp.isAuthenticated(WebApp.java:672) ~[?:?]
at com.st.microxplorer.plugins.userauth.UserAuth.handleAuthentication(UserAuth.java:479) ~[?:?]
at com.st.microxplorer.plugins.userauth.UserAuth.getSpecificTask(UserAuth.java:269) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.gui.ProjectChoiceTab.save(ProjectChoiceTab.java:1458) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.ProjectManagerView.generateCode(ProjectManagerView.java:1069) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.ProjectManagerView.getSpecificTask(ProjectManagerView.java:730) ~[?:?]
at com.st.microxplorer.maingui.RibbonBar$1.actionPerformed(RibbonBar.java:376) ~[STM32CubeMX:?]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) ~[?:?]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313) ~[?:?]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) ~[?:?]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) ~[?:?]
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) ~[?:?]
at java.awt.Component.processMouseEvent(Component.java:6626) ~[?:?]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3389) ~[?:?]
at java.awt.Component.processEvent(Component.java:6391) ~[?:?]
at java.awt.Container.processEvent(Container.java:2266) ~[?:?]
at java.awt.Component.dispatchEventImpl(Component.java:5001) ~[?:?]
at java.awt.Container.dispatchEventImpl(Container.java:2324) ~[?:?]
at java.awt.Component.dispatchEvent(Component.java:4833) ~[?:?]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) ~[?:?]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) ~[?:?]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) ~[?:?]
at java.awt.Container.dispatchEventImpl(Container.java:2310) ~[?:?]
at java.awt.Window.dispatchEventImpl(Window.java:2780) ~[?:?]
at java.awt.Component.dispatchEvent(Component.java:4833) ~[?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:720) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:714) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:399) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) ~[?:?]
at java.awt.EventQueue$5.run(EventQueue.java:747) ~[?:?]
at java.awt.EventQueue$5.run(EventQueue.java:745) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:399) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) ~[?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:744) ~[?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) ~[?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) ~[?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) ~[?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) ~[?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) ~[?:?]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) ~[?:?]
Please let me know if you have any ideas on what this issue is related to. Or if you suspect an error in setup or possibly coming from Eclipse itself.
Thanks,
Kyle
2024-09-24 09:28 PM - edited 2024-09-24 09:29 PM
I have had problems with CubeMX with Linux for years... The problems are based on the circular Events() references that the author(s) have designed into the software.
I'm using Tumbleweed. There are somethings that I have found that can help -
I hope that helps.
Kind regards
Pedro
2024-09-26 02:03 AM
Hello @kyle_samara ,
Fist let me thank you for posting and welcome to the ST Community.
For more investigation, I suggest that you provide you Ioc.File.
Thanks.
Mahmoud
2024-09-26 10:45 AM
Thanks for the tips, Pedro. I'll give them a try!