Issue 546078: IDLE calltips cause application error (original) (raw)

Created on 2002-04-19 11:38 by duncanb, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
idle.txt tim.peters,2002-04-22 18:37 Patch to clamp the width of the calltip label
Messages (12)
msg10421 - (view) Author: Duncan Booth (duncanb) Date: 2002-04-19 11:38
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).
msg10422 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-04-21 15:33
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.
msg10423 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-04-22 17:41
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.)
msg10424 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-04-22 17:58
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.
msg10425 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-04-22 18:16
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.
msg10426 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-04-22 18:29
Logged In: YES user_id=31435 Boosted priority (it's crashing X servers too!).
msg10427 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-04-22 18:37
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.
msg10428 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-04-22 19:20
Logged In: YES user_id=33168 Works for me.
msg10429 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-04-22 19:54
Logged In: YES user_id=31435 Thank you, Neal! Closing as Fixed, despite that we'll never know what it caused it . I'll verify on Win2K tomorrow and reopen if it fails there (seems exceedingly unlikely, though).
msg10430 - (view) Author: Duncan Booth (duncanb) Date: 2002-04-23 08:27
Logged In: YES user_id=74031 The fix works fine for me on Win2K. Actually I can add some more information which throws a bit of light on the subject. On my system a string of 2974 "%" characters is fine, and results in a popup window 32762 pixels wide. A string of 2975 "%" characters fails to give me a window which would be 11 pixels wider and dies with an access violation. My best guess is that Win2K (not a 16 bit operating system at all, honest!) is doing a 16 bit calculation which overflows. Probably the OS returns an error and something in tk or tkinter doesn't manage to handle the error condition correctly.
msg10431 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002-04-23 15:09
Logged In: YES user_id=31435 It's Windows -- you'll never know. Like it didn't fail for Guido on his Win98SE but did for me on my Win98SE, on *my* Win2K Pro the original example works fine. Also worked fine s/3000/4000/. s/3000/5000/, though, and it died with an access violation in the Tk DLL.
msg10432 - (view) Author: Jeffrey Hobbs (hobbs) Date: 2002-04-23 19:23
Logged In: YES user_id=72656 This is due to limitations in X (which still requires dimensions constrained to 16 bits), and subsequently the Xlib emulation side for Windows. The Unix side has been fixed with Tk patch 541999: https://sourceforge.net/tracker/index.php? func=detail&aid=541999&group_id=12997&atid=312997 A subsequent patch for Windows is still needed (though on Win2K I can go to 10K chars before having problems, and then the label just does blank - no crash).
History
Date User Action Args
2022-04-10 16:05:14 admin set github: 36467
2002-04-19 11:38:18 duncanb create