← Back to team overview

yade-users team mailing list archive

Re: [Question #163165]: O.save(), O.load() with an erased body ?

 

Question #163165 on Yade changed:
https://answers.launchpad.net/yade/+question/163165

    Status: Open => Answered

Anton Gladky proposed the following answer:
Hi,

please, try to to the same in debug-mode and file a bug on bug-tracker
[1].

[1] https://bugs.launchpad.net/yade
Anton



On Wed, Jun 29, 2011 at 5:21 PM, Kneib François
<question163165@xxxxxxxxxxxxxxxxxxxxx> wrote:
> New question #163165 on Yade:
> https://answers.launchpad.net/yade/+question/163165
>
> Hi !
>
> I think I found a bug, and there are the steps to get it :
> - launch yade (for example without any script)
> - add a sphere : O.bodies.append(utils.sphere((0.2,0.2,0.2),0.006))
> - delete it : O.bodies.erase(0)
> - save yade's universe : O.save("./test")
> - quit yade
> - launch yade
> - load the file : O.load("./test")
> ->segmentation fault
>
> I think it's because when you erase something the size of O.bodies (etc...) doesn't change and now contains an empty value. (the c++ array may not be dynamic ?)
> So when the O.load() function is called, yade try to load a non-existant body ?
>
> Maybe this can be fixed by changing the load() method ?
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.