[Tutor] Bus Error - Core Dumped
D-Man
dsh8290@rit.edu
Mon, 16 Jul 2001 12:14:23 -0400
On Mon, Jul 16, 2001 at 11:58:09AM +0530, Praveen Pathiyil wrote:
| Hi,
|
| I am using python 1.5.2 and running a Tkinter GUI and some python
| code for processing. I am getting a Bus Error (Core Dumped).
Ooohh, fun. You're not supposed to get Bus Errors, etc, with python.
Can you try with a newer interpreter? This error probably means that
there is/was a bug in python.
| Can somebody (may be someone who has worked on UNIX platforms) give
| me an idea, what could be the reason for such a system critical
| error condition ?
If you were writing, say, C or C++ code it would mean that you did
something wrong either with your memory management or with pointer
arithmatic. You don't manage memory in Python and you don't have
pointers so you aren't supposed to see things like that.
It is also conceivable that there is a bug in Tcl that causes the
problem (python embeds the Tcl interpreter to give access to the Tk
gui).
Are you using threads? If so, do they synchronize properly? Do you
have a signal handler for SIGINT (the signal sent when ^C is pressed)?
Did you write the server? (you said the server gave the bus error
when the client was aborted, right?) Maybe there is a problem with the
server trying to read a socket that has been closed (I haven't done
network programming yet so I am fuzzy on the details)? I would have
expected python to give you an exception in such a situation, but who
knows. Can you add a bunch of prints in the server's socket handling
code to see what the last thing that gets executed is? Also print
some of the current state as well.
HTH,
-D