Re: Segmentation fault only on Iinux

2006-06-21 Thread Kiran
Unfortunately (i guess), I am not doing any XML.  However, I am taking
the previous suggestion of putting print lines in every other line of
my code and then seeing where it crashes.  Hopefully, that will solve
the problem.

thanks for the suggestions everybody
-- Kiran

Frank Millman wrote:
 Kiran wrote:
  Hello All,
In my program, I have a main thread which is the GUI (wxPython) and
  then a thread which goes and reads data from a socket.  The reason this
  is in a different thread is because the data might take some time to
  come back, and I want to have the GUI to be responsive during this
  wait.
 
   When I run my program in Linux,   a segmentation fault occurs.  When I
  run it in Windows XP, it works just fine.
 

 Are you doing any xml processing? If so, it may be the same problem as
 described in this recent post -
 
 http://tinyurl.com/l3nr7
 
 Frank Millman

-- 
http://mail.python.org/mailman/listinfo/python-list


Segmentation fault only on Iinux

2006-06-20 Thread Kiran
Hello All,
  In my program, I have a main thread which is the GUI (wxPython) and
then a thread which goes and reads data from a socket.  The reason this
is in a different thread is because the data might take some time to
come back, and I want to have the GUI to be responsive during this
wait.

 When I run my program in Linux,   a segmentation fault occurs.  When I
run it in Windows XP, it works just fine.

The main thing that would be of interest is as follows:
  The segmentation fault does NOT occur if I disable the threads and
read the data all in 1 thread (the main thread [gui's]).  This leads me
to believe it is some sort of threading problem related to linux.
However, I personally dont think that it can be something wrong with my
code, since my program runs perfectly fine in WindowsXP.  I am also
carefully protecting data that my threads share with the MainGUI using
a Queue and also a semaphore lock.

I know this is kind of hard to answer without any code, but would
anybody know of some kind of issue such as this where there is some
threading problems with Linux and not Windows.  I am happy to send the
code to anybody who wishes to see it.  I havent posted it here because
it is kind of lengthy.

Also, I should note that I think we are running Linux Kernel 2.4

thanks a lot for your help,
Kiran

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Segmentation fault only on Iinux

2006-06-20 Thread faulkner
if you don't know exactly which line of code causes the segfault, use
print statements to determine that. then try to either
redesign/refactor so that line isn't necessary, or protect its
operation somehow.
if you do know, tell us what it is and we might not need to see all
your code.

Kiran wrote:
 Hello All,
   In my program, I have a main thread which is the GUI (wxPython) and
 then a thread which goes and reads data from a socket.  The reason this
 is in a different thread is because the data might take some time to
 come back, and I want to have the GUI to be responsive during this
 wait.

  When I run my program in Linux,   a segmentation fault occurs.  When I
 run it in Windows XP, it works just fine.

 The main thing that would be of interest is as follows:
   The segmentation fault does NOT occur if I disable the threads and
 read the data all in 1 thread (the main thread [gui's]).  This leads me
 to believe it is some sort of threading problem related to linux.
 However, I personally dont think that it can be something wrong with my
 code, since my program runs perfectly fine in WindowsXP.  I am also
 carefully protecting data that my threads share with the MainGUI using
 a Queue and also a semaphore lock.

 I know this is kind of hard to answer without any code, but would
 anybody know of some kind of issue such as this where there is some
 threading problems with Linux and not Windows.  I am happy to send the
 code to anybody who wishes to see it.  I havent posted it here because
 it is kind of lengthy.

 Also, I should note that I think we are running Linux Kernel 2.4
 
 thanks a lot for your help,
 Kiran

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Segmentation fault only on Iinux

2006-06-20 Thread Frank Millman

Kiran wrote:
 Hello All,
   In my program, I have a main thread which is the GUI (wxPython) and
 then a thread which goes and reads data from a socket.  The reason this
 is in a different thread is because the data might take some time to
 come back, and I want to have the GUI to be responsive during this
 wait.

  When I run my program in Linux,   a segmentation fault occurs.  When I
 run it in Windows XP, it works just fine.


Are you doing any xml processing? If so, it may be the same problem as
described in this recent post -

http://tinyurl.com/l3nr7

Frank Millman

-- 
http://mail.python.org/mailman/listinfo/python-list