yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #08672
Re: [Bug 803774] Re: Saving, loading simulation with erased bodies crash.
OK, I see, thank you very much. Is the body deleted then? The length of
the container is still the same when I delete something, even after the
fix. Before sending you the script, do you think it makes any difference
if I rerun the test with the new compilation? It will take a bit of time
for me if I have to rerun it.
Chiara
On 15 Jun 2012, at 10:04, Anton Gladky wrote:
> Hi Chiara,
>
> the fix is here [1]. It checks, whether the body exist before
> clearing its intrs-container.
>
> If you are still affected by this bug, please, send a short
> script, reproducing the problem
>
> Thanks
> Anton
>
> [1]
> https://github.com/yade/trunk/commit/ce52daf69cc7b0d804703a0877ffffec68fafae8
>
>
> 2012/6/15 Chiara Modenese <c.modenese@xxxxxxxxx>:
>> Hi Anton,
>>
>> I am currently affected by this bug. I am using an older release (but
>> not too old) andI updated the code following your fix in r2880. The bug
>> still occurs though but I have have not rerun the test. I reload the old
>> test using the code I recompiled after the change, I remove the bodies I
>> do not need anymore, save the test and then reload it again (but the
>> crash occurs). Do I perhaps need to rerun the test for the change to be
>> effected?
>>
>> Also, could you explain in words your fix in the code?
>>
>> Thank you.
>> Chiara
>>
>
> --
> You received this bug notification because you are a member of Yade
> developers, which is the registrant for Yade.
> https://bugs.launchpad.net/bugs/803774
>
> Title:
> Saving, loading simulation with erased bodies crash.
>
> Status in Yet Another Dynamic Engine:
> Fix Released
>
> Bug description:
> Here is the bug :
>
> - 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 ?
>
> I joined the debug output.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/yade/+bug/803774/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help : https://help.launchpad.net/ListHelp
--
You received this bug notification because you are a member of Yade
developers, which is the registrant for Yade.
https://bugs.launchpad.net/bugs/803774
Title:
Saving, loading simulation with erased bodies crash.
Status in Yet Another Dynamic Engine:
Fix Released
Bug description:
Here is the bug :
- 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 ?
I joined the debug output.
To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/803774/+subscriptions
Follow ups
References