← Back to team overview

yade-dev team mailing list archive

[Bug 987731] Re: post load bug with O.save() and O.load()

 

problem solved with define WallMat new, before erasing a body:

WallMat=O.bodies[id_tmp_walls].material
O.bodies.erase(id_tmp_walls)

So it is no bug, right?

** Changed in: yade
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yade
developers, which is the registrant for Yade.
https://bugs.launchpad.net/bugs/987731

Title:
  post load bug with O.save() and O.load()

Status in Yet Another Dynamic Engine:
  Invalid

Bug description:
  The bug occurs, when a save file is created with utils.saveVars()

  utils.saveVars('wall_ids',id_tmp_walls=id_tmp_walls)
  O.save('save-postloadbug.yade')

  , loaded afterwards in another file

  O.load('save-postloadbug.yade')
  utils.loadVars('wall_ids')
  id_tmp_walls = yade.params.wall_ids.id_tmp_walls

  , deleted a body and create a new one

  O.bodies.erase(id_tmp_walls)
  id_new_walls = O.bodies.append(utils.box((0,0,0),(.5,.5,.5),material=WallMat))

  and saved again.

  O.save('save-postloadbug.yade')

  When one trys to load

  O.load('save-postloadbug.yade')

  it will give an error message:

  RuntimeError: Scene::postLoad: Internal inconsistency, shared
  materials not preserved when loaded; please report bug.

  
  To reproduce the bug, run 1-generation-post-load-bug.py and then 2-reproduce-post-load-bug.py (see attachment).

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/987731/+subscriptions


References