Re: [cgkit-user] cgkit on Ubuntu 8.10
Brought to you by:
mbaas
|
From: Matthias B. <mat...@gm...> - 2009-03-05 23:46:23
|
Karel Skoupy wrote: > I wanted to try to compile against boost-1.31 but that version requires > python-2.2 for compilation. I didn't find anything about the supported > versions of python in the docs, is it possible that you are using > python-2.2? Oops, no, sorry. The version information in the docs is just what I was using at that time. Meanwhile I have upgraded and depending on the system, I'm using Boost from v1.33 (or so) to v1.36 with Python 2.5 and all of them have worked fine so far. So you don't need to downgrade your version of Boost. > That import of cgkit.all fails at the module joystick That's odd. Could you track down which part in the joystick module failed? Does it always crash at the same location? > but when I try to import only that module it doesn't fail. That module is a pure Python module. It does import some other modules (also pure Python) but there's not much that happens here. It doesn't use any of the C++ stuff. Some of the modules in __init__.py do trigger a little bit of C++ code when they are imported (for example, the scene module) but as far as I can tell there is nothing critical in there. > This Segmentation fault > typically happens when freeing some memory twice or when accessing freed > memory in general. So the error won't be bound to a partcular module, it > will rather happen after certain number of wrong freeing, i.e. when it > reaches a memory with wrong access. I noticed that you are using > shared_ptr<> from boost, that's used exactly for preventing such errors. > Perhaps it's still missing somewhere. Maybe that the implementation of > boost has changed between the versions but maybe it depends on some > other factors. Did you get a stack trace? (do you know how to run gdb?) At the moment, I have no idea what the cause of this problem could be and as long as I can't reproduce it, there's little I can do. If the segfault is always reproducible, we need to find out where or when it actually happens. How much can you reduce the imports before the segfault goes away? What happens if you don't import the joystick module? I suppose the crash doesn't go away then. Where does it happen instead? > I was very happy to find cgkit because it seems like exactly the tool I > need, I don't want anything interactive. I would even try to use > RenderMan directly but I have no experience and cgkit seems to be a good > starting point for me because of the reasonable documentation. Thanks! :) > I also tried to install cgkit on MacOSX, I had to install first the > python-2.5 (the official mac installer from the python official site), > the installation went fine but when I want to use it, I have problems > with imports: > > $ viewer.py sphere.py > Traceback (most recent call last): > File "/usr/local/bin/viewer.py", line 56, in <module> > import pygame > > $ python > Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) > [...] > ImportError: No module named protocols > > It looks like it my help to install some extra modules. Yep, pygame and PyProtocols (as you might have guessed already). :) Here is a full list of the external dependencies: http://cgkit.sourceforge.net/doc2/externaldeps.html (you don't necessarily need all of them) When you install PyProtocols, make sure to use the --without-speedups (or something like that) option. There seems to be a bug in the C part of PyProtocols that sometimes causes exceptions. Sooner or later I actually want to get rid of the dependency on PyProtocols but I'm afraid that will take a while. So do you also get the crash on OSX? Cheers, - Matthias - |