Problems with Mac Rhino releases after 2013-10-23


(Marlin Prowell) #1

Some people are reporting problems with recent Mac Rhino releases. The problems include:

Unable to import or export files
Crashes
Slow behavior

So far we have not been able to duplicate either the import/export problem or the crashes. We have tested these releases on many Macs and all three supported versions of OS X, and never caused a crash, and can always import or export files. We need to somehow duplicate these problems for us to be able to find the problem and fix it.

The crash reports that we are receiving, in this particular case, don’t give us any clue as to the cause of the crash. All we can tell is that Rhino is crashing inside Apple’s code when trying to open a dialog window. When we repeat a test here that opens the same dialog window, it works fine. Testing again and again, it always works.

So, if you are having this problem, we need your help. We need you to carefully describe a repeatable process that will always, or almost always cause the crash or cause the import/export failure.

Remember, these releases are working for lots of Mac Rhino users, even if it is not working for you. There is something different about your computer environment, or the way you perform these tasks that is causing a problem with Rhino. So please be very descriptive when telling us how you can reliably crash Rhino.

We want to find and fix these problems, but you need to tell us how to make Rhino crash.


Multiple selection box won't go away - again
(Marlin Prowell) #2

This topic is now pinned. It will appear at the top of its category until it is either unpinned by a moderator, or the Clear Pin button is pressed.


#3

I have a file that always causes Rhino to spin endlessly when opening it, and spews
10/30/13 9:58:40.763 pm Rhinoceros[9287]: *** -redComponent not valid for the NSColor NSCalibratedWhiteColorSpace 1 1; need to first convert colorspace.
to the console. Will upload it.


#4

I can’t import anything illustrator/dwg/dxf. Just importing a file that has previously worked on last issue of rhino, now the file attempts to import - options menu is quickly bypassed without my input and skips straight to file loading but nothing happening. Is there anyway I can download the previous version of Rhino, as not being able to import makes Rhino unusable and I have deadlines!!!


#5

I can reproduce the problems with this very simple file:
box.3dm.zip(17.6 KB)
and 5.0 Wenatchee 2013-10-28 on Mavericks.

I just run Rhino. Close the default empty document that opens (I click the close box with the mouse). Use Command-O and open box.3dm. Command-W to close it. Command-O to open it again, close again, and repeat until you crash.

In many cases you’ll see
10/31/13 6:17:28.102 pm Rhinoceros[603]: *** -redComponent not valid for the NSColor NSCalibratedWhiteColorSpace 1 1; need to first convert colorspace.
when opening the file. Fairly often, the crash will then happen when closing the file, and it looks like this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff8c4a60a3 objc_msgSend + 35
1 com.apple.AppKit 0x00007fff8dde016b -[NSWindow _close] + 173
2 com.apple.AppKit 0x00007fff8ded9b16 -[NSWindow _closeForTermination] + 96
3 com.apple.CoreFoundation 0x00007fff8e86c010 -[NSArray makeObjectsPerformSelector:] + 480

or when trying to open, and it looks like this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff8c4a60a3 objc_msgSend + 35
1 com.apple.AppKit 0x00007fff8de0a524 -[NSWindowController _windowDidLoad] + 906
2 com.apple.AppKit 0x00007fff8ddf1076 -[NSWindowController window] + 110
3 com.apple.AppKit 0x00007fff8ddf21b0 -[NSWindowController showWindow:] + 36
4 com.apple.AppKit 0x00007fff8debe4c5 -[NSDocument showWindows] + 100


#6

If I run Rhino under the debugger and break on Obj-C exceptions, we see that -redComponent exception being thrown from Rhino’s drawing code:

frame #0: 0x00007fff8c4aee4a libobjc.A.dylib`objc_exception_throw
frame #1: 0x00007fff8e9252cc CoreFoundation`+[NSException raise:format:] + 204
frame #2: 0x00007fff8df7e360 AppKit`-[NSColor redComponent] + 66
frame #3: 0x0000000100028e0f Rhinoceros`___lldb_unnamed_function420$$Rhinoceros + 1042
frame #4: 0x00007fff8dcd4399 AppKit`-[NSView _drawRect:clip:] + 3748
frame #5: 0x00007fff8dcd2c0e AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1799
frame #6: 0x00007fff8dcd2fea AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
frame #7: 0x00007fff8dcd2fea AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
frame #8: 0x00007fff8dcd2fea AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
frame #9: 0x00007fff8dcd2fea AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
frame #10: 0x00007fff8dcd2fea AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
frame #11: 0x00007fff8dcd2fea AppKit`-[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
...

and I’m guessing that the stack unwinding that happens as a result of the exception is leaving some objects in a bad state.

The Rhino code doesn’t have symbols, but some poking around suggests that it’s in -[MROpenGLView drawRect:], and it’s maybe calling [[settings appearance] viewportBackgroundColor]? I think that’s the color that is in the NSCalibratedWhiteColorSpace so doesn’t respond to -redComponent.

Armed with this knowledge, I went to my Rhino prefs -> Colors, and changed the Viewport Background color from its default of white to yellow, and now I no longer crash.

So the bug may not reproduce if you’ve changed the Viewport colors.

Simon


#7

If I delete my Rhino prefs (rm ~/Library/Preferences/com.mcneel.rhinoceros.plist) then the default viewport background is gray. I’m not sure if it used to be white in an older version, or whether I’d changed it. But the issue doesn’t happen with newly created prefs. So it might depend on what the first version of Mac Rhino you ever ran was.

Simon


#8

Just found that if I set my viewport background to be white, then the problem recurs.

Simon


(Marlin Prowell) #9

Excellent work, Simon! You found the cause of the crashes and even nailed exactly what method inside Rhino where the problem occurs. I released a new WIP with a fix, 2013-10-31.

If you changed the background color in your Rhino viewports to a gray scale color, Rhino would crash. I know it doesn’t make sense, but that was the cause of the crash. Oh, and some stupid programming. That helped. That also explains why we never saw the crash here. We all run with mostly default settings because that’s what most of our users do.

Also, the real cause of the crash does not appear anywhere in the crash reports, so it took someone who was having the problem to investigate further and find the problem. People would report that Rhino would crash when importing and exporting files, but this was just a condition that would be more likely to invoke the viewports bug. It wasn’t the actual reason for the crash.

We would eventually have found this with the dedicated help of people who had the crashes, but Simon made it happen much quicker. Thanks to Simon.


(Marlin Prowell) #10