Server Help

ASSS Questions - Help: Crashed server after sending http request to twitter

Hawkaloogie - 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?
Bak - 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.
Hawkaloogie - 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?
Bak - Mon Apr 06, 2009 11:34 am
Post subject:
what's wrong with the print-statement-littering method?
Hawkaloogie - 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.
Dr Brain - 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.
D1st0rt - 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.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group