943,733 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 2008
  • Python RSS
Mar 15th, 2007
0

python c interface problems

Expand Post »
I recently made a python module which calls functions from a c program. I used SWIG to generate the wrapper code from an interface file, and compiled the module into a dll which i can import in python and call functions from. While some of the functions are working fine, the others are giving serious errors like:

Python 2.4.3 (#1, May 18 2006, 07:40:45)
[GCC 3.3.3 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import agent
>>> agent.dummy_foo()
agent::dummy_foo called!!
x val is: 25
0
>>> agent.get_agent_property(40,12,"agentclass")
you are in get_agent_property:
40 [main] python 5216 _cygtls::handle_exceptions: Error while dumping state
(probably corrupted stack)
Segmentation fault (core dumped)


As shown above, i have no problem calling a dummy function, but when i call the other function, i get the "corrupted stack" and "segmentation fault" errors. I am running these on Cygwin.

Could anyone help me out with this?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
saintlysav is offline Offline
3 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Storing a Template String?
Next Thread in Python Forum Timeline: Function for assigning variables





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC