473,503 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

bogus OverflowError: python bug?

Hi,

I'm getting an OverflowError which doesn't make sense to me. Is this a
python bug?

Traceback (most recent call last):
File "/home/demoau/lib/py/omniORB/__init__.py", line 717, in static_is_a
for b in cls.__bases__:
OverflowError: long int too large to convert to int

cls=<class omniORB.PortableServer.Servant at 0x4073656c>
cls.__bases__=()

Surely that line of source code shouldn't be able to produce an OverflowError?

(BTW, I know that a traceback can sometimes print the wrong source line when
the .py file has been modified since importing the module into the python
process, but I was careful to avoid this problem).

Regards,
Luke.
Jul 18 '05 #1
2 1758
Luke wrote:
I'm getting an OverflowError which doesn't make sense to me. Is this a
python bug?
I very much doubt this. More likely, it's an omniORB bug.
Surely that line of source code shouldn't be able to produce an
OverflowError?
It actually might. If the internal memory of the interpreter got
corrupted by a buggy extension module, any code may cause any exception.
(BTW, I know that a traceback can sometimes print the wrong source line
when
the .py file has been modified since importing the module into the python
process, but I was careful to avoid this problem).


There are other possible causes for bogus exceptions. A common one is
that Python set an exception at some point, but the extension module
forgot to forward the exception. Then, the next time Python checks
for exceptions, it sees that there still is an exception pending, and
raises it. That exception will make no sense that that point, of course.

Only a gdb session can tell what really happened.

Regards,
Martin

Jul 18 '05 #2
Martin v. Löwis wrote:
Surely that line of source code shouldn't be able to produce an
OverflowError?

It actually might. If the internal memory of the interpreter got
corrupted by a buggy extension module, any code may cause any exception.


Good point, though I would expect a memory corruption bug to cause less
predictable behaviour (I can repeat this problem regularly in a large
multithreaded program, and the bogus exception is always at this specific
line of python).
(BTW, I know that a traceback can sometimes print the wrong source
line when
the .py file has been modified since importing the module into the python
process, but I was careful to avoid this problem).

There are other possible causes for bogus exceptions. A common one is
that Python set an exception at some point, but the extension module
forgot to forward the exception. Then, the next time Python checks
for exceptions, it sees that there still is an exception pending, and
raises it. That exception will make no sense that that point, of course.


Oh yes of course, thanks... this sounds to be more consistent with the
repeatability of the bogus exception.
Only a gdb session can tell what really happened.


Ouch. I might try searching the omniORB extension module for a
forgot-to-forward-exception bug first.

Thanks for your help, Martin.

Luke.
Jul 18 '05 #3

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

Similar topics

3
2761
by: Paolo Alexis Falcone | last post by:
Whenever I try to access a table with many rows using PgSQL's fetchall(), this happens: >>> from pyPgSQL import PgSQL >>> db = PgSQL.connect("192.168.0.8:5432:whitegold","dondon","dondon") >>>...
1
1747
by: ashtonn | last post by:
How do i fill 1 byte and 4 bytes in a single array? This array contains packet information. Python code... from array import * size = 526 pData = array("B", '\0'* 526) # Destination MAC...
4
9988
by: Sheldon | last post by:
Hi, I have a written a script that will check to see if the divisor is zero before executing but python will not allow this: if statistic_array > 0.0: statistic_array =...
2
9498
by: Jorgen Bodde | last post by:
Hi List I am working on an app to store guitar songs I am practicing, and for the fun of it I want to store the date of songs when they were originally made. So far so good.. However, my...
1
4313
by: khgoh | last post by:
Hi, Need help for the error "OverflowError: long int too large to convert to int" while reading a zip file content. Python version: Python 2.4.1 (#1, Sep 13 2005, 00:39:20) on linux2 Code...
0
1531
by: gdetre | last post by:
Dear all, I'm trying to get a large, machine-generated regular expression (many thousands of characters) to work in Python on a Mac (running Leopard), and I keep banging my head against this...
0
979
by: Manuel Vazquez Acosta | last post by:
Hi all, I'm debugging a Plone site in an AMD64 laptop. When I first tried to run Zope, I got this exception: OverflowError: signed integer is greater than maximum In the archives I...
0
211
by: Terry Reedy | last post by:
Manuel Vazquez Acosta wrote: In general, versions numbers for both Python and the app are helpful. Archives: Python? Zope? Plone? I hope you have/will report this to the appropriate...
5
4380
by: Tzury Bar Yochay | last post by:
What is the reason math.pow yields OverflowError while python itself can calculate these large numbers. e.g: 1e+308 Traceback (most recent call last): File "<stdin>", line 1, in <module>...
0
7093
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...
0
7291
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,...
1
7012
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...
0
5598
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,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4690
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...
0
3180
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...
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.