Re: [cgkit-user] segfault help?
Brought to you by:
mbaas
|
From: Matthias B. <mat...@gm...> - 2012-03-27 19:30:53
|
Hi Alejandro,
On 26.03.12 12:01, Alejandro Aguilera Martínez wrote:
> I've just discovered that evolution sends the email you are writing if
> you hit ctrl+enter... well, here is the full answer.
That's quite a "dangerous" key combination... ;)
>> What do you mean they have a different version? From what I can see,
>> both libs pick up the same versions, don't they? For example, both pick
>> up libstdc++ from /usr/lib/libstdc++.so.6
>> So that looks ok to me.
>
> I thought the hex numbers were the version numbers, as I told you, is
> the first time I use ldd.
Ah, no, the version numbers are in the file name itself and the
important thing is to see the full path of the lib. I think those hex
numbers are the virtual address where the lib gets mapped to or
something like that. I would say you can pretty much always ignore those
hex numbers.
> Searching for libboost and libstd in all log gives me the next in order
> results:
>
> 27158: find library=libboost_python-py26.so.1.40.0 [0]; searching
> 27158: search cache=/etc/ld.so.cache
> 27158: trying file=/usr/lib/libboost_python-py26.so.1.40.0
> [...]
> 27158: find library=libstdc++.so.6 [0]; searching
> 27158: search cache=/etc/ld.so.cache
> 27158: trying file=/usr/lib/libstdc++.so.6
> [...]
> 27158: calling init: /usr/lib/libstdc++.so.6
> [...]
> 27158: calling init: /usr/lib/libboost_python-py26.so.1.40.0
That looks all good.
>>>>> from cgkit.cgtypes import *
>>>>> vec3(0).normalize()
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> ZeroDivisionError: vec3.normalize(): divide by zero
>> ...]
> As you predicted both tests gives segmentation fault in my machine.
Let's check an exception from another file. I suppose the following
lines also produce a segfault, right?
>>> from cgkit._core import mat3
>>> mat3()[4]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: index out of range
What about this one:
>>> from cgkit._core import pnoise
>>> pnoise(0,0,0,0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: period must not be zero
It would be interesting to see if that one succeeds. The difference is
that the exceptions from vec3 and mat3 are thrown from a header file (as
these are template classes) whereas the pnoise function throws the
exception from a cpp file, so it's compiled at a different time than the
vec3 and mat3 class.
Now can you also run the following snippet to check with what flags
extension modules will get build:
>>> from distutils.sysconfig import get_config_vars
>>> get_config_vars("OPT")
['-DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC']
>>> get_config_vars("CFLAGS")
['-fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC']
>>> get_config_vars("LDFLAGS")
['']
>>> get_config_vars("LINKFORSHARED")
['-Xlinker -export-dynamic']
I think only the first one (OPT) is relevant, but while you are at it
you could check the other ones, too. I'm hoping that in your case the
"-fexceptions" option is missing as this might then explain what's going on.
- Matthias -
|