cancel
Showing results for 
Search instead for 
Did you mean: 

Java exception when running cube 4.8.0 on Linux

markb
Associate II
Posted on June 15, 2015 at 17:10 Hi, My STM32CubeMX.log file shows the following backtrace when I try to configure a GPIO pin and the panel at the bottom of the dialog that should show the configuration controls is empty.

Exception in thread ''AWT-EventQueue-0'' java.lang.NullPointerException
at com.st.microxplorer.plugins.ip.gpio.gui.ParameterUI.addPropertyChangeListener(ParameterUI.java:156)
at javax.swing.plaf.synth.SynthPanelUI.installListeners(SynthPanelUI.java:83)
at javax.swing.plaf.synth.SynthPanelUI.installUI(SynthPanelUI.java:63)
at javax.swing.JComponent.setUI(JComponent.java:665)
at javax.swing.JPanel.setUI(JPanel.java:153)
at javax.swing.JPanel.updateUI(JPanel.java:126)
at javax.swing.JPanel.<
init
>(JPanel.java:86)
at javax.swing.JPanel.<
init
>(JPanel.java:109)
at javax.swing.JPanel.<
init
>(JPanel.java:117)
at com.st.microxplorer.plugins.ip.gpio.gui.ParameterUI.<
init
>(ParameterUI.java:72)
at com.st.microxplorer.plugins.ip.gpio.gui.ParameterUI.<
init
>(ParameterUI.java:101)
at com.st.microxplorer.plugins.ip.gpio.gui.ComboParameterUI.<
init
>(ParameterUI.java:431)
at com.st.microxplorer.plugins.ip.gpio.gui.ParamContainer.createPanel(ParamContainer.java:97)
at com.st.microxplorer.plugins.ip.gpio.gui.ParamContainer.update(ParamContainer.java:145)
at com.st.microxplorer.plugins.ip.gpio.gui.GpioTablePanel$RowListener.valueChanged(GpioTablePanel.java:192)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:154)
at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(DefaultListSelectionModel.java:685)
at javax.swing.plaf.basic.BasicTableUI$Handler.setValueIsAdjusting(BasicTableUI.java:953)
at javax.swing.plaf.basic.BasicTableUI$Handler.mouseReleased(BasicTableUI.java:1166)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1082)
at java.awt.Component.show(Component.java:1655)
at java.awt.Component.setVisible(Component.java:1607)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.createIpDialog(BlockDiagram.java:348)
at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.actionPerformed(BlockDiagram.java:271)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

java version ''1.7.0_80'' Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) Server VM (build 80-b11, mixed mode)
8 REPLIES 8
nesrine
Senior
Posted on June 30, 2015 at 12:52

Hello,

Checking the UM1718 User manual of CUBEMX they said that the Supported operating systems and architectures are:

• Windows® XP: 32-bit (x86)

• Windows® 7: 32-bit (x86), 64-bit (x64)

• Windows® 8: 32-bit (x86), 64-bit (x64)

Syrine

stm32cube-t
Senior III
Posted on July 01, 2015 at 09:36

Hello,

Indeed STM32CubeMX is not released for Linux yet. However, thank you for raising the issue.

Best regards

joe23
Associate II
Posted on October 19, 2015 at 04:45

Looks like a problem similar to http://stackoverflow.com/a/7555656/39431

From what I can tell STM32Cube is initializing a PropertChangeSupport object in the constructor and assuming it will be initialized before a call to addPropertyChangeListener is called but on non-Windows platforms it looks like addPropertyChangeListener can be called before the constructor is complete. A simple ensurePropertChangeSupport method could fix this right up.
markb
Associate II
Posted on October 19, 2015 at 08:32

Hi Joe,

Thanks for posting that. Maybe the cube developers will read it and investigate the problem. I don't hold out much hope though because the fact that they haven't fixed the trivial file name case problem in Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c even after many months shows that they don't care at all about how well it works on non-Windows platforms. Actually, they don't appear to care at all about the appalling bugs that remain in the HAL either, but that's another gripe...

Cheers,

Mark

joe23
Associate II
Posted on October 20, 2015 at 06:03

I got bored tonight so I decided to create a little patch. 

https://github.com/joeferner/stm32cubemx-patch

Basically it goes in with Java byte code manipulation and fixes their code. I'm hoping I can throw this code away soon it kinda makes me sad to look at.
frackers
Senior
Posted on October 24, 2015 at 08:17

Running 4.1 and seeing the same problem as you and everyone else but to fix it I'm lost! Unfortunately, 40 years of assembler and 'C' experience doesn't help with the vocabulary of java.

Unpack - this is a basic unzip into a working directory - yes?

Run
java com.fernsroth.stm32cubmxpatch.Patch <gpio dir>
I get the following error robin@robin-desktop:~/src/stm32cubemx-patch/src/main/java$ java com.fernsroth.stm32cubmxpatch.Patch ~/tmp/gpio Error: Could not find or load main class com.fernsroth.stm32cubmxpatch.Patch

Repackage

gpio.jar
- no idea what utility I'd use to do this.

A few crumbs on how to proceed would be great

stm32cube-t
Senior III
Posted on November 16, 2015 at 10:56

Dear user,

Please note this issue will be fixed with CubeMX 4.12.

Best regards
stm32cube-t
Senior III
Posted on February 09, 2016 at 12:12

Hello,

This issue is now fixed in STM32CubeMX 4.13

Best regards