← Back to team overview

yade-dev team mailing list archive

Re: trying cmdGui

 

Hi, the crash is from MetaDispatchingEngine2D.hpp:60. Could you think of
solution how to typecast that factored class (by its name) if the
template arg EngineUnitType is (in this case) already a shared_ptr,
namely shared_ptr<InteractingGeometry>&  (in
InteractingGeometryEngineUnit.cpp:39)?

(I will be off till sunday)

Vaclav
> Now after svn update. SVN-HEAD. I tried to play with python
> So here's my session (crashed at the end):
>
>
> janek@szpak:~/20-Programowanie/10-cpp/50-Yade/Bin/moment_law2/bin$ ./yade-svn1246-moment_law2 -N cmdGui
> Constructing ClassFactory  (if multiple times - check '-rdynamic' flag!).
> Constructing SerializableSingleton  (if multiple times - check '-rdynamic' flag!).
> WARNING: cannot open file used for capillary law, in TriaxalTestWater
>   
>>>> o.engines
>>>>         
> Traceback (most recent call last):
>   File "<console>", line 1, in ?
> NameError: name 'o' is not defined
>   
>>>> o=Omega()
>>>> o.engines
>>>>         
> Traceback (most recent call last):
>   File "<console>", line 1, in ?
> RuntimeError: No root body.
>   
>>>> p=Preprocessor()
>>>> p.generator="BoxStack"
>>>> p.generate()
>>>>         
> 110650 [3055924960] FATAL yade.FileGenerator  - core/FileGenerator.cpp:71 generateAndSave: Unhandled exception: St13runtime_error : Class `InteractingSphere2InteractingSphere4ClosestFeatures' could not be cast to required 2D EngineUnit
> SIGSEGV/SIGABRT handler called; gdb batch file is `/home/janek/.yade-svn1246-moment_law2/gdb_crash_batch-pid22642'
> GNU gdb 6.4.90-debian
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i486-linux-gnu".
> Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
> [Thread debugging using libthread_db enabled]
> [New Thread -1239042336 (LWP 22642)]
> 0xffffe410 in __kernel_vsyscall ()
> No symbol "info" in current context.
>
> Thread 1 (Thread -1239042336 (LWP 22642)):
> #0  0xffffe410 in __kernel_vsyscall ()
> #1  0xb71a72f3 in waitpid () from /lib/tls/i686/cmov/libc.so.6
> #2  0xb714f669 in strtold_l () from /lib/tls/i686/cmov/libc.so.6
> #3  0xb7df9add in system () from /lib/tls/i686/cmov/libpthread.so.0
> #4  0x08131d8d in sigHandler (sig=6) at core/yade.cpp:53
> #5  <signal handler called>
> #6  0xffffe410 in __kernel_vsyscall ()
> #7  0xb7142811 in raise () from /lib/tls/i686/cmov/libc.so.6
> #8  0xb7143fb9 in abort () from /lib/tls/i686/cmov/libc.so.6
> #9  0x080d54c0 in FileGenerator::generateAndSave (this=0x82465e0) at core/FileGenerator.cpp:72
> #10 0xb25155ba in pyPreprocessor::generate (this=0x82423f8) at gui/cmd/yadeControl.cpp:255
> #11 0xb25056c6 in boost::python::detail::invoke<boost::python::to_python_value<bool const&>, bool (pyPreprocessor::*)(), boost::python::arg_from_python<pyPreprocessor&> > (rc=@0xbfbf082a, f=@0x824278c, tc=@0xbfbf0820) at /usr/include/boost/python/detail/invoke.hpp:88
> #12 0xb25057af in boost::python::detail::caller_arity<1u>::impl<bool (pyPreprocessor::*)(), boost::python::default_call_policies, boost::mpl::vector2<bool, pyPreprocessor&> >::operator() (this=0x824278c, args_=0xb61e786c) at /usr/include/boost/python/detail/caller.hpp:199
> #13 0xb250580a in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<bool (pyPreprocessor::*)(), boost::python::default_call_policies, boost::mpl::vector2<bool, pyPreprocessor&> > >::operator() (this=0x8242788, args=0xb61e786c, kw=0x0)
>     at /usr/include/boost/python/object/py_function.hpp:38
> #14 0xb7408f56 in boost::python::objects::function::call () from /usr/lib/libboost_python-gcc41-mt-1_34_1.so.1.34.1
> #15 0xb740af37 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke ()
>    from /usr/lib/libboost_python-gcc41-mt-1_34_1.so.1.34.1
> #16 0xb7da602a in boost::function0<void, std::allocator<boost::function_base> >::operator() () from /usr/lib/libboost_thread-gcc41-mt-1_34_1.so.1.34.1
> #17 0xb74102eb in boost::python::handle_exception_impl () from /usr/lib/libboost_python-gcc41-mt-1_34_1.so.1.34.1
> #18 0xb740a45e in boost::python::handle_exception<boost::python::objects::(anonymous namespace)::bind_return> ()
>    from /usr/lib/libboost_python-gcc41-mt-1_34_1.so.1.34.1
> #19 0xb7406f9a in boost::python::objects::function::add_overload () from /usr/lib/libboost_python-gcc41-mt-1_34_1.so.1.34.1
> ---Type <return> to continue, or q <return> to quit---
> #20 0xb7e20237 in PyObject_Call () from /usr/lib/libpython2.4.so.1.0
> #21 0xb7e87fa1 in PyEval_EvalFrame () from /usr/lib/libpython2.4.so.1.0
> #22 0xb7e8b77a in PyEval_EvalCodeEx () from /usr/lib/libpython2.4.so.1.0
> #23 0xb7e8b7e5 in PyEval_EvalCode () from /usr/lib/libpython2.4.so.1.0
> #24 0xb7eafeed in PyRun_InteractiveOneFlags () from /usr/lib/libpython2.4.so.1.0
> #25 0xb7eb0023 in PyRun_InteractiveLoopFlags () from /usr/lib/libpython2.4.so.1.0
> #26 0xb7eb00fa in PyRun_InteractiveLoop () from /usr/lib/libpython2.4.so.1.0
> #27 0xb4c877e3 in cmdGui::run (this=0x81fe4b8, argc=1, argv=0xbfbf11fc) at gui/cmd/cmdGui.cpp:85
> #28 0x081317d1 in main (argc=1, argv=0xbfbf11fc) at core/yade.cpp:242
> #0  0xffffe410 in __kernel_vsyscall ()
> (gdb)
> (gdb) q
> The program is running.  Quit anyway (and detach it)? (y or n) y
>
>
>
>
> But I think I made it work with >>> p.generator="SDECSpheresPlane"
> The simulation was running, only things that didn't work was:
>
>   
>>>> v=View()
>>>>         
>
> Opened a view, but with unrefreshable remnants of QTFileGenerator
> inside (the same that we see in QtGUI). Maybe it was simply in that
> part of memory, not something that current session created. And lots
> of errors:
>
> QGLContext::makeCurrent(): Failed.
>
> I remember this error. We had it, and yade was frequently crashing.
> Olivier's laptop was hanging sometimes. And later I've found some
> solution for that and it works cleanly now. I forgot what it was....
> gotta look into SVN history for that.
>
> I remember you talking something about pyView() so I tried:
>
>   
>>>> v=pyView()
>>>>         
> Traceback (most recent call last):
>   File "<console>", line 1, in ?
> NameError: name 'pyView' is not defined
>
> But nothing,
>
> And finally - crash at exit:
>
>
>
>   
>>>> QGLContext::makeCurrent(): Failed.
>>>>         
> sys.exit(0)
> SIGSEGV/SIGABRT handler called; gdb batch file is `/home/janek/.yade-svn1246-moment_law2/gdb_crash_batch-pid24230'
> janek@szpak:~/20-Programowanie/10-cpp/50-Yade/Bin/moment_law2/bin$ GNU gdb 6.4.90-debian
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i486-linux-gnu".
> /home/janek/.yade-svn1246-moment_law2/gdb_crash_batch-pid24230:1: Error in sourced command file:
> ptrace: No such process.
> (gdb) q
> zsh: command not found: q
>
>
> Looks like gdb tried to start, but failed: ptrace: No such process. I
> hope that you can distinguish copy/pastes from my comments ;-)
>
>
>   

_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



References