sergiocasero / sweet_home_3d_ha_lightning

A simple easy-to-use tool to generate all images needed to create a Home Assistant floor plan
Other
101 stars 3 forks source link

no images created #5

Open skyw33 opened 2 years ago

skyw33 commented 2 years ago

I got to the point where it starts to generate the images and sweet home 3d appears frozen for about 2 minutes. It finally unfreezes, but there are no images in the folder I specified. I have about 30 lights:

HomeAssistantLightningOptions [path=/home/jonathan/Downloads/images, imageWidth=100, imageHeight=70, quality=LOW]
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.util.Arrays.copyOf(Arrays.java:3181)
    at java.util.ArrayList.toArray(ArrayList.java:380)
    at java.util.ArrayList.<init>(ArrayList.java:178)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:283)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:285)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
    at com.sergiocasero.HomeAssistantLightningPlugin.recursivelyCombine(HomeAssistantLightningPlugin.java:281)
thomashermine commented 1 year ago

I'm not sure how to get the logs, but I have the same issue — I get a perfect config.yml file, but not images.

I'm on SweetHome 3D 7.0.2 on macOS 12.6

sergiocasero commented 1 year ago

@skyw33 looks like in your case you're getting out of memory when generating all the possible combinations, I'll try to improve the performance of this method

@thomashermine, how many lights do you have?

thomashermine commented 1 year ago

@sergiocasero Sorry about the late reply, I missed the notification.

I just redid a test with a single light in the simplest plan possible (just 1 room, 1 light).

But still no images to be found anywhere. How can I get some logs?

nielsgl commented 1 year ago

I'm having the same issue, Sweet Home 3D 7.0.2 on MacOS Ventura 13.0.1. I only have 4 lights, the config is generated but no lights, even when using small width and height and low quality settings.

goedh452 commented 1 year ago

Anyone found a solution to this? I'm experiencing the same problem with 2 lights just to test. I ran the app from command line on MacOS and the output is:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Piece can't be rotated around an horizontal axis
    at com.eteks.sweethome3d.model.HomePieceOfFurniture.setPitch(Unknown Source)
    at com.sergiocasero.HomeAssistantLightningPlugin$HomeAssistantLightningAction.generateImages(HomeAssistantLightningPlugin.java:198)
    at com.sergiocasero.HomeAssistantLightningPlugin$HomeAssistantLightningAction.execute(HomeAssistantLightningPlugin.java:58)
    at com.eteks.sweethome3d.swing.HomePane$ActionAdapter.actionPerformed(Unknown Source)
    at com.eteks.sweethome3d.swing.ResourceAction$AbstractDecoratedAction.actionPerformed(Unknown Source)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
    at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
    at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
    at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
    at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
    at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:129)
    at java.desktop/java.awt.MenuItem.processActionEvent(MenuItem.java:690)
    at java.desktop/java.awt.MenuItem.processEvent(MenuItem.java:649)
    at java.desktop/java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:375)
    at java.desktop/java.awt.MenuComponent.dispatchEvent(MenuComponent.java:363)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)