473,756 Members | 6,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need help with bizarre error caught in debugger. execution is hanging

Any advice on the following would be much appreciated. I have thrown
everything I have at it and am completely stumped. I apologize for the
length, I have tried to be as succint as possible.

I have a pythoncard/wxPython application. The application works well
except that users were reporting occasional crashes. The application
would simply stop and just hang. I was able to reproduce the bug
faithfully and ran the application in the python debugger pdb.py.
The trace is below and I simply cannot understand why it is hanging
where it is. The application gets stuck executing

return len(self.data[0])

This works many many times during the applications execution, indeed
several successful runs of this line are visible immediatley above the
hang. I have also printed out the value of self.data. This is a list
containing 12 inner lists each of length 3 at the point of the hang and
is never larger than that.
What on earth could cause this to stop the interpreter cold in its
tracks without an exception being thrown? CPU usage on the machine is
high throughout the application's execution and stays as such after the
"hang" begins. I eventually kill the app although I have let it run for
a long time and it never leaves this line.
For what its worth, I am using python 2.3 on windows2k.

Anyone have idea what could be happening?

c:\python23\lib \site-packages\wxpyth on\grid.py(664) _setOORInfo()->None
-> return val
(Pdb) s
--Return--
c:\python23\lib \site-packages\wxpyth on\grid.py(850) __init__()->None
-> self._setOORInf o(self)
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(17)__init

__()
-> self.data = data
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init

__()
-> self.colLabels = headings
(Pdb) s
--Return--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init

__()->None
-> self.colLabels = headings
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(15)__

init__()
-> self.colsizes = colsizes
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(16)__

init__()
-> self.SetTable(t able, True)
(Pdb) s
--Call--
c:\python23\lib \site-packages\wxpyth on\grid.py(993) SetTable()
-> def SetTable(self, *_args, **_kwargs):
(Pdb) s
c:\python23\lib \site-packages\wxpyth on\grid.py(994) SetTable()

-> val = gridc.wxGrid_Se tTable(self, *_args, **_kwargs)
(Pdb) s
--Call--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(27)GetNum berRows()
-> def GetNumberRows(s elf):
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum berRows()
-> return len(self.data)
(Pdb) s
--Return--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum berRows()->12
-> return len(self.data)
(Pdb) s
--Call--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(30)GetNum berCols()
-> def GetNumberCols(s elf):
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(31)GetNum berCols()
-> if len(self.data) <= 0:
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum berCols()
-> return len(self.data[0])
(Pdb) s
--Return--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum berCols()->3
-> return len(self.data[0])
(Pdb) s

Jul 18 '05 #1
3 1496
Why do you do

if len(self.data) <= 0:
return len(self.data[0])

Isn't that a sure IndexError exception?
Maybe you catch it somewhere up the stack and so you keep it silent.

Nir

"omission9" <om*******@inva lid.email.info> wrote in message
news:vf******** ***********@nwr ddc01.gnilink.n et...
Any advice on the following would be much appreciated. I have thrown
everything I have at it and am completely stumped. I apologize for the
length, I have tried to be as succint as possible.

I have a pythoncard/wxPython application. The application works well
except that users were reporting occasional crashes. The application
would simply stop and just hang. I was able to reproduce the bug
faithfully and ran the application in the python debugger pdb.py.
The trace is below and I simply cannot understand why it is hanging
where it is. The application gets stuck executing

return len(self.data[0])

This works many many times during the applications execution, indeed
several successful runs of this line are visible immediatley above the
hang. I have also printed out the value of self.data. This is a list
containing 12 inner lists each of length 3 at the point of the hang and
is never larger than that.
What on earth could cause this to stop the interpreter cold in its
tracks without an exception being thrown? CPU usage on the machine is
high throughout the application's execution and stays as such after the
"hang" begins. I eventually kill the app although I have let it run for
a long time and it never leaves this line.
For what its worth, I am using python 2.3 on windows2k.

Anyone have idea what could be happening?

c:\python23\lib \site-packages\wxpyth on\grid.py(664) _setOORInfo()->None
-> return val
(Pdb) s
--Return--
c:\python23\lib \site-packages\wxpyth on\grid.py(850) __init__()->None
-> self._setOORInf o(self)
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(17)__init
__()
-> self.data = data
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init
__()
-> self.colLabels = headings
(Pdb) s
--Return--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init
__()->None
-> self.colLabels = headings
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(15)__
init__()
-> self.colsizes = colsizes
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(16)__
init__()
-> self.SetTable(t able, True)
(Pdb) s
--Call--
c:\python23\lib \site-packages\wxpyth on\grid.py(993) SetTable()
-> def SetTable(self, *_args, **_kwargs):
(Pdb) s
> c:\python23\lib \site-packages\wxpyth on\grid.py(994) SetTable() -> val = gridc.wxGrid_Se tTable(self, *_args, **_kwargs)
(Pdb) s
--Call--

