#29 Error handling issues

OpenRPG1
closed-accepted
Todd Faris
Server (5)
7
2006-03-13
2005-04-13
Brandan Yares
No

This is based off of mplay_server.py version 1.80.
I've been having a number of black-hole like conditions
while running my server and the following changes have
helped that.

Most of them are similar:

700: except socket.error, e:
701: self.log_msg("Socket Error: recvData():
"+ e )
702: data = ""

to

700: except socket.error, e:
701: self.log_msg("Socket Error: recvData():
"+ str(e) )
702: data = ""

I'm just going to list the remaining

----

730: except Exception, e:
731: self.log_msg( "Exception: recvMsg(): "+e )

----

1751: except Exception, e:
1752: self.log_msg( "Exception:
create_group(): "+ e)

----

2115: except Exception, e:
2116: traceback.print_exc()
2117: self.log_msg("Exception:
send_to_all(): "+e)

(and likewise with the next three...)

----

2192: except Exception, e:
2193: self.log_msg("Exception:
check_group_members(): "+e)

----

2317: except Exception, e:
2318: self.log_msg("Exception: Remote Admin
Handler Error: "+ e)
2319: traceback.print_exc()

----

Another error I got was, somehow, data got accessed
before it was initialized in AcceptedNewConnectionThread.

1218: # Initialize xml_dom
1219: xml_dom = None

And so I added
1220: data = None

Which fixed a lot of my uptime problems on its own.

Discussion

  • Todd Faris
    Todd Faris
    2005-04-15

    • priority: 5 --> 7
    • assigned_to: nobody --> snowdog_
     
  • Todd Faris
    Todd Faris
    2005-04-16

    Logged In: YES
    user_id=670456

    Though the str(e) shouldn't make a difference I can see no
    harm in using an explicit cast. Changes have been
    incorporated into mplay_server.py v 1.81 --SD

     
  • Todd Faris
    Todd Faris
    2005-04-16

    • status: open --> closed-accepted
     
  • Brandan Yares
    Brandan Yares
    2005-04-16

    Logged In: YES
    user_id=963754

    For some reason it likes to bomb on line 731 which if I
    recall correctly is what leads to the 'data not defined'
    error (which is what I fixed with 1220). I didn't get the
    latter until I fixed the former, and haven't hung since.

     
  • Todd Faris
    Todd Faris
    2006-03-13

    • milestone: --> OpenRPG1