Short answer: If you have Intel GMA950 graphics (early MacBooks and all Mac Minis?) and SketchUp is locking up after you box-select or just randomly after you try to select objects, this download my resolve the issue. The latest versions of MacOS and SketchUp that this patch has been confirmed useful with are 10.5.6 and 7.0.8656.
tested with OSX 10.5.6 and SU 7.0.8656(plus 216 more downloads a few posts down)
If you have trouble with the above link, I've put it up here.
In the worst case, this patch's side effects will be reduced performance or graphical artifacts.
Slightly longer answer: MacOS 10.5 introduced a driver bug for certain video cards that causes SketchUp to freeze for several seconds after box selecting. This package installs a runtime patch causes SketchUp to fully refresh the display after certain types of rendering operations, preventing the freezes from occurring. For source code of the patch, see a few posts down.
**Tip:**Even though it's unlikely to cause problems, it's a good idea to verify that this patch is still necessary after updating SketchUp or MacOS. Just uninstall it (using the uninstaller script put into your SketchUp directory) and see if you can make SketchUp lock up.
================== ORIGINAL POST ======================
Just fired up SketchUp for the first time since installing leopard on my MacBook and ... Hmmm, hanging oddly when I select lines. I see there's other reports of this, but I noticed one thing that hadn't been mentioned before so I figured I should share:
I fired up SpinControl (as one should when an app starts freezing on them unexpectedly and clicked around in SketchUp a bit. Got a hang, clicked over to SC, and the call tree for thread 1 shows glBegin in 716 out of 751 samples. It looks like in those instances glBegin is resulting a command buffer flush of some sort through private APIs inside CG (glcDoNonSimpleFlushOptions calls CGSFlushSurfaceWithOptions, calls _CGSFlushSurfaceInline calls a mach trap), and that's taking a while.
Knowing the OpenGL is the problem, I fire up Sketchup from OpenGL Profiler with "collect trace" enabled. Using the box selection tool causes the hang as others have reported and ... it locks up for a solid 10 seconds. Wee! The trace log shows that some of the calls glBegin (called for each line segment?) are taking 16,000 to 30,000 microseconds. Hmm, that sounds like multiples of 60Hz, my display's native refresh rate.
Thus my guess is, for some reason glEnd is synchronizing to the display. So lets try to figure out what OpenGL state is causing this. Looking at a trace, it looks like glClear is called at the beginning of each normal frame, but not before rectangle drags - this makes it a good target. Open up the breakpoints window, set a breakpoint before glClear, click over to the state tab and check the "changes since last breakpoint" box. Results are ... nadda. There is no difference (according to apple's tools) in the OpenGL state between a normal responsive frame and a frame where glEnd beam synchs.
This smells like a driver bug. I'm guessing it relates to switching between drawing to the front buffer and back buffer. One work around could be to draw an empty frame after any front buffer drawing.