c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(27)GetNum b
erRows() -> def GetNumberRows(s elf):
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum b
erRows() -> return len(self.data)
(Pdb) s
--Return--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum b
erRows()->12 -> return len(self.data)
(Pdb) s
--Call--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(30)GetNum b
erCols() -> def GetNumberCols(s elf):
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(31)GetNum b
erCols() -> if len(self.data) <= 0:
(Pdb) s
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum b
erCols() -> return len(self.data[0])
(Pdb) s
--Return--
c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum b
erCols()->3 -> return len(self.data[0])
(Pdb) s

Jul 18 '05 #2
Ziaran wrote:
Why do you do

if len(self.data) <= 0:
return len(self.data[0])

Isn't that a sure IndexError exception?
Maybe you catch it somewhere up the stack and so you keep it silent.

That if statement just happens to be the last line before the return.
What you have stated is not what actually happens.
The actual code is
if len(self.data) <= 0:
return 0
else:
return len(self.data[0])
I guess the "else" line doesn't appear in the stack trace for whatever
reason.
There is no doubt, however, that it is hanging on the line
return len(self.data[0])

"omission9" <om*******@inva lid.email.info> wrote in message
news:vf******** ***********@nwr ddc01.gnilink.n et...
Any advice on the following would be much appreciated. I have thrown
everything I have at it and am completely stumped. I apologize for the
length, I have tried to be as succint as possible.

I have a pythoncard/wxPython application. The application works well
except that users were reporting occasional crashes. The application
would simply stop and just hang. I was able to reproduce the bug
faithfully and ran the application in the python debugger pdb.py.
The trace is below and I simply cannot understand why it is hanging
where it is. The application gets stuck executing

return len(self.data[0])

This works many many times during the applications execution, indeed
several successful runs of this line are visible immediatley above the
hang. I have also printed out the value of self.data. This is a list
containing 12 inner lists each of length 3 at the point of the hang and
is never larger than that.
What on earth could cause this to stop the interpreter cold in its
tracks without an exception being thrown? CPU usage on the machine is
high throughout the application's execution and stays as such after the
"hang" begins. I eventually kill the app although I have let it run for
a long time and it never leaves this line.
For what its worth, I am using python 2.3 on windows2k.

Anyone have idea what could be happening?

c:\python23\lib \site-packages\wxpyth on\grid.py(664) _setOORInfo()->None
-> return val
(Pdb) s
--Return--
c:\python23\lib \site-packages\wxpyth on\grid.py(850) __init__()->None
-> self._setOORInf o(self)
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(17)__init
__()
-> self.data = data
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init
__()
-> self.colLabels = headings
(Pdb) s
--Return--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init
__()->None
-> self.colLabels = headings
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(15)__
init__()
-> self.colsizes = colsizes
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(16)__
init__()
-> self.SetTable(t able, True)
(Pdb) s
--Call--
c:\python23\lib \site-packages\wxpyth on\grid.py(993) SetTable()
-> def SetTable(self, *_args, **_kwargs):
(Pdb) s
> c:\python23\lib \site-packages\wxpyth on\grid.py(994) SetTable()

-> val = gridc.wxGrid_Se tTable(self, *_args, **_kwargs)
(Pdb) s
--Call--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(27)GetNum b
erRows()
-> def GetNumberRows(s elf):
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum b
erRows()
-> return len(self.data)
(Pdb) s
--Return--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum b
erRows()->12
-> return len(self.data)
(Pdb) s
--Call--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(30)GetNum b
erCols()
-> def GetNumberCols(s elf):
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(31)GetNum b
erCols()
-> if len(self.data) <= 0:
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum b
erCols()
-> return len(self.data[0])
(Pdb) s
--Return--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum b
erCols()->3
-> return len(self.data[0])
(Pdb) s



Jul 18 '05 #3
I guess it is a thread synchronization progblem
In that case some other thread modifies self.data leaving it empty in the
time between the if statement expression is evalutaed and the time the
return statement is executed.

Can this be the case?
"omission9" <om*******@inva lid.email.info> wrote in message
news:2u******** ***********@nwr ddc01.gnilink.n et...
Ziaran wrote:
Why do you do

if len(self.data) <= 0:
return len(self.data[0])

Isn't that a sure IndexError exception?
Maybe you catch it somewhere up the stack and so you keep it silent.


That if statement just happens to be the last line before the return.
What you have stated is not what actually happens.
The actual code is
if len(self.data) <= 0:
return 0
else:
return len(self.data[0])
I guess the "else" line doesn't appear in the stack trace for whatever
reason.
There is no doubt, however, that it is hanging on the line
return len(self.data[0])

"omission9" <om*******@inva lid.email.info> wrote in message
news:vf******** ***********@nwr ddc01.gnilink.n et...
Any advice on the following would be much appreciated. I have thrown
everything I have at it and am completely stumped. I apologize for the
length, I have tried to be as succint as possible.

I have a pythoncard/wxPython application. The application works well
except that users were reporting occasional crashes. The application
would simply stop and just hang. I was able to reproduce the bug
faithfully and ran the application in the python debugger pdb.py.
The trace is below and I simply cannot understand why it is hanging
where it is. The application gets stuck executing

return len(self.data[0])

This works many many times during the applications execution, indeed
several successful runs of this line are visible immediatley above the
hang. I have also printed out the value of self.data. This is a list
containing 12 inner lists each of length 3 at the point of the hang and
is never larger than that.
What on earth could cause this to stop the interpreter cold in its
tracks without an exception being thrown? CPU usage on the machine is
high throughout the application's execution and stays as such after the
"hang" begins. I eventually kill the app although I have let it run for
a long time and it never leaves this line.
For what its worth, I am using python 2.3 on windows2k.

Anyone have idea what could be happening?

c:\python23\lib \site-packages\wxpyth on\grid.py(664) _setOORInfo()->None
-> return val
(Pdb) s
--Return--
c:\python23\lib \site-packages\wxpyth on\grid.py(850) __init__()->None
-> self._setOORInf o(self)
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(17)__init
__()
-> self.data = data
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init
__()
-> self.colLabels = headings
(Pdb) s
--Return--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(18)__init
__()->None
-> self.colLabels = headings
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(15)__
init__()
-> self.colsizes = colsizes
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab legrid.py(16)__
init__()
-> self.SetTable(t able, True)
(Pdb) s
--Call--
c:\python23\lib \site-packages\wxpyth on\grid.py(993) SetTable()
-> def SetTable(self, *_args, **_kwargs):
(Pdb) s
> c:\python23\lib \site-packages\wxpyth on\grid.py(994) SetTable()
-> val = gridc.wxGrid_Se tTable(self, *_args, **_kwargs)
(Pdb) s
--Call--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(27)GetNum b erRows()
-> def GetNumberRows(s elf):
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum b erRows()
-> return len(self.data)
(Pdb) s
--Return--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(28)GetNum b erRows()->12
-> return len(self.data)
(Pdb) s
--Call--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(30)GetNum b erCols()
-> def GetNumberCols(s elf):
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(31)GetNum b erCols()
-> if len(self.data) <= 0:
(Pdb) s


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum b erCols()
-> return len(self.data[0])
(Pdb) s
--Return--


c:\cygwin\home\ ar881\developme nt\bt_analysis\ console\ndbbtab le.py(34)GetNum b erCols()->3
-> return len(self.data[0])
(Pdb) s


Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4017
by: muser | last post by:
Can anyone run this program through their compiler or if they can see a logical error please point it out. I have my tutor working on it at the moment but I would rather a less ambigious response than the one I think he will provide. The test data, A:\\"514650.txt", appears at the end of the program. The problem is that the program won't read this file and the debugger as far as i know how to work it won't point out the mistake of any....
4
1615
by: Chris | last post by:
Hi, I followed the the aricle http://support.microsoft.com/default.aspx?scid=kb;en-us;321525 and was able to execute a dts package in vb.net. I replaced all the "Console.WriteLine" with "msgbox". The problem I am having is that on my form I added a listbox control and I created a sub that added entries to the list box Public Sub addListItems(ByVal sItem As String)
11
1740
by: Frances Del Rio | last post by:
this is so bizarre, and don't even know if this is right place to ask, but don't know where else: about two days I changed webhosting, changed DNS for my domain, francesdelrio.com, now when I view my site, www.francesdelrio.com from work it looks fine, just like it should (black bg, a bunch of links in green fonts sitting on a green-tone graffiti-graphic..) and all links work.. but: when I view it from home it takes me to old server!!...
4
1739
by: Aaron W. LaFramboise | last post by:
I'm seeking a solution to my C++-life long dilemma of how to deal with errors when exceptions aren't appropriate. Below I highlight two error cases, which mainly occur when trying to handle "unexpected" errors on system interfaces. I am an experienced modern C++ programmer, and I'm mainly interested in the case where the error is in a generic, reusable component where invasive control over the user is unacceptable. Case 1: An error...
10
3361
by: jeff regoord | last post by:
A user inputs a float value. The scanf() function gets the value. However, I need to create an error handler with an if else statement saying invalid input if the input is not a number. Does anybody know how I could do this?
10
1460
by: RepStat | last post by:
If I have code such a SqConnection cndb = new SqlConnection(connstr) SqlDataReader dr = null tr cndb.Open() SqlCommand cmd = new SqlCommand("exec mysp", cndb) dr = cmd.ExecuteReader()
0
1919
by: prakash | last post by:
Hi all. I am developing a vb.net project .After complete the Execution some times it gives an error like that A Message Box shown title : "DDE Server Window : MyProgarm.exe - Application Error" . Icon: Critical message: The Instruction at "0x0ea320e7" referenced memory at "0x0ea320e7. The Memory Could not be "read".
160
4715
by: RG | last post by:
Greetings friends, This semester I have started a course in C programming. I was moving along fine until I reached to the topic of loops (feeling embarrassed among you elite programmers). My prof. would post program questions and the solutions online. For practice I would try to do the problems. I would reach to a certain point in the code, for example as far as error trapping, but when the loop arrives, like knowing whether to use...
11
4466
by: minishilpi | last post by:
I have a question - I have this code below to send an email and I have referenced the Microsoft CDO Library 2000. It doesn't throw any exception in the console window. It goes throughout the code successfully, but I do not receive any email. When I execute this code to send email, it gives the following error - 'ConsoleApplication1.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll',...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.