Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#87 Subprocess hangs when using Tk with both pack and grid

open-later
nobody
None
3
2003-11-30
2003-11-01
Egon Frerich
No

(IDLE 1.0 - Python 2.3 -Windows XP)
I put a never ending loop into my python program.
control-c didn't stop the Run-Command. Then I choosed
the exit option in the File Menu of the Shell-Window.

Then I h've got the message, that the program is still
running and if I would like to kill the program. After
saying "yes" (or "ok" IDLE disappeared.

But I cannot start IDLE again. I have to reboot my
system. When I shutdown the system there is a program
"Menu Window" which I have to destroy.

Discussion

  • Kurt B. Kaiser
    Kurt B. Kaiser
    2003-11-17

    • priority: 5 --> 7
     
  • Kurt B. Kaiser
    Kurt B. Kaiser
    2003-11-17

    • assigned_to: nobody --> kbk
     
  • Kurt B. Kaiser
    Kurt B. Kaiser
    2003-11-17

    Logged In: YES
    user_id=149084

    Please post a copy of your program and any pertinent
    data so I can reproduce it. Ctrl-C works for me on the
    code I've tried. There are cases involving blocking
    I/O which can't be interrupted.

    It does sound like the main thread (which runs your code)
    is blocked.

    It should not be necessary to reboot XP. Use the Task
    Manager to kill the python subprocess, they are the
    (usually two threads) small ones. Kill the one which is
    getting 100% of the cpu first.

    If you do that, the GUI will re-spawn the subprocess.

     
  • Egon Frerich
    Egon Frerich
    2003-11-17

    Logged In: YES
    user_id=40342

    Python program: actually I used Tkinter with two geometry
    manager (pack and grid) . Afterwards I read I shouldn't do this.

    Task Manager: Yes this works. If the geometry managers come
    to no end and I say Ctrl-C then nothing happens. Then if I
    kill the 99% cpu-process and afterwards push ctrl-c I get
    the KeyboardInterrupt in IDLE (and have not to reboot XP).

    Thanks

    Egon Frerich

     
  • Kurt B. Kaiser
    Kurt B. Kaiser
    2003-11-18

    Logged In: YES
    user_id=149084

    Nonetheless, if you could post the code (or even better,
    a cut-down) which causes the error, it might be useful.
    There are some internal IDLE problems which can cause
    hangs.

    Otherwise, I'll go ahead and close this.

     
  • Kurt B. Kaiser
    Kurt B. Kaiser
    2003-11-18

    • priority: 7 --> 4
     
  • Egon Frerich
    Egon Frerich
    2003-11-18

    no loop

     
  • Egon Frerich
    Egon Frerich
    2003-11-18

    Logged In: YES
    user_id=40342

    I have written two programs and upload them as one text
    file. After separating the program with only the
    pack-geometry manager works. The other program has some
    functions with calls to the grid manager. With this program
    you get 95% - 99% cpu-processing and you stop IDLE with ctrl-c.

     
  • Kurt B. Kaiser
    Kurt B. Kaiser
    2003-11-30

    Logged In: YES
    user_id=149084

    Thanks for the code. I may get to this someday :-)

     
  • Kurt B. Kaiser
    Kurt B. Kaiser
    2003-11-30

    • priority: 4 --> 3
    • assigned_to: kbk --> nobody
    • summary: control-c doesn't work --> Subprocess hangs when using Tk with both pack and grid
    • status: open --> open-later