BUG: Persistent background image on file after deletion

This topic has been viewed 3439 times and has 9 replies
Thread status: Active
How can I do this? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
User avatar
hal9000
Posts: 152
Joined: Wed May 09, 2012 10:27 am
Country: Spain

BUG: Persistent background image on file after deletion

Post by hal9000 »

First of all, sorry to post here, but I wanted to attach a file larger than the maximum allowed by the bug tracker. Although now I'm writing here I cannot see controls to upload a file at all. [:-?]

I cannot reproduce it using a new SH3D project but I had the problem with the project I'm working on with SH3D 3.5 installed on Windows 7.

I have a copy of the file (I'll try to upload some how) on which I deleted all the content except the background image. It takes about 1.7M, since it's the size of the background image.

If you load that file, delete the background and then save the file again, the size of the file is still 1.7M. More than that, if you then add another background image and save the size of the file will be 1.7M plus the new background size.
If a long walk every day were healthy, mailmen would be immortal. [:p]
User avatar
hansmex
Posts: 4027
Joined: Sat Sep 26, 2009 11:36 am
Country: Netherlands

Re: BUG: Persistent background image on file after deletion

Post by hansmex »

Angel,

Read this message to learn about sharing files and images.

Hans
Hans

new website - under constuction
hansdirkse.info
User avatar
hal9000
Posts: 152
Joined: Wed May 09, 2012 10:27 am
Country: Spain

Re: BUG: Persistent background image on file after deletion

Post by hal9000 »

Thanks Hans.

So no way to attach... :(

I'll try to share it from SkyDrive then, but in that case I'll post it on the bug tracker. I just did it here for the attachments.

Regards.
If a long walk every day were healthy, mailmen would be immortal. [:p]
User avatar
hal9000
Posts: 152
Joined: Wed May 09, 2012 10:27 am
Country: Spain

Re: BUG: Persistent background image on file after deletion

Post by hal9000 »

Ok, bug opened on the tracker.

Anyway, this is the file in case some one want to check it:
https://skydrive.live.com/redir.aspx?ci ... pei6a0uCbg

Thanks again.
If a long walk every day were healthy, mailmen would be immortal. [:p]
User avatar
hansmex
Posts: 4027
Joined: Sat Sep 26, 2009 11:36 am
Country: Netherlands

Re: BUG: Persistent background image on file after deletion

Post by hansmex »

Angel, Emmanuel,

I downloaded your file, and opened it on my computer (Ubuntu 12.04 with SH3D 3.5).

1 - The file opens, but the screen does strange things: it seems as if the program opens on a screen that is much bigger than my screen: at first I thought I was looking at a screen shot. In the top left corner there is a small window with SH3D, about 3x smaller than usual. Sub-windows (like Preferences) open in normal size and are accessible. I deleted the background image and saved the empty file again. It has the same size as before. I then closed that window.

2 - I extracted your image from the SH3D file, and saved it as a JPG. I then opened SH3D again and imported that JPG as a background image. I then saved the file, deleted the background image and saved it again. The file with image is 1.8 Mb, the file without image is 5.7 Kb. Both files now open in normal windows, and seem to behave normally.

If you need further testing, please let me know.
I attach the new file with image.

Hans

http://www.mediafire.com/?ycor2gi9f2j3ak4
Hans

new website - under constuction
hansdirkse.info
User avatar
hal9000
Posts: 152
Joined: Wed May 09, 2012 10:27 am
Country: Spain

Re: BUG: Persistent background image on file after deletion

Post by hal9000 »

Thanks for your testing Hans.

So if I understand well you had to import the same background image (extracted from the zip SH3D container)over the supposedly deleted background image and then the second deletion is correctly made, right?

A weird thing... in addition I don't see the window size problem that you saw. on my PC all is normal except for the background image remain inside the SH3D file after being "deleted".

Regards.
If a long walk every day were healthy, mailmen would be immortal. [:p]
User avatar
hal9000
Posts: 152
Joined: Wed May 09, 2012 10:27 am
Country: Spain

Re: BUG: Persistent background image on file after deletion

Post by hal9000 »

No way...

I deleted the background on my file and saved (size 1.7M). I extracted "0" and renamed it to "0.jpg", then imported it as background and saved (size 3.5M). Finally I deleted the background again and saved (size 1.7 again). :(

Anything different of what you did, Hans?
If a long walk every day were healthy, mailmen would be immortal. [:p]
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: BUG: Persistent background image on file after deletion

Post by Puybaret »

Guys don't look further, I perfectly know why it behaves like this, because it's the way I programmed it.
The remaining background image is bound to the default level that exists in Sweet Home 3D before you add a first level, and as soon as you create a level this image can't be removed.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
hal9000
Posts: 152
Joined: Wed May 09, 2012 10:27 am
Country: Spain

Re: BUG: Persistent background image on file after deletion

Post by hal9000 »

Oh, I see. Mystery solved then.

Certainly I created additional levels which I removed when I deleted all the content, leaving only the first level with the background image.

I hope it can be fixed easily. It's not a big problem, but it's more annoying when the imported background image has a large size, like the one I used.

Puybaret, if for some reason the fixing implies many or complex changes, I guess at least you could make a simple substitution of the actual image file for a dummy image file (0 bytes or 1x1 pixels), that way the wasted space is released.

Thanks and regards.
If a long walk every day were healthy, mailmen would be immortal. [:p]
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: BUG: Persistent background image on file after deletion

Post by Puybaret »

Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest