[Python-bugs-list] [Bug #115690] Dr. Watson error on Python2.0b2 Idle 0.6 WinNT4.0 SP6

noreply@sourceforge.net noreply@sourceforge.net
Fri, 6 Oct 2000 10:42:41 -0700

Bug #115690, was updated on 2000-Sep-29 14:55
Here is a current snapshot of the bug.

Project: Python
Category: Tkinter
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 6
Summary: Dr. Watson error on Python2.0b2 Idle 0.6 WinNT4.0 SP6

Details: I get a Dr. Watson error:

    Exception: access violation (0xc0000005), 
    Address: 0x00e31652

when I run the following code in Idle 0.6, using Edit->Run Script:


import unicodedata
for c in range(0x10000):
        b = unicodedata.numeric(x)
        #print "numeric:", repr(x)
            a = unicodedata.digit(x)
            if a != b:
                print "bad" , repr(x)
            print "Numeric but not digit", hex(c), x.encode("utf8"), \
                  "numeric ->", b


(This code was recently posted on python-dev)

I've modified my .idle file, adding 



Date: 2000-Sep-29 21:42
By: jhylton

Marc-Andre can you check whether this is a Unicode bug that is going to come up with or without idle.  If it seems Idle specific, please assign it to Guido or Tim.  If not, it's yours :-).


Date: 2000-Oct-03 10:23
By: lemburg

I can't reproduce this on Linux, so it seems that it is related to the way TCL/Tk
displays UTF-8 data. Another possibility would be an optimization error
which doesn't happen with gcc.

Tim, could you try this on Windows and possibly tell me where the segfault
occurs in the code ?


Date: 2000-Oct-03 11:27
By: gvanrossum

Can't reproduce it on Win98SE either. (And I did try setting font-name to tahoma.)

Date: 2000-Oct-04 20:42
By: tim_one

Assigned back to Guido, because it appears identical to bug 113803, which Guido assigned to himself.

Guido, I can reproduce the problem, and regardless of font (e.g., let it use the default) on Win98SE by letting the program run to completion, and then hitting the ENTER key *twice* (first time gets an IDLE prompt, second time blows up).  It's in exactly the same place then as 113803, trying to decref a NULL pointer in _tkinter.c's AsString.

Note that there *may* be another bug here specific to NT and/or W2K too, in that W9x have much feebler Unicode support.


Date: 2000-Oct-06 10:13
By: gvanrossum

Fixed the Tkinter bug, so closing this. Please check that this is indeed fixed in the CVS version (or wait for release candidate 1, Monday).

Date: 2000-Oct-06 10:42
By: tim_one

The crash went away for me (Win98SE, default font), but upon hitting the 2nd RETURN I get a new problem:

>>> Exception in Tkinter callback
Traceback (most recent call last):
  File "c:\code\python\dist\src\lib\lib-tk\Tkinter.py", line 1287, in __call__
    return apply(self.func, args)
  File "../tools/idle\PyShell.py", line 573, in enter_callback
  File "C:\Code\python\dist\src\tools\idle\AutoIndent.py", line 269, in newline_and_indent_event
    c = y.get_continuation_type()
  File "C:\Code\python\dist\src\tools\idle\PyParse.py", line 332, in get_continuation_type
  File "C:\Code\python\dist\src\tools\idle\PyParse.py", line 220, in _study1
    str = string.translate(str, _tran)
  File "c:\code\python\dist\src\lib\string.py", line 308, in translate
    return s.translate(table, deletions)
TypeError: translate requires exactly 1 argument; 2 given

I'll look into it.

For detailed info, follow this link: