Contour command freezing Rhino

this happens to me quite often, running the Contour command over quite simple (planar face) polysurfaces. run the comman, and rhino gets stuck in some kind of endless loop. the menu system is still active (tho no commands work) and I can even still change views) but no further commands can be entered, and the status bar just says Calculating Contours… Press Esc to Cancel.

of course, Esc has NEVER worked in mac rhino for me, since I started using it about 2 years ago.

if i force quit rhino (only way to exit when in this state), and come back in and re run the same contour command, it works instantly.

Rhino for Mac 5.0.2 5A865

Yes, it happens to me more often with the command intersection.

Yes I get it occasionally with Intersect, and IntersectTwoSets. I’ve been using Contour a bit more lately, so that’s where I’m seeing it more at the moment. I’ve learned to always save my work before I run Intersect or Contour, but it’s a definite bug that needs to be fixed…

Can you please post a file where this happens consistently (or even semi-consistently)? I’m having trouble reproducing the issue on my computer.

Hey Dan,

As a professional software developer with 20+ years experience, I can tell you this is one of those bastard intermittent problems that is annoyingly difficult to reproduce. I suspect its not to do with the file - for me, I’ve had these issues with both contour and intersect happen in many completely different files. the particular geometry that the commands are being run on can be simple or complex (i had it freeze on me recently trying to contour a simple cube). Things that seem to be in common in all the situations when it has occurred are that the while the geometry being contoured may have been simple, it was usually in a file with a lot of other stuff (ie a fairly large project). It also only seems to occur after rhino has been up and running, and in heavy use for several hours. shutting down rhino, reopening the same file and rerunning the contour always works. Next time it happens, I’ll check how much memory rhino is using, but it may be that some resource is running short and rhino is getting jammed waiting for it to free up. the fact that it is happening with both Contour and Intersect (but nothing else that I’ve found) ought to be a clue. some common bit of code they share maybe.

if you still think it would help, I’ll upload the most recent file I had it happen with, but i suspect you wont see the problem unless you spend a lot of time just doing stuff in the file…

cheers

Ben

LOL. Yep, it certainly smells like one of those “bastard intermittent problems” and I think you’re suspicion that there may be a memory leak is sound, given:

Yeah, sounds familiar.

Thanks…that might lend some weight to the memory leak theory.

but i suspect you wont see the problem unless you spend a lot of time just doing stuff in the file…

We have caught a couple leaks and inefficiencies in the past by running a script that “just does lots of stuff” in the file. @marlin has written a couple scripts that have helped on these issues…maybe we could try one that does a bunch of repeated contour and/or intersect operations.