Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 5
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3851 times and has 4 replies Next Thread
fildy
Newbie




Joined: Oct 18, 2013
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Error on save - string index out of bounds

Hi,

I have been using Sweet Home 3D successfully for a while without any errors when it failed to save the model. The automatic saves every 10 minutes had failed as well, so I know roughly when the problem started.

The error I got was

Can't save home in:
/home/..etc
java.lang.StringIndexOutOfBoundsException:String index out of range:-1

It had worked for some time before then, and no updates to any of the software was made during the edit session and saving to a different location made no difference.

Error message suggests it is trying to retrieve a string from an empty array. I had imported furniture models created in Blender, and one of these had no materials defined, which could be a cause. I re-imported the furniture model with a material correctly defined and used it afterwards without a problem.

So there appears to be a number of potential bugs:
1. Not warning when an automatic save fails leading to wasted edits
2. Not correctly overwriting a furniture item when importing a modified one
3. Not trapping empty string array when saving.

The version I am using is 4.1 with Java version 1.6.0_45

Is there any way to save my work or would the only resolution would be to revert to the latest automatic save?
[Oct 18, 2013, 8:10:50 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Error on save - string index out of bounds

Sorry, if you will lose the work made during your last session, but if there's a bug in your project or the program, it has to be fixed first. Please, send your .sh3d file to me if you can't open it, I'll try to repair it and fix the bug that could have provoked this error.

I had imported furniture models created in Blender, and one of these had no materials defined, which could be a cause.
It's not a problem to define no material or have no MTL file.
So there appears to be a number of potential bugs:
Yes, there are miserably still some bugs in Sweet Home 3D, and I make my best to fix them with always a higher priority given to bugs that happen during saving operations.
1. Not warning when an automatic save fails leading to wasted edits
And interrupting your current drawing with a dialog? Note sure it's the best strategy, for problems that happen rarely.
2. Not correctly overwriting a furniture item when importing a modified one
Please, describe a way to reproduce this bug, if you're sure it comes from this handling.
3. Not trapping empty string array when saving.
It's been trapped since you got the error at the moment you save the file! I don't think you would prefer Sweet Home 3D doesn't report any issue and let you think no problem happened...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
----------------------------------------
[Edit 1 times, last edit by Puybaret at Oct 18, 2013, 10:08:25 PM]
[Oct 18, 2013, 9:33:47 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
fildy
Newbie




Joined: Oct 18, 2013
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: Error on save - string index out of bounds

I managed to recreate the problem, as you say it was not the .mtl file, it was caused by a parameter in the .properties file. The furniture could be used in the plan, but an error occurred when selecting "save". To solve the problem I deleted all instances of the imported furniture, corrected the furniture library file re-imported it again.

When I created the furniture library (with items created from Blender) I copied the .properties file from a more complex model and edited them with a text editor, leaving the multiPartModel parameter set to "true" which caused the error on save.

Using the furniture editor would have avoided that problem but I was doing things manually as I had another problem earlier with the way another program handled the .mtl file.

Thanks for your help with this.
[Oct 21, 2013, 6:49:39 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Error on save - string index out of bounds

Thanks for investigating where the issue was coming from.
When set to true, the multiPartModel property indicates that a 3D model file should be saved with all the files stored in the same directory as the model (like MTL or texture images). But if this property is wrongly set to true and the 3D model file isn't in a directory, it will give the error you reported. Therefore, I updated the Beta version 4.2 to silently accept that kind of 3D model at saving time, ignoring the fact that it should be in a directory of the sh3f file.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 21, 2013, 7:49:41 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
sree.arun.kr
Advanced Member



INDIA
Joined: Oct 28, 2013
Post Count: 137
Status: Offline
Reply to this Post  Reply with Quote 
Re: Error on save - string index out of bounds

Now a days I am facing the problem to save the render output.
This problem only exist with heavy files that needs a long HQ rendering time.
After Render when I click the save button the save dialog window does not appears.
This bug is also exist with all the files when I click outside the application
or minimize it while rendering time.The application runs in high priority CPU usage(about98%)
in Task manager. Once the application failed to save, then all the dialog windows
which uses save function(save work, save video render, save render image after
re-rendering) does not appears.
Recently I updated my java version & GPU driver
I have SweetHome3D Version : 4.1& 4.2. d oh thinking silly
----------------------------------------

[Nov 8, 2013, 4:58:59 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved