cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx 4.24.0 is throwing Null Pointer Exception when CAN + ETH IPs active

Rea.David
Associate II
Posted on February 16, 2018 at 22:35

I just upgraded to CubeMx 4.24 and attempted to migrate a STM32F7 project .ioc file. The migration failed with a Java null pointer exception when it reached the CAN IP portion.

To verify my .ioc file was not the culprit, I created a new project and the issue persisted. Here are the steps to reproduce:

  1. Start CubeMx 4.24, create new project
  2. Select STM32F745VET for processor
  3. Save project, Close CubeMx
  4. Re-Open CubeMx, attempt to open file previously created -- opens successfully.
  5. Add Ethernet IP, allow clock tab to auto-resolve clock tree issues
  6. Save project, Close CubeMx
  7. Re-Open CubeMx, attempt to open file previously created -- throws null pointer exception and uses 100% CPU

Here is the topmost portion of the stack trace when it throws the exception:

2018-02-16 16:29:02,320 [INFO] UtilMem:68 - End LoadConfig() Used Memory: 2695795904 Bytes (3036151808)

2018-02-16 16:29:02,386 [INFO] ThirdPartyDb:293 - Open Third Party DataBase File (/home/david/.stm32cubemx/plugins/thirdparty/db/thirdparties_db.xml) : 0 ms. number of Sw pack : 0

2018-02-16 16:29:02,705 [INFO] PinOutPanel:995 - setPackage(No Configuration,No Configuration)

2018-02-16 16:29:02,706 [INFO] PinOutPanel:995 - setPackage(STM32F745VETx,LQFP100)

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

at com.st.microxplorer.plugins.ip.can.gui.CanManager.verifyValuePrescaler(CanManager.java:467)

at com.st.microxplorer.plugins.ip.can.gui.CanManager.clockChange(CanManager.java:72)

at com.st.microxplorer.plugins.ip.can.gui.CanManager.<init>(CanManager.java:59)

at com.st.microxplorer.plugins.ip.can.Can.onEnable(Can.java:53)

at com.st.microxplorer.plugins.ipmanager.pluginmanagement.IPUIPlugin.onEnablePlugin(IPUIPlugin.java:256)

at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.enableDisableButtons(BlockDiagram.java:1065)

at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.createPanels(BlockDiagram.java:439)

at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.propertyChange(BlockDiagram.java:974)

at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)

at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)

at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)

at com.st.microxplorer.util.MXPropertyChangeSupport.firePropertyChange(MXPropertyChangeSupport.java:40)

at com.st.microxplorer.mxsystem.MxSystem.completeLoadConfig(MxSystem.java:369)

I have tried rebooting, removing and reinstalling CubeMx 4.24, and creating new projects from scratch. With this MCU, as soon as both CAN and ETH IPs are activated, I get this crash.

If it is possible to download CubeMx 4.23.0, please advise where I can do so. I need to get back up and running as soon as possible, as I have multiple active projects that depend on CubeMx heavily. It was working great up until now...

Thanks,

Dave

#cubemx-4.24 #stm32cubemx
1 ACCEPTED SOLUTION

Accepted Solutions
Jeanne Joly
Senior III
Posted on February 22, 2018 at 16:38

Thank you

Rea.David

for all your comments.

This issue will be fixed in the next CubeMX release.

Sorry for any inconvenience it may cause.

BR. Jeanne

View solution in original post

3 REPLIES 3
Imen.D
ST Employee
Posted on February 18, 2018 at 10:29

Hello

Rea.David

,

This issue is raised internally to CubeMX team.

You find old CubeMxversion in this discussion

https://community.st.com/0D50X00009XkYVDSA3

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Rea.David
Associate II
Posted on February 19, 2018 at 14:35

Thank you

DAHMEN.IMEN

! I found a workaround that may help with resolution:

The error appeared to be related to the prescaler check step when loading the CAN IP configuration block. It also occurred when clicking the 'CAN' button on the Configuration tab, before closing CubeMx in Step 6 above, but the application remained responsive.

Increasing the APB1 clock prescaler value to reduce the APB1 clock to 25MHz allows the IP to load successfully again. After this change, CubeMx can be closed and the project successfully re-opened. Setting the prescaler so that APB1 is clocked at 50MHz re-introduces the null pointer exception behavior.

So, the main issue seems unrelated to having the ETH IP loaded; rather it is because of the auto clock reconfiguration that occurs when adding the ETH IP to the project, which configures the APB1 bus.

Thanks,

Dave

Jeanne Joly
Senior III
Posted on February 22, 2018 at 16:38

Thank you

Rea.David

for all your comments.

This issue will be fixed in the next CubeMX release.

Sorry for any inconvenience it may cause.

BR. Jeanne