cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX Version 4.25.0 on Linux java.lang.NullPointerException

Thomas Hoppe
Associate III
Posted on March 21, 2018 at 15:14

Latest version gives me this when I want to create a new project

2018-03-21 15:13:32,765 [INFO] About:226 - Version : DB.4.0.250

2018-03-21 15:13:35,366 [INFO] McuFinderGlobals:23 - Set standalone mode to false

2018-03-21 15:13:35,763 [INFO] LoadUrlFilesThread:141 - End of LoadServerUrlFiles without Thread

Exception in thread 'AWT-EventQueue-0' java.lang.NullPointerException

        at com.st.microxplorer.mcuselector.CtxGFX.buildToolTipWidget(CtxGFX.java:40)

        at com.st.microxplorer.mcuselector.CtxGFX.getPopup(CtxGFX.java:36)

        at com.st.microxplorer.mcuselector.PanelToolTipUI.setToolTip(PanelToolTipUI.java:152)

        at com.st.microxplorer.mcuselector.GraphicSummaryPanel.setTooltips(GraphicSummaryPanel.java:214)

        at com.st.microxplorer.mcuselector.GraphicSummaryPanel.<init>(GraphicSummaryPanel.java:84)

        at com.st.microxplorer.mcuselector.McuMultiScanPanel.createDetailGUI(McuMultiScanPanel.java:170)

        at com.st.microxplorer.selector.MultiScanPanel.createGUI(MultiScanPanel.java:371)

        at com.st.microxplorer.mcuselector.McuMultiScanPanel.<init>(McuMultiScanPanel.java:140)

        at com.st.microxplorer.selector.McuBoardSelectorDialog.defineWindowsFields(McuBoardSelectorDialog.java:386)

        at com.st.microxplorer.selector.McuBoardSelectorDialog.init(McuBoardSelectorDialog.java:96)

        at com.st.microxplorer.selector.McuBoardSelectorDialog.<init>(McuBoardSelectorDialog.java:79)

        at com.st.microxplorer.plugins.filemanager.engine.MainFileManager.userNewConfig(MainFileManager.java:100)

        at com.st.microxplorer.plugins.filemanager.FileManagerView$1.actionPerformed(FileManagerView.java:397)

        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)

        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)

        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:6533)

        at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)

        at java.awt.Component.processEvent(Component.java:6298)

        at java.awt.Container.processEvent(Container.java:2237)

        at java.awt.Component.dispatchEventImpl(Component.java:4889)

        at java.awt.Container.dispatchEventImpl(Container.java:2295)

        at java.awt.Component.dispatchEvent(Component.java:4711)

        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)

        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)

        at java.awt.Container.dispatchEventImpl(Container.java:2281)

        at java.awt.Window.dispatchEventImpl(Window.java:2746)

        at java.awt.Component.dispatchEvent(Component.java:4711)

        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)

        at java.awt.EventQueue.access$500(EventQueue.java:97)

        at java.awt.EventQueue$3.run(EventQueue.java:709)

        at java.awt.EventQueue$3.run(EventQueue.java:703)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)

        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)

        at java.awt.EventQueue$4.run(EventQueue.java:731)

        at java.awt.EventQueue$4.run(EventQueue.java:729)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)

        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)

        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)

        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

4 REPLIES 4
Richard Lowe
Senior III
Posted on March 21, 2018 at 18:48

This error is common if using OpenJDK/JRE. Us the Oracle JRE and the issue goes away.

You can use the `alternatives --config java` command and select the Oracle Java as the default.

Thomas Hoppe
Associate III
Posted on March 21, 2018 at 22:02

I have Oracle JDK 1.8.0.162-r1 so that cannot be the issue.

Dean Perry
Associate III
Posted on March 22, 2018 at 01:05

I am on (K)ubuntu 17.10 and using

openjdk version '1.8.0_151'

OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.17.10.2-b12)

OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

I have been using 4.25 successfully daily (with previously created projects) and just created a project now without issues.

I'm guessing some other dependency???

embedonix
Associate III
Posted on May 15, 2018 at 00:38

Only update the software as `root`...otherwise some things are not written to their place even if you have premission on the folders.

I had the same issue, I just reinstalled the latest version using `root` then used the program with my own user account and it worked again!