[Python-bugs-list] [ python-Bugs-546078 ] IDLE calltips cause application error

noreply@sourceforge.net noreply@sourceforge.net
Mon, 22 Apr 2002 11:37:01 -0700


Bugs item #546078, was opened at 2002-04-19 07:38
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546078&group_id=5470

Category: IDLE
Group: None
Status: Open
Resolution: None
Priority: 6
Submitted By: Duncan Booth (duncanb)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: IDLE calltips cause application error

Initial Comment:
I can reproduce this bug on Python 2.2 and Python 2.1 
on different Windows 2000 machines.

Start a copy of IDLE.
At the interactive prompt type the following 
interactive session:

>>> s = "%"*3000
>>> def f(p=s): pass

>>> f(

Instead of showing a calltip window with the arguments 
for f, idle dies with an application error dialog:

idle: pythonw.exe - Application Error
The instruction at "0x1000a01f" referenced memory 
at "0x00000000". The memory could not be "read".

This happens whenever the calltip string gets too long 
(somewhere between 2500 and 3000 characters).


----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2002-04-22 14:37

Message:
Logged In: YES 
user_id=31435

Neal, can you try the attached patch in your Linux 
scenario?  Whether it works or not, assign this back to 
me.  It fixes my problem on Win98, so I'm going to check it 
in regardless, but I'll leave the bug open.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2002-04-22 14:29

Message:
Logged In: YES 
user_id=31435

Boosted priority (it's crashing X servers too!).

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-04-22 14:16

Message:
Logged In: YES 
user_id=6380

Yes, I'm positive. I've typed it in exactly, and verified
that I'm using 2.2.1 #34.

Regardless, I think that clamping the length of the string
makes a lot of sense.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2002-04-22 13:58

Message:
Logged In: YES 
user_id=31435

Guido, are you sure this works for you?  It crashed for me 
on Win98SE, using the distributed 2.2.1.  It's an "illegal 
operation" error, and it says

PYTHONW caused a general protection fault
in module DIBENG.DLL at 0005:00003f2f.

MS claims this is due to a bad display driver:

http://support.microsoft.com/directory/article.asp?ID=KB;EN-
US;Q235618

but I doubt that's really the cause here.  I also doubt 
we'll ever know the true cause:  we're deep in the land of 
undocumented MS DLLs without source code, and how they 
interact with Tk's implementation.

Offhand I guess the problem would go away if CallTips.py 
clamped the length of the string it tried to display.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-04-22 13:41

Message:
Logged In: YES 
user_id=6380

I just tried this with Python 2.2.1 and cannot reproduce it
either, but then I'm on Win98 and don't have easy access to
Win2K. If this really is Win2K specific, TIm is our only
hope, so I've assigned to him. (Tim, all I need at this
point is to see whether you can reproduce this on Win2k.)

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2002-04-21 11:33

Message:
Logged In: YES 
user_id=33168

I couldn't replicate this bug...well, not exactly.
On Linux (redhat 7.2), I tried the example and there was no
problem.  I increased 3000 to 30,000 and still no problem. 
I then changed % to * and my X server crashed!

So I think the problem you are seeing is Windows specific,
but there may be a Tk problem also.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546078&group_id=5470