← Back to team overview

yade-users team mailing list archive

Re: crash in lattice model

 

Jingsong Chen said:     (by the date of Sat, 27 Jun 2009 14:58:45 -0000)

> Dear Janek Kozicki:
> 
> thank you for your suggestion, and i tried your method, but it still
> crashed as before.
> 
> i also tried the simple FileGenerator examples in the code in latest
> trunk. I should made some change in the code to let it through when i
> compiled it (delete  latticeLaw->tension_compression_different_stiffness
> = true;  add "false" in REGISTER_SERIALIZABLE(LatticeExampleSimple); ).
> Then the compilation succeed.

I don't get it.. you picked files LatticeExampleSimple.[ch]pp from
trunk and compiled them with 0.12rc ? This mixing maybe works, but
shouldn't be done by unexperienced people. Either you are compiling
and using the svn treunk HEAD or 0.12rc. To try latest examples you
have to use HEAD.


> For the simple example, once after I started the simulation, the four
> control button in the Simulation tab of the Simulation Controller turn
> grey, I can not stop or pause the simulation by myself. The simulation
> will not stop, and there is no items in the OpenGL display (before i
> started the simulation, i can see some node in the display).
> 
> I also found this in terminal.
> "/home/daisy/build-0.12rc1/include/yade-0.12rc1/yade/core/MetaEngine2D.hpp:61
> WARNING! dynamic cast of engine unit LatticeSet2LatticeBeams failed,
> will use static_cast. Go figure why."

this message you can safely ignore. It has nothing to do with lattice
and is related to some dynamic casting in C++ in general, not with
lattice.

> 
> I think there may exist problems in version. some code can work in old
> version (like version yade-0.11.1), but may not work in new version
> (like version yade-0.12rc1). the version yade-0.12rc1 is also different
> with the latest svn version.
> 
> I think this may be the reason for the crash.

you shouldn't be mixing different versions, unless you 100%
understand what you are doing.


Now, let me tell you about that OpenGL crash:

1. after you load simulation, you should be able to see a 3D view of
lattice sample which was generated. Click "center scene" if it's not
visible. Then you must see it. Not a single sphere, but a sample,
full of rods connected together.

2. then you have looked at your sample, you can click "right arrow"
button, to start simulation. It will start calculations, and it will
be displayed in 3D while being calculated.

3. "sync.display" checkbox may affect this, but in general it is a
known bug that simulation can crash *IF* the OpenGL window is opened
while calculating. I did no fix this, because I don't need to: all
serious calculation are ran *without* display. So to avoid crash,
simply close the view. After simulation is finished I am loading
automatically saved snapshots (using NullGUI) and look at the sample
in various stages of calculation.
This crash occurs, because it can happen that an element is being
drawn on the screen while simultaneously being deleted by the
calculating thread.

4. Run the simulation without OpenGL 3D view, by either just closing
it, or by running the simulation with NullGUI or python script. And
it will never crash and produce a correct physical result.


OpenGL is only used for debugging and is not useful for week-long
calculations, so it wasn't important enough for me to fix this crash.
Yes, I agree that it's very annoying.

best reagrds
-- 
Janek Kozicki                                                         |



References