Re: Segmentation Fault on exit

2011-08-10 Thread ron
On Aug 6, 6:35 am, Vipul Raheja wrote: > Hi, > > I have wrapped a library from C++ to Python using SWIG. But when I > import it in Python, I am able to work fine with it, but it gives a > segmentation fault while exiting. Following is the log: > > vipul@vipul-laptop:~/ossim-svn/src/pyossim/swig$ p

Re: [Swig-user] Segmentation Fault on exit

2011-08-09 Thread Stefan Zager
On Sat, Aug 6, 2011 at 3:35 AM, Vipul Raheja wrote: > Hi, > > I have wrapped a library from C++ to Python using SWIG. But when I > import it in Python, I am able to work fine with it, but it gives a > segmentation fault while exiting. Following is the log: > > vipul@vipul-laptop:~/ossim-svn/src/py

Re: Segmentation Fault on exit

2011-08-08 Thread Ulrich Eckhardt
Vipul Raheja wrote: > I have wrapped a library from C++ to Python using SWIG. But when I > import it in Python, I am able to work fine with it, but it gives a > segmentation fault while exiting. 1. Use a debugger Run python with "gdb python", import the module and exit. The debugger should then s

Re: Segmentation Fault on exit

2011-08-06 Thread Chris Angelico
On Sat, Aug 6, 2011 at 2:34 PM, Vipul Raheja wrote: > Here's the link: www.geofemengineering.it/data/master_wrap.cxx > Thanks and Regards, > Vipul Raheja Ugh. Unfortunately that file is somewhat lengthy... I hate to say "tl;dr" to people, but... is there any way to simplify that down? Perhaps th

Re: Segmentation Fault on exit

2011-08-06 Thread Dan Stromberg
I have little reason to doubt that it's related to referencing counting, but: http://stromberg.dnsalias.org/~dstromberg/checking-early.html On Sat, Aug 6, 2011 at 3:35 AM, Vipul Raheja wrote: > Hi, > > I have wrapped a library from C++ to Python using SWIG. But when I > import it in Python, I a

Re: Segmentation Fault on exit

2011-08-06 Thread Vipul Raheja
Hi, I did look out for the problem's solution but have been struggling with it ever since. I also asked around on IRC too but haven't quite progressed towards the solution. Here is the link to the swig-generated .cxx file which we need to look into for the answers. Could you please have a look at

Re: Segmentation Fault on exit

2011-08-06 Thread Chris Angelico
On Sat, Aug 6, 2011 at 12:16 PM, Vipul Raheja wrote: > Hi Chris, > Thanks for the reply. > However, the error occurs even if I don't do anything, that is, even if I > simply import the library and exit() after that. > I created a file a.py whose contents were the following: > import pyossim > exit

Re: Segmentation Fault on exit

2011-08-06 Thread Vipul Raheja
Hi Chris, Thanks for the reply. However, the error occurs even if I don't do anything, that is, even if I simply import the library and exit() after that. I created a file a.py whose contents were the following: import pyossim exit() Upon execution, the log was as follows: vipul@vipul-laptop:

Re: Segmentation Fault on exit

2011-08-06 Thread Chris Angelico
On Sat, Aug 6, 2011 at 11:35 AM, Vipul Raheja wrote: > Hi, > > I have wrapped a library from C++ to Python using SWIG. But when I > import it in Python, I am able to work fine with it, but it gives a > segmentation fault while exiting. Following is the log: The most likely cause of this is that y

Segmentation Fault on exit

2011-08-06 Thread Vipul Raheja
Hi, I have wrapped a library from C++ to Python using SWIG. But when I import it in Python, I am able to work fine with it, but it gives a segmentation fault while exiting. Following is the log: vipul@vipul-laptop:~/ossim-svn/src/pyossim/swig$ python Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:3