Author |
Message |
Hawkaloogie Newbie
Joined: Jan 11 2003 Posts: 13 Offline
|
Posted: Mon Apr 06, 2009 1:19 am Post subject: Help: Crashed server after sending http request to twitter |
|
|
|
|
I have a "?twitter <text>" command that sends a status update to twitter. Every time I use it, I crash the server.
This is not the only thing I have using twitter, and the other thing works fine.
I've attached the code for twittercmd.py (not working), twitterpop.py (working), and the backtrace.
1) Is there any way to get a more useful backtrace? Get a python and ASSS with debugging symbols or something?
2) Is there anything I'm doing wrong? Why does twitterpop work and twittercmd not work?
SEGV backtrace after sending "?twitter Please don't crash on me"
segv-24544.txt - 7.87 KB
File downloaded or viewed 26 time(s)
twitterpop.py - Send tweets when arena reaches certain populations
twitterpop.py - 1.78 KB
File downloaded or viewed 25 time(s)
twittercmd.py - Send tweets when commanded
twittercmd.py - 0.84 KB
File downloaded or viewed 23 time(s)
|
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:24 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Mon Apr 06, 2009 4:11 am Post subject: |
|
|
|
|
You're going to have a hard time trying to get other people to debug your code. Litter some print statements throughout your code to figure out what line it's crashing on, and work from there. _________________ SubSpace Discretion: A Third Generation SubSpace Client
|
|
Back to top |
|
|
Hawkaloogie Newbie
Joined: Jan 11 2003 Posts: 13 Offline
|
Posted: Mon Apr 06, 2009 10:52 am Post subject: |
|
|
|
|
Yeah, I figured. Hence the most important question is how do I make that backtrace useful? Perhaps a good resource on general C/Python debugging?
|
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:24 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Mon Apr 06, 2009 11:34 am Post subject: |
|
|
|
|
what's wrong with the print-statement-littering method?
|
|
Back to top |
|
|
Hawkaloogie Newbie
Joined: Jan 11 2003 Posts: 13 Offline
|
Posted: Mon Apr 06, 2009 11:36 am Post subject: |
|
|
|
|
Sometimes the command crashes before sending the twitter request, sometimes after.
But then, I haven't tried it, so may as well try it before I discount it.
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon Apr 06, 2009 12:07 pm Post subject: |
|
|
|
|
You've clearly got asss compiled with debugging symbols already. Python, however, will never show up in a backtrace, since it's interpreted. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me
|
|
Back to top |
|
|
D1st0rt Miss Directed Wannabe
Age:36 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Mon Apr 06, 2009 3:13 pm Post subject: |
|
|
|
|
If it was an exception in python code, it would give you a red "Error in command handler" message. Because the call stack never gets out of the PyObject_Call, this would indicate to me that it's crashing somewhere in one of Python's C extensions. Looking higher up the trace, it's apparently having issues creating a new socket object, though I don't know why that would be. Especially if it's working in your playeraction callback. _________________
|
|
Back to top |
|
|
|