Summary: | crash when deleting text | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Laco Gubik <lacogubik> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Slackware | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Laco Gubik
2006-04-21 01:13:42 UTC
Kate issue Can you reproduce the crash? Does it happen with any file, or just some particular file? If it's just one file, please attach the file. No I cant reproduce crash, It happened just once up now. It was was with this file (a was deleting lines about line 52): #server program from socket import * #Constants port = 8888 host = "localhost" msg_welcome = "Welcome on chat server " msg_connectError = "Error in comunication occured" term = "CLOSE" #Functions #Gets client name and response with welcome message def open(): name = receivedData[4:] data = msg_welcome + name + term newSocket.send(data) #adds name+address into list <------ TODO newSocket.close() return def msg(): msg_data = receivedData[3:] data = msg_data + term #sends to everybody <------- TODO newSocket.send(data) newSocket.close() def quit(): data = receivedData + term newSocket.send(data) newSocket.close() print "Disconnected from", address #Create an INET, STREAMing socket and bind the socket to port, and hostname serversocket = socket(AF_INET, SOCK_STREAM) serversocket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) serversocket.bind((host, port)) #Prints hostname <--- TODO #name = socket.gethostname() print "Hostname: "#, name #set the number of clients waiting for conection serversocket.listen(5) try: while 1: #accept connections from outside (newSocket, address) = serversocket.accept() print "Connected from", address receivedData = newSocket.recv(1024) if receivedData[:4] == "OPEN": open() elif receivedData[:3] == "MSG": msg() elif receivedData[:4] == "QUIT": quit() else: newSocket.send(msg_connectError) finally: serversocket.close() #now do something with the client socket, threaded server #ct = client_thread(cliensocket) #ct.run() |