Print at Jan 28, 2026, 11:39:18 AM
Posted by JosLouis at Jan 23, 2026, 6:59:51 PM
confused   Null Pointer Exception from Linux Debian version
I installed SW3D from the latest website version. I tried fom the desktop icon and the terminal and got a Null Pointer Exception (see output below).

I was running version 7.5 on the same machine under Debian_MX-Linux 21 with XFCE without problem.
I tried the snap version from the Ubuntu repository. It works but is outdated version 6.6 and does not open correctly models created with version 7.5. The flatpak version 7.5 found here https://flathub.org/en/apps/com.sweethome3d.Sweethome3d doesn't work either (files not found and null pointer exception).

Any suggestions?


Platform:
Operating System: Kubuntu 24.04
KDE Plasma Version: 5.27.12
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.14.0-37-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD Athlon Silver 3050U with Radeon Graphics
Memory: 3.2 Gio of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Dell Inc.
Product Name: Inspiron 3505
System Version: 1.34.0

java -version:
openjdk version "21.0.9" 2025-10-21
OpenJDK Runtime Environment (build 21.0.9+10-Ubuntu-124.04)
OpenJDK 64-Bit Server VM (build 21.0.9+10-Ubuntu-124.04, mixed mode, sharing)

Command from icon or terminal
/home/michel/SweetHome3D-7.5/SweetHome3D

Try ===========================================================================
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.X11FontManager.getFileNameFromPlatformName(X11FontManager.java:174)
at sun.font.SunFontManager.initCompositeFonts(SunFontManager.java:3481)
at sun.font.SunFontManager.access$700(SunFontManager.java:65)
at sun.font.SunFontManager$2.run(SunFontManager.java:545)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.<init>(SunFontManager.java:376)
at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at sun.font.SunFontManager.getInstance(SunFontManager.java:250)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1626)
at javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(BasicLabelUI.java:245)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at javax.swing.tree.DefaultTreeCellRenderer.getPreferredSize(DefaultTreeCellRenderer.java:565)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2815)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:492)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1360)
at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:738)
at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:109)
at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:412)
at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3414)
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 java.awt.Component.firePropertyChange(Component.java:8434)
at javax.swing.JTree.setModel(JTree.java:885)
at javax.swing.JTree.<init>(JTree.java:673)
at javax.swing.JTree.<init>(JTree.java:569)
at com.eteks.sweethome3d.swing.FurnitureCatalogTree.<init>(Unknown Source)
at com.eteks.sweethome3d.swing.SwingViewFactory.createFurnitureCatalogView(Unknown Source)
at com.eteks.sweethome3d.viewcontroller.FurnitureCatalogController.getView(Unknown Source)
at com.eteks.sweethome3d.swing.HomePane.createCatalogFurniturePane(Unknown Source)
at com.eteks.sweethome3d.swing.HomePane.createMainPane(Unknown Source)
at com.eteks.sweethome3d.swing.HomePane.<init>(Unknown Source)
at com.eteks.sweethome3d.swing.SwingViewFactory.createHomeView(Unknown Source)
at com.eteks.sweethome3d.viewcontroller.HomeController.getView(Unknown Source)
at com.eteks.sweethome3d.HomeFramePane.<init>(Unknown Source)
at com.eteks.sweethome3d.HomeFrameController.getView(Unknown Source)
at com.eteks.sweethome3d.HomeFrameController.displayView(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D$4.collectionChanged(Unknown Source)
at com.eteks.sweethome3d.model.CollectionChangeSupport.fireCollectionChanged(Unknown Source)
at com.eteks.sweethome3d.model.HomeApplication.addHome(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.showDefaultHomeFrame(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.start(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D$5.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
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:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
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)
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0, 0x723d2c032a50, refCount 1, unCloseable false]

Posted by Keet at Jan 24, 2026, 8:14:22 AM
Re: Null Pointer Exception from Linux Debian version
Updated from this post:

1. Purge ALL the repository installed packages related to SH3D (that means including the configuration files);
2. Manually delete or rename the hidden [HOME].eteks folder;
3. Download the latest 7.5 version from sourceforge . Extract the SweetHome3D-7.5-linux-x64.tgz somewhere in your user space, NOT in wide system.
4. Run using the SweetHome3D-Java3D-1_5_2 script

If you are going to use the Plugin Manager plugin:
Sweet Home 3D comes with its own Java runtime but that version causes a problem with the Plugin Manager. Download a newer version and replace the runtime directory with the newer files. I use 1.8.0_471 and that works perfectly fine.
(Before that you can try editing the startup script and let it point to your installed Java runtime instead of the runtime that comes with Sweet Home 3D.)
You can check which Java version Sweet Home 3D is using here: [Menu] > Help > About.

You already use X11 instead of Wayland so that is good.
Never use flatpak or similar versions, they can't be trusted to work as desired.
Make sure you have updated your graphics driver to the latest version.

If the problem persists then try the same install with a different Desktop environment. There are very few problems running Sweet Home 3D on Linux, but when there is a problem its often under KDE or using Wayland. You already have a working version under XFCE, I use MATE and don't have any problems.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by JosLouis at Jan 24, 2026, 9:43:59 PM
Re: Null Pointer Exception from Linux Debian version
Thanks for the prompt response.
Definitely SweetHome3D does not work under KDE Plasma,
but it works fine under MX-Linux 25 with XFCE on a HP Probook.

===============================================================
Purge of Directories and reinstall under KDE-Plasma

apt list sweet* > SH3D_purge.txt

En train de lister…
sweethome3d-furniture-editor/noble,noble,now 1.30-1 all [installé]
sweethome3d-furniture-nonfree/noble,noble 1.6.2-2build2 all
sweethome3d-furniture/noble,noble,now 1.8-1 all [installé, pouvant être supprimé automatiquement]
sweethome3d-textures-editor/noble,noble,now 1.8-1 all [installé]
sweethome3d/noble,noble 7.2+dfsg-1 all

sudo apt purge sweet* >> SH3D_purge.txt

Lecture des listes de paquets…
Construction de l'arbre des dépendances…
Lecture des informations d'état…
Le paquet « sweethome3d » n'est pas installé, et ne peut donc être supprimé
Le paquet « sweethome3d-furniture-nonfree » n'est pas installé, et ne peut donc être supprimé
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
icedtea-netx janino java-wrappers junit junit4 libactivation-java
libapache-pom-java libbatik-java libbcmail-java libbcpkix-java
libbcprov-java libbcutil-java libcommons-io-java libcommons-logging-java
libcommons-parent-java libfreehep-graphics2d-java
libfreehep-graphicsbase-java libfreehep-graphicsio-java
libfreehep-graphicsio-svg-java libfreehep-io-java libhamcrest-java
libitext-java libjanino-java libjava3d-java libjava3d-jni libjaxp1.3-java
libmail-java libnsl2 librhino-java libsunflow-java libtagsoup-java
libvecmath-java libxml-commons-external-java libxmlgraphics-commons-java
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
Les paquets suivants seront ENLEVÉS :
sweethome3d-furniture* sweethome3d-furniture-editor*
sweethome3d-textures-editor*
0 mis à jour, 0 nouvellement installés, 3 à enlever et 0 non mis à jour.
Après cette opération, 136 Mo d'espace disque seront libérés.
Souhaitez-vous continuer ? [O/n] (Lecture de la base de données...
(...)
Suppression de sweethome3d-furniture (1.8-1) ...
Suppression de sweethome3d-furniture-editor (1.30-1) ...
Suppression de sweethome3d-textures-editor (1.8-1) ...
Traitement des actions différées (« triggers ») pour desktop-file-utils (0.27-2build1) ...
Traitement des actions différées (« triggers ») pour hicolor-icon-theme (0.17-2) ...
Traitement des actions différées (« triggers ») pour gnome-menus (3.36.0-1.1ubuntu3) ...
Traitement des actions différées (« triggers ») pour bamfdaemon (0.5.6+22.04.20220217-0ubuntu5) ...
Rebuilding /usr/share/applications/bamf-2.index...

sudo apt autoremove >> SH3D_purge.txt

Lecture des listes de paquets…
Construction de l'arbre des dépendances…
Lecture des informations d'état…
Les paquets suivants seront ENLEVÉS :
icedtea-netx janino java-wrappers junit junit4 libactivation-java
libapache-pom-java libbatik-java libbcmail-java libbcpkix-java
libbcprov-java libbcutil-java libcommons-io-java libcommons-logging-java
libcommons-parent-java libfreehep-graphics2d-java
libfreehep-graphicsbase-java libfreehep-graphicsio-java
libfreehep-graphicsio-svg-java libfreehep-io-java libhamcrest-java
libitext-java libjanino-java libjava3d-java libjava3d-jni libjaxp1.3-java
libmail-java libnsl2 librhino-java libsunflow-java libtagsoup-java
libvecmath-java libxml-commons-external-java libxmlgraphics-commons-java
0 mis à jour, 0 nouvellement installés, 34 à enlever et 0 non mis à jour.
Après cette opération, 34,2 Mo d'espace disque seront libérés.
Souhaitez-vous continuer ? [O/n] (Lecture de la base de données...
(...)
Suppression de icedtea-netx (1.8.8-2ubuntu1) ...
update-alternatives: suppression de l'alternative sélectionnée manuellement - bascule de javaws vers le mode automatique
update-alternatives: suppression de l'alternative sélectionnée manuellement - bascule de itweb-settings vers le mode automatique
update-alternatives: suppression de l'alternative sélectionnée manuellement - bascule de policyeditor vers le mode automatique
Suppression de libsunflow-java (0.07.2.svn396+dfsg-18) ...
Suppression de janino (2.7.0-2.1) ...
Suppression de libbatik-java (1.17+dfsg-1) ...
Suppression de java-wrappers (0.4) ...
Suppression de libfreehep-graphics2d-java (2.4+dfsg-3) ...
Suppression de libfreehep-io-java (2.0.2-6) ...
Suppression de junit (3.8.2-10) ...
Suppression de junit4 (4.13.2-4) ...
Suppression de libitext-java (2.1.7-16) ...
Suppression de libbcmail-java (1.77-1) ...
Suppression de libmail-java (1.6.5-2) ...
Suppression de libactivation-java (1.2.0-2) ...
Suppression de libxmlgraphics-commons-java (2.8-2) ...
Suppression de libcommons-logging-java (1.3.0-1ubuntu1) ...
Suppression de libcommons-io-java (2.11.0-2) ...
Suppression de libcommons-parent-java (56-1) ...
Suppression de libapache-pom-java (29-2) ...
Suppression de libbcpkix-java (1.77-1) ...
Suppression de libbcprov-java (1.77-1) ...
Suppression de libbcutil-java (1.77-1) ...
Suppression de libfreehep-graphicsbase-java (2.4+dfsg-3) ...
Suppression de libfreehep-graphicsio-java (2.4+dfsg-3) ...
Suppression de libfreehep-graphicsio-svg-java (2.4+dfsg-3) ...
Suppression de libhamcrest-java (2.2-2) ...
Suppression de libjanino-java (2.7.0-2.1) ...
Suppression de libjava3d-java (1.5.2+dfsg-18build1) ...
Suppression de libjava3d-jni (1.5.2+dfsg-18build1) ...
Suppression de libjaxp1.3-java (1.3.05-6) ...
Suppression de libnsl2:amd64 (1.3.0-3build3) ...
Suppression de librhino-java (1.7.14-2.1) ...
Suppression de libtagsoup-java (1.2.1+-1.1) ...
Suppression de libvecmath-java (1.5.2-7) ...
Suppression de libxml-commons-external-java (1.4.01-6) ...
Traitement des actions différées (« triggers ») pour desktop-file-utils (0.27-2build1) ...
Traitement des actions différées (« triggers ») pour hicolor-icon-theme (0.17-2) ...
Traitement des actions différées (« triggers ») pour gnome-menus (3.36.0-1.1ubuntu3) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.39-0ubuntu8.6) ...
Traitement des actions différées (« triggers ») pour man-db (2.12.0-4build2) ...
Traitement des actions différées (« triggers ») pour bamfdaemon (0.5.6+22.04.20220217-0ubuntu5) ...
Rebuilding /usr/share/applications/bamf-2.index...

rm -vrf .eteks &>> SH3D_purge.txt
(...)
répertoire '.eteks' supprimé


rm -vrf SweetHome3D-7.5/ &>> SH3D_purge.txt
(...)
répertoire 'SweetHome3D-7.5/' supprimé

Download from:
https://sourceforge.net/projects/sweethome3d/

===============================================================================
./SweetHome3D-Java3D-1_5_2Orig &>> SH3D_purge.txt
Java 3D: implicit antialiasing enabled
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.X11FontManager.getFileNameFromPlatformName(X11FontManager.java:174)
(...)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

==============================================================================
Change runtime to system JDK
java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home'
java.home = /usr/lib/jvm/java-21-openjdk-amd64

Replace runtime with /usr/lib/jvm/java-21-openjdk-amd64 in
==============================================================================
/home/michel/SweetHome3D-7.5/SweetHome3D-Java3D-1_5_2 &>> SH3D_purge.txt

Java 3D: implicit antialiasing enabled
Exception in thread "J3D-Renderer-1" java.lang.IllegalAccessError: class javax.media.j3d.X11NativeConfigTemplate3D (in unnamed module @0x3af49f1c) cannot access class sun.awt.X11GraphicsConfig (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @0x3af49f1c
at javax.media.j3d.X11NativeConfigTemplate3D.isGraphicsConfigSupported(X11NativeConfigTemplate3D.java:1
80)
at javax.media.j3d.NativePipeline.isGraphicsConfigSupported(NativePipeline.java:3341)
at javax.media.j3d.Renderer.doWork(Renderer.java:533)
at javax.media.j3d.J3dThread.run(J3dThread.java:275)


===============================================================================
Trial on HP Probook with Debian MX-Linux 25 with XFCE works fine without change
===============================================================================

Posted by Keet at Jan 24, 2026, 9:58:12 PM
Re: Null Pointer Exception from Linux Debian version
Definitely SweetHome3D does not work under KDE Plasma,
Sweet Home 3D is not the only application that has problems on KDE. Especially graphics programs seem to be very tricky on KDE, I don't know why. I never liked KDE so I never used it and so I never ran into these problems. I'm using Debian with MATE for many, many years now and rarely have any problems.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by dorin at Jan 25, 2026, 8:38:43 AM
Re: Null Pointer Exception from Linux Debian version
I can't be totally agree with you.
Trial on HP Probook with Debian MX-Linux 25 with XFCE works fine without change
How? Is the same machine, with the same user but under different desktop (XFCE in place of KDE) or is totally different?
After trying out different operating systems, I decided to stick with Debian + KDE for the last 15+ years.
I have to admit that I've encountered some problems at times, but I think that's because I like to keep up with the latest developments (the test version).

1. Few months ago I've encountered the same problem as you but I've solved only renaming .eteks/sweethome3d to .eteks/sweethome3d-old.
Than I've start SH3D, I've modify settings from inch to cm and close.
In the newly created .eteks/sweethome3d I've copy from the old what I've need.
As you could see it work with Wayland as with X11.
2. I've seen what you've purge and I think now even Libre Office don't work.
3. SH3D work best with their embedded java 8 and java3d-1.6.2a.
4. About Plugin Manager Keet have right. To make it work it need to replace jre1.8.0_202 with jre1.8.0_471.
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law

Posted by JosLouis at Jan 27, 2026, 12:47:20 AM
Re: Null Pointer Exception from Linux Debian version
Thanks Dorin and Keet but SH3D still doesn't work with KDE

Latest trial

Download Java 8 for Linux x64 from https://www.java.com/fr/download/linux_manual.jsp

sudo mkdir /usr/java
sudo mv ~/Téléchargements/jre-8u481-linux-x64.tar.gz /usr/java
cd /usr/java
sudo tar zxvf jre-8u481-linux-x64.tar.gz

Change "$PROGRAM_DIR"/runtime to /usr/java/jre1.8.0_481 in ~/SweetHome3D-7.5/SweetHome3D-Java3D-1_5_2
cd SweetHome3D-7.5/
./SweetHome3D-Java3D-1_5_2 &> ~/SH3D_jre1.8.0_481.txt

Try =============================================================================
Java 3D: implicit antialiasing enabled
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.X11FontManager.getFileNameFromPlatformName(X11FontManager.java:174)
(...)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

=================================================================================

Posted by Keet at Jan 27, 2026, 8:55:45 AM
Re: Null Pointer Exception from Linux Debian version
A little research revealed that the AWT-EventQueue-0 NullPointerException is the most common exception that occurs in Java and it is caused by passing a null value to a method when a valid object or value is expected. Pretty straight forward as the same happens in every programming language.

From your report it seems to happen when Java is trying to retrieve a font from the system. ("at sun.awt.X11FontManager.getFileNameFromPlatformName(X11FontManager.java:174)")
It seems that the FontManager couldn't retrieve a font (now null) for which it is trying to get the filename. You will have to check that you have all fonts installed correctly AND that they are accessible with Java.
You can try starting Sweet Home 3D as root and see if the same problem occurs. If that works correctly it means that a 'normal' user can't find/retrieve the same fonts as root can.

Disclaimer: I'm a professional developer but not in Java. This is just from reading the error message and my general programming knowledge.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by JosLouis at Jan 27, 2026, 8:10:30 PM
Re: Null Pointer Exception from Linux Debian version
Running as root returns the same result.

Submitted a bug report in Launchpad:
Bug #2139244 “Null Pointer Exception in Sweet Home 3D Design Sof...” : Bugs : ubuntu-release-upgrader package : Ubuntu