Skip to main content
CWies.1
Associate III
September 10, 2026
Question

STM32CubeProgrammer crashes under 2.23.0 with (java.lang.reflect.InvocationTargetException)

  • September 10, 2026
  • 4 replies
  • 29 views

I’ve installed the newes STM32CubeProgrammer version on my Apple Silicon Mac. Now when I am running, it directly crashes. Digging a bit deeper via command-line gives:

 

oading PRG Library: /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/Resources/bin/libCubeProgrammer_API.dylib
108 external Loader list

Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:382)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:321)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:893)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:823)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:181)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NullPointerException
at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:89)
at com.sun.javafx.font.PrismFontFactory.getFullNameToFileMap(PrismFontFactory.java:1705)
at com.sun.javafx.font.PrismFontFactory.getFontResource(PrismFontFactory.java:438)
at com.sun.javafx.font.PrismFontFactory.createFont(PrismFontFactory.java:536)
at com.sun.javafx.font.PrismFontLoader.font(PrismFontLoader.java:182)
at javafx.scene.text.Font.font(Font.java:148)
at javafx.scene.CssStyleHelper.deriveFont(CssStyleHelper.java:1804)
at javafx.scene.CssStyleHelper.lookupFont(CssStyleHelper.java:2115)
at javafx.scene.CssStyleHelper.lookup(CssStyleHelper.java:1057)
at javafx.scene.CssStyleHelper.transitionToState(CssStyleHelper.java:839)
at javafx.scene.Node.impl_processCSS(Node.java:9202)
at javafx.scene.Parent.impl_processCSS(Parent.java:1249)
at javafx.scene.control.Control.impl_processCSS(Control.java:868)
at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
at javafx.scene.Node.processCSS(Node.java:9069)
at javafx.scene.Scene.doCSSPass(Scene.java:545)
at javafx.scene.Scene.preferredSize(Scene.java:1646)
at javafx.scene.Scene.impl_preferredSize(Scene.java:1723)
at javafx.stage.Window$9.invalidated(Window.java:889)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:965)
at javafx.stage.Window.show(Window.java:980)
at javafx.stage.Stage.show(Stage.java:263)
at com.st.app.Main.openCubeProgrammmerWindow(Main.java:604)
at com.st.app.Main.start(Main.java:179)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:769)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Exception running application com.st.app.Main

 

My java version installed is the following:

java 17.0.4.1 2022-08-18 LTS
Java(TM) SE Runtime Environment (build 17.0.4.1+1-LTS-2)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4.1+1-LTS-2, mixed mode, sharing)

4 replies

ST Technical Moderator
September 16, 2026

Hello ​there ​@CWies.1 ,
I have copied your setup and did some testing, and the app is working correctly without any crash. However, based on the logs you have provided, it looks like it could be related to the fonts on your mac.
Could you please validate your fonts just to check if any of them are corrupted and see if it fixes the crash? (Go to Font book → Select all fonts → File: Validate Selection)

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
CWies.1
CWies.1Author
Associate III
September 16, 2026

I’ve checked it and i did not show errors. But I still reset my complete font database via command line and rebooted but stil same issue. So I guess it is something with the mac os silicone version and the bundled java version inside the programmer. 
A short discussion with AI brought the line:

com.sun.javafx.font.MacFontFinder.populateFontFileNameMap

should produce the issue.

CWies.1
CWies.1Author
Associate III
September 16, 2026

Some more googling brought this issue up:

https://www.reddit.com/r/JavaFX/comments/ksv1td/javafx_on_m1_chipset/

Since, you are using internally a very old java JDK version which would include a JavaFX8 version this might be not compatible with apple silicone. So I would suggest to build a new version with a newer JDK where JavaFXxx is used for arm64.

Kind regards

Visitor
September 16, 2026

The MacFontFinder error makes me think the crash is happening at the JavaFX UI level rather than during the actual programmer API loading. It'd be interesting to know if the same issue happens with a clean Java runtime or only with the bundled setup. I work around field inspection systems sometimes, and with CS-Arabia, for example, caliper pigging also depends on inspection software handling the collected data reliably. So I can see why a UI or runtime issue like this can be a real headache when the tool is part of a bigger workflow.