Sweethome3d 5.7 can't import furniture library
In Ubuntu 17.10 Artful I have sweethome3d 5.5.2 and import furniture library works fine.
In Ubuntu 18.04 Bionic I have sweethome3d 5.7 and can't import furniture library.
also Furniture library editor 2.22 des not work - see http://www.sweethome3d.com/support/forum/viewthread_thread,8585
Imported libraries (also if .zip) are correctly inserted in .eteks/sweethome3d but new furnitures does not appear in furniture catalog window both category folders and searchable list
corrado@corrado-p8-bionic:~$ ls .eteks -AR
.eteks:
sweethome3d
.eteks/sweethome3d:
furniture languages preferences.xml textures
.eteks/sweethome3d/furniture:
3DModels-Scopia-1.6.3.zip Contributions.sh3f LucaPresidente.sh3f Scopia.sh3f
.eteks/sweethome3d/languages:
.eteks/sweethome3d/textures:
corrado@corrado-p8-bionic:~$
Same problem on Ubuntu 18.10 with sweethome3d 5.7
Problem occurs with both x11 and wayland session
Import a single furniture works fine
my Ubuntu environment is:
corrado@corrado-p8-bionic:~$ inxi -SCGx
System: Host: corrado-p8-bionic Kernel: 4.15.0-20-generic x86_64 bits: 64 gcc: 7.3.0
Desktop: Gnome 3.28.1 (Gtk 3.22.30-1ubuntu1) Distro: Ubuntu 18.04 LTS
CPU: Dual core Intel Core i3-7100 (-MT-MCP-) arch: Skylake rev.9 cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 15648
clock speeds: max: 3900 MHz 1: 2583 MHz 2: 1525 MHz 3: 1952 MHz 4: 1959 MHz
Graphics: Card: Intel HD Graphics 630 bus-ID: 00:02.0
Display Server: x11 (X.Org 1.19.6 ) driver: i915 Resolution: 1920x1080@60.00hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2)
version: 4.5 Mesa 18.0.0-rc5 Direct Render: Yes
corrado@corrado-p8-bionic:~$
apt policy for sweethome3d is as follows.
sweethome3d:
Installed: 5.7+dfsg-2
Candidate: 5.7+dfsg-2
I just tried with Ubuntu 18.04 and didn't notice any issue.
Be sure to use Sweet Home 3D official distribution available on SourceForge.net.
Same issue here, I switched from Xubuntu 16.04 to Mate 18.04. Furniture isn't shown anymore. I tried importing manually in ~/.eteks/sweethome3d as well as in /usr/share/sweethome3d/furniture but without any success.
restoring the ~/.eteks folder from the old system didn't help either
Funny, that bug report is that actual - I had this issue since weeks but didn't find time to investigate the problem.
Last edit: hirntot 2018-05-25
Please confirm you use Sweet Home 3D official distribution available on SourceForge.net.
And if not, what Java version is shown in About dialog box?
Well, I did a simple Ubuntu Install.
You want me to uninstall it and try installing it from sourceforge.net?
About dialog box is attached...
Last edit: hirntot 2018-05-25
Please use SourceForge.net distribution.
Sweet Home 3D wasn't tested with Java 10. I'm not responsible of Ubuntu repository and don't know why they absolutely want Sweet Home 3D to depend on the latest Java version!
The reason is simple, they (and we in openSUSE too) do not want to depend on old javas – we maintain only 1 or 2 versions in one release (like java 9 and 10 in the latest release).
BTW would you be interested in patches like this?
If you want to depend only on the two last versions of Java, you might soon have some problems with many Java programs since Oracle decided to change its version numbering.
Thanks for the patch. I just updated
FileContentManager.javaaccordingly. All patches are interesting as long as they are compatible with Java 5.using that sourceforge.net source, I ran that sweethome3d.sh but after starting up it told me to update my graphic driver. although there's no update and it ran pretty smooth under ubuntu 16.04
I installed from Ubuntu repository. Will reinstall from sourceforge.net and in case open a bug on launchpad
Installed from sourceforge.net works fine on Ubuntu 18.10 Cosmic. Opened a bug:
https://bugs.launchpad.net/ubuntu/+source/sweethome3d/+bug/1773532
please subscribe!
thanks.
So I had the same problem on openSUSE. I believe the problem is due to newer java used for compilation.
The attached patch fixes it for me.
The long story is that a newer java tries to
findClassfromURLContentClassLoaderwith the furniture/texture first. And if that fails, the load of library fails too.getResourceAsStreamfromURLContentClassLoaderis thus never called.Hence I dropped
URLContentClassLoaderimplementation completely and usedjava.net.URLClassLoaderinstead. It has all that implemented already (except support for remove-writable-file. But that is no problem on UN*X systems in the end at all).As your patch removes the access to a JAR file with URLContent class, it will introduce a regression under Windows because of the Java bug #6962459 that will never be fixed.
Until version 4.0 included,
DefaultFurnitureCatalogandDefaultTexturesCatalogused to calljava.net.URLClassLoaderdirectly but implementation was changed because of this bug.I understand and that's why I wrote that the change does not matter on UN*X systems.
Anyway, the proper solution is to implement
findClassinURLContentClassLoader. But that's too much for me. I don't know what to construct the class from. Staring into java'sjava.net.URLClassLoaderdoes not help me much either – I don't understand where they get thebyte []to construct the class when we load onlysh3ffile without any classes at all.Or maybe just extend
java.net.URLClassLoaderand override itsgetResourceAsStream?It was a false track. It was
findResourcemissing. So this patch fixes it as well and should be unintrusive.getResourceAsStreamis not called here at all.Same problem with the snap version installed on Ubuntu 18.10 from Ubuntu Software
@Jiri Slaby
Thank you for the patch. I have applied this change in Debian. It will soon migrate to Ubuntu as well. The sweethome3d-furniture-editor is also affected by this bug. Any idea how to fix that?
See also https://bugs.launchpad.net/ubuntu/+source/sweethome3d-furniture-editor/+bug/1773553
Fixed in version 6.0. Many thanks Jiri Slaby for your inquiry.