Skip to content

[2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 #75038

Closed

Description

@vstinner
BPO 30855
Nosy @terryjreedy, @pfmoore, @vstinner, @tjguk, @zware, @serhiy-storchaka, @zooba
PRs
  • [3.5] bpo-30855: Trying to fix test_use on Windows. #2585
  • [2.7] bpo-30855: Trying to fix test_use on Windows. #2586
  • bpo-30855: Fix winfo_id related Tkinter test on Windows. #4121
  • bpo-30855: Bump Tcl/Tk #4550
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zware'
    closed_at = <Date 2018-01-05.20:59:17.337>
    created_at = <Date 2017-07-05.12:18:47.605>
    labels = ['expert-tkinter', 'OS-windows']
    title = '[2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5'
    updated_at = <Date 2018-01-05.23:33:44.358>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2018-01-05.23:33:44.358>
    actor = 'vstinner'
    assignee = 'zach.ware'
    closed = True
    closed_date = <Date 2018-01-05.20:59:17.337>
    closer = 'zach.ware'
    components = ['Tkinter', 'Windows']
    creation = <Date 2017-07-05.12:18:47.605>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30855
    keywords = ['patch']
    message_count = 34.0
    messages = ['297727', '297728', '297729', '297730', '297731', '297737', '297754', '297757', '297815', '297819', '299839', '299840', '300135', '302022', '304968', '305010', '305011', '305029', '305916', '305919', '306156', '306575', '306576', '306578', '306683', '307012', '307020', '307040', '307042', '307044', '309525', '309526', '309527', '309531']
    nosy_count = 7.0
    nosy_names = ['terry.reedy', 'paul.moore', 'vstinner', 'tim.golden', 'zach.ware', 'serhiy.storchaka', 'steve.dower']
    pr_nums = ['2585', '2586', '4121', '4550']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue30855'
    versions = ['Python 2.7']

    Activity

    1. vstinner commented on Jul 5, 2017

      @vstinner
      MemberAuthor

      http://buildbot.python.org/all/builders/AMD64%20Windows8%203.5/builds/323/steps/test/logs/stdio

      ======================================================================
      ERROR: test_use (tkinter.test.test_tkinter.test_widgets.ToplevelTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 95, in test_use
          widget2 = self.create(use=wid)
        File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 70, in create
          return tkinter.Toplevel(self.root, **kwargs)
        File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\__init__.py", line 2191, in __init__
          BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
        File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\__init__.py", line 2148, in __init__
          (widgetName, self._w) + extra + self._options(cnf))
      _tkinter.TclError: integer value too large to represent
    2. vstinner commented on Jul 5, 2017

      @vstinner
      MemberAuthor

      This bug looks similar to bpo-25263.

    3. changed the title [-]test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5[/-] [+][3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5[/+] on Jul 5, 2017
    4. vstinner commented on Jul 5, 2017

      @vstinner
      MemberAuthor

      The compile step mentions Tk version 8.6.4.2:

      "tk-8.6.4.2 already exists, skipping."

      http://buildbot.python.org/all/builders/AMD64%20Windows8%203.5/builds/323/steps/compile/logs/stdio

    5. vstinner commented on Jul 5, 2017

      @vstinner
      MemberAuthor

      It seems like the test never fails on 3.6, while 3.6 contains the fix b9d6724. Let's try to backport this change to 3.5 and 2.7 branches.

    6. vstinner commented on Jul 5, 2017

      @vstinner
      MemberAuthor

      See also bpo-16840.

    7. serhiy-storchaka commented on Jul 5, 2017

      @serhiy-storchaka
      Member

      Thank you for backporting the fix. Seems I just forgot about this.

    8. vstinner commented on Jul 5, 2017

      @vstinner
      MemberAuthor

      Serhiy Storchaka added the comment:

      Thank you for backporting the fix. Seems I just forgot about this.

      The bug wasn't notice before since test_tk fails once, but then pass
      when run again... It fails randomly. But I noticed a warning on a
      build, and so saw the bug. More stable buildbots should help to catch
      more random bugs.

    9. vstinner commented on Jul 5, 2017

      @vstinner
      MemberAuthor

      New changeset c48a000 by Victor Stinner in branch '3.5':
      [3.5] bpo-30855: Trying to fix test_use on Windows. (bpo-2585)
      c48a000

    10. vstinner commented on Jul 6, 2017

      @vstinner
      MemberAuthor

      New changeset f6d6480 by Victor Stinner in branch '2.7':
      [2.7] bpo-30855: Trying to fix test_use on Windows. (bpo-2586)
      f6d6480

    11. vstinner commented on Jul 6, 2017

      @vstinner
      MemberAuthor

      I backported fixes to 2.7 and 3.5 branches. The test fails randomly, so I close the issue and hope that it doesn't come back.

      If it comes back on 3.5, we should now get the identifier which caused the failure. I will reopen the issue if the bug occurs again.

    12. vstinner commented on Aug 7, 2017

      @vstinner
      MemberAuthor

      The test failed on "AMD64 Windows8.1 Refleaks 2.7" buildbot:

      http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/60/steps/test/logs/stdio

      test_padx (test_tkinter.test_widgets.ToplevelTest) ... ok
      test_pady (test_tkinter.test_widgets.ToplevelTest) ... ok
      test_relief (test_tkinter.test_widgets.ToplevelTest) ... ok
      test_screen (test_tkinter.test_widgets.ToplevelTest) ... skipped 'No $DISPLAY set.'
      test_takefocus (test_tkinter.test_widgets.ToplevelTest) ... ok
      test_use (test_tkinter.test_widgets.ToplevelTest) ... ERROR
      test_visual (test_tkinter.test_widgets.ToplevelTest) ... ok
      test_width (test_tkinter.test_widgets.ToplevelTest) ... test test_tk failed -- Traceback (most recent call last):
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 92, in test_use
          widget2 = self.create(use=wid)
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 67, in create
          return tkinter.Toplevel(self.root, **kwargs)
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2138, in __init__
          BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2095, in __init__
          (widgetName, self._w) + extra + self._options(cnf))
      TclError: expected integer but got "0xffffffff92b20298L"

      ok

      ======================================================================
      ERROR: test_use (test_tkinter.test_widgets.ToplevelTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 92, in test_use
          widget2 = self.create(use=wid)
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 67, in create
          return tkinter.Toplevel(self.root, **kwargs)
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2138, in __init__
          BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
        File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2095, in __init__
          (widgetName, self._w) + extra + self._options(cnf))
      TclError: expected integer but got "0xffffffff92b20298L"
    13. 19 remaining items

    14. serhiy-storchaka commented on Nov 20, 2017

      @serhiy-storchaka
      Member

      The fix was made 2015-11-09. The tag core-8-5-15 was created 2013-09-16.

      I'm not well experienced with fossil and thought that 8.5.15 contains this fix, but now I see that this is not true. Yes, updating Tcl/Tk can help.

    15. zware commented on Nov 21, 2017

      @zware
      Member

      If you'd like to do that update, there are some instructions at https://github.com/python/cpython-source-deps. You can get AppVeyor to use dependencies from your fork of cpython-source-deps by adjusting 2.7/PCbuild/get_externals.bat:32 to point to your username temporarily.

      If you don't want to mess with it, I'll get to it sooner or later :)

    16. zware commented on Nov 26, 2017

      @zware
      Member

      New changeset be1faab by Zachary Ware in branch '2.7':
      bpo-30855: Bump Tcl/Tk to 8.5.19 on Windows (GH-4550)
      be1faab

    17. vstinner commented on Nov 26, 2017

      @vstinner
      MemberAuthor

      Cool, thanks Zach!

    18. vstinner commented on Nov 27, 2017

      @vstinner
      MemberAuthor

      Bad news: the problem is not gone. Fail at commit 180372c (the commit after Zach's commit be1faab in the Python 2.7 branch):

      http://buildbot.python.org/all/#/builders/70/builds/28

      test_use (test_tkinter.test_widgets.ToplevelTest) ... ERROR
      test_visual (test_tkinter.test_widgets.ToplevelTest) ... ok
      test test_tk failed -- Traceback (most recent call last):
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 93, in test_use
          widget2 = self.create(use=wid)
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 67, in create
          return tkinter.Toplevel(self.root, **kwargs)
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 2138, in __init__
          BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 2095, in __init__
          (widgetName, self._w) + extra + self._options(cnf))
      TclError: integer value too large to represent
      test_width (test_tkinter.test_widgets.ToplevelTest) ... ok

      ======================================================================
      ERROR: test_use (test_tkinter.test_widgets.ToplevelTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 93, in test_use
          widget2 = self.create(use=wid)
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 67, in create
          return tkinter.Toplevel(self.root, **kwargs)
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 2138, in __init__
          BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
        File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 2095, in __init__
          (widgetName, self._w) + extra + self._options(cnf))
      TclError: integer value too large to represent
    19. serhiy-storchaka commented on Nov 27, 2017

      @serhiy-storchaka
      Member

      It still uses Tcl/Tk 8.5.15.

    20. vstinner commented on Nov 27, 2017

      @vstinner
      MemberAuthor

      Serhiy: "It still uses Tcl/Tk 8.5.15."

      pythoninfo says:
      ---
      tkinter.TCL_VERSION: 8.5
      tkinter.TK_VERSION: 8.5
      tkinter.info_patchlevel: 8.5.15
      ---

      The compilation says:
      ---
      Fetching external libraries...
      (...)
      tcl-8.5.19.0 already exists, skipping.
      tk-8.5.19.0 already exists, skipping.
      tix-8.4.3.5 already exists, skipping.
      (...)
      Project "D:\buildarea\2.7.ware-win81-release\build\PCbuild\_tkinter.vcxproj" (24) is building "D:\buildarea\2.7.ware-win81-release\build\PCbuild\tcl.vcxproj" (25) on node 1 (default targets).
      (...)
      cd /D "D:\buildarea\2.7.ware-win81-release\build\externals\tcl-8.5.19.0\win"
      nmake -f makefile.vc MACHINE=AMD64 OPTS= INSTALLDIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64" INSTALL_DIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64" core shell dlls
      nmake -f makefile.vc MACHINE=AMD64 OPTS= INSTALLDIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64" INSTALL_DIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64"
      ---

    21. zware commented on Jan 5, 2018

      @zware
      Member

      I manually cleared externals\tcltk64 on that bot some time ago, and it appears to be happy now.

    22. serhiy-storchaka commented on Jan 5, 2018

      @serhiy-storchaka
      Member

      Thank you Zachary! Can this issue be closed now?

    23. zware commented on Jan 5, 2018

      @zware
      Member

      I think so :)

    24. vstinner commented on Jan 5, 2018

      @vstinner
      MemberAuthor

      Awesome, thanks!

    25. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions