rotating_book.py freezing

66 views
Skip to first unread message

Kevin Karplus

unread,
Feb 26, 2013, 12:55:56 AM2/26/13
to vpytho...@googlegroups.com, Kevin Karplus
I downloaded and installed Vpython 6.0.3 today, and tried the rotating book demo on the Contributed Programs part of vpython.org.

It works fine until I click on pause and then on resume, at which time I get the spinning beachball of death.

I'm running a fresh copy of Python 2.7.3 on a MacBook Pro (3.06GHz Intel Core 2 Duo) OS 10.6.8.

--
Kevin Karplus   kar...@soe.ucsc.edu    http://www.soe.ucsc.edu/~karplus
Professor of Biomolecular Engineering, University of California, Santa Cruz
Graduate Director, Biomolecular Engineering and Bioinformatics
Editorial Board, Bioinformatics (Oxford University Press)
Senior member, IEEE
life member (LAB, Adventure Cycling, American Youth Hostels)
Effective Cycling Instructor #218-ck (lapsed)
Affiliations for identification only.

Steve Spicklemire

unread,
Feb 26, 2013, 10:35:42 AM2/26/13
to vpytho...@googlegroups.com
Thanks Kevin! I see the same behavior. I'll try to track it down.

thanks,
-steve
--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Steve Spicklemire

unread,
Feb 26, 2013, 10:40:40 AM2/26/13
to vpytho...@googlegroups.com
Hi Kevin,

It works for me if I put a rate statement in the loop "while paused == 1". I'll see about fixing the script in the contrib area.


thanks,
-steve

On Feb 25, 2013, at 10:55 PM, Kevin Karplus <kar...@soe.ucsc.edu> wrote:

--

Bruce Sherwood

unread,
Feb 26, 2013, 4:07:54 PM2/26/13
to vpytho...@googlegroups.com
And the program is now updated in the Contributed section of vpython.org. Thanks for the report, Kevin.

Joss Ives

unread,
May 9, 2013, 7:57:01 PM5/9/13
to vpytho...@googlegroups.com
I am seeing the windows-equivalent thing happen on Python 2.73, VPython 6.04 32-bit installs on both a Windows 7 and Window 8 machine. I am seeing the same sort of thing happen when a scripts break from a while loop (for example my modified orbit.py which is attached) or complete a while loop and get to the end of the script.
orbit.py

Steve Spicklemire

unread,
May 9, 2013, 11:04:21 PM5/9/13
to vpytho...@googlegroups.com, Steve Spicklemire
Hi Joss,

When vpython gets to the end of a program it drops into an endless loop so that the 3d window doesn't close.

Is that what you're seeing? This can be circumvented if it's a problem, but that's the default behavior.

-steve

On May 9, 2013, at 5:57 PM, Joss Ives <joss...@gmail.com> wrote:

> I am seeing the windows-equivalent thing happen on Python 2.73, VPython 6.04 32-bit installs on both a Windows 7 and Window 8 machine. I am seeing the same sort of thing happen when a scripts break from a while loop (for example my modified orbit.py which is attached) or complete a while loop and get to the end of the script.
>
> --
> You received this message because you are subscribed to the Google Groups "VPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> <orbit.py>

Joss Ives

unread,
May 9, 2013, 11:36:34 PM5/9/13
to vpytho...@googlegroups.com, Steve Spicklemire
Hi Steve.

I have the same issue that Kevin reported with the rotating book demo where it works fine until I hit pause and then the 3D window freezes and goes into "Not Reponding" mode. 

But when it is just the case of the end of the script (like my attached file), the 3D window won't close nicely. I have to click on close twice and then it goes to the "this program is not responding" message.

All that being said, I would be delighted to know what the circumvention around the endless loop is because there are certainly times when I was working with VPython 5 that I would have appreciated being able to do that.

Thanks!

Steve Spicklemire

unread,
May 9, 2013, 11:59:57 PM5/9/13
to Joss Ives, Steve Spicklemire, vpytho...@googlegroups.com
Hmm.. I'm not seeing that behavior, but I'm on a mac.

Does the program you sent lock up reliably?

-steve

Joss Ives

unread,
May 10, 2013, 12:01:39 AM5/10/13
to Steve Spicklemire, vpytho...@googlegroups.com
Every time. And the same thing for other programs where a break condition or end of while loop conditions are met.

Steve Spicklemire

unread,
May 10, 2013, 12:09:49 AM5/10/13
to Joss Ives, Steve Spicklemire, vpytho...@googlegroups.com

I would be interested to hear if other folks on Windows see the same behavior. Bruce is traveling right now, so he may not be in a position to test.

-steve

Bruce Sherwood

unread,
May 10, 2013, 2:53:30 AM5/10/13
to vpytho...@googlegroups.com, Joss Ives, Steve Spicklemire
I don't see any problem with VPython 6 with 32-bit Python on Windows 7. If the break statement is present, the window behaves normally, namely I can rotate and zoom, and clicking the close box cleanly closes the window. If the break statement is not present, the orbit proceeds appropriately. Usually problems with VPython indicate a need to update the graphics driver, which should certainly be tried.

This is unrelated to the problem originally reported by Karplus, because in that case there was a missing rate statement. I don't understand the statement "it works fine until I hit pause" because there is no pause in the program unless what is meant is "when I get to the end of the program".

Bruce Sherwood

unread,
May 10, 2013, 3:17:08 PM5/10/13
to vpytho...@googlegroups.com, Joss Ives, Steve Spicklemire
I was confused, thinking that there was some problem with the simple orbit program. There was a remaining problem with the rotating_book.py program, a missing rate statement. This has now been corrected in the Contributed section of vpython.org.

As far as I know there is no significant difference between VPython 5 and 6 affecting existing programs except for the issue of requiring a rate statement in loops.

Joss Ives

unread,
May 10, 2013, 3:40:38 PM5/10/13
to vpytho...@googlegroups.com, Joss Ives, Steve Spicklemire
Bruce asked me the right questions off-list and it turns out that the problem was that I was using IDLE instead of VIDLE.

Steve Spicklemire

unread,
May 10, 2013, 9:05:05 PM5/10/13
to Joss Ives, vpytho...@googlegroups.com, Joss Ives
Ahh.. Yes. The idle folks are aware of the bug. I think they are going to fix it in an upcoming release.

thanks,
-steve
Reply all
Reply to author
Forward
0 new messages