Hi Pyrex list!<br>
I wounder if I could ask your collective advice?<br>
I have used Pyrex (fantastic tool!) to provide an interface to the
shared library in python and it works fine when I call a single high
level function that calls sub functions that call shared library
function etc.<br>
Now I have altered the Pyrex interface to call the sub functions directly and I get segmentation errors!<br>
I believe this is not related to Pyrex but I am baffled as to what is going on .....<br>
I have traced the fault using ddd and I can't quite believe what I am seeing...<br>
<br>
The problem is in a const void pointer that is passed in a function
call to a number of functions as a pointer to a structure member.<br>
e.g "const void pContent" that is used as
"pContent->fred" . (I should mention pContent is cast to the
structure type)<br>
It works fine for 26 calls to the function e.g xltEncPcdata (
....... const void pContent, ......) in that the pContent value is say
0x801934.<br>
Then on the 27th call to the same function it has the value say
0x801934 but as soon as the first "{" is passed , e.g as it
enteres the function body without executing any line, pContent changes
to say 0x19 !!!!<br>
Of course when say pContent->fred is accessed, up pops the segmentation error.<br>
I have chnged to a newer version of gcc but I get the same results.<br>
Also sometimes, it will just error without the seg error. e.g return codes indicate an error.<br>
<br>
Could anyone offer any advice as to what is going on?<br>
Is this the python stack runnning out of space? or a memory leak?<br>
I have coded C etc in the past but the python bits are new to me... <br>
Any advice would be greatly appreciated...<br>
<br>
Regards<br>
<br>
Anthony Percy<br>