MDLMaterial cannot be created in the Playground
| Originator: | mhorga | ||
| Number: | rdar://27100518 | Date Originated: | 2016-06-30 |
| Status: | Open | Resolved: | |
| Product: | Xcode playgrounds | Product Version: | 7.3.1 |
| Classification: | Crash | Reproducible: | Always |
Summary: Creating a MDLMaterial object will crash in the Playground, no matter if it's an OS X or iOS playground. The only MDLMaterial constructor that works in the playground is MDLMaterial(SCNMaterial: SCNMaterial) but this one is only available in SceneKit. Steps to Reproduce: 1. create a new playground (iOS or OS X). 2. type the following: import ModelIO let m = MDLMaterial() // alternatively use the other constructor which also crashes: // let m = MDLMaterial(name: "", scatteringFunction: MDLScatteringFunction()) 3. notice the error message in the console Expected Results: a MDLMaterial object should be created Actual Results: the following error message appears in the console: 2016-06-30 10:00:44.562 com.apple.dt.Xcode.PlaygroundStub-macosx[10609:2044871] An uncaught exception was raised 2016-06-30 10:00:44.562 com.apple.dt.Xcode.PlaygroundStub-macosx[10609:2044871] [<MDLScatteringFunction 0x7fca69718fd0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key sdefSupport_name. 2016-06-30 10:00:44.562 com.apple.dt.Xcode.PlaygroundStub-macosx[10609:2044871] ( 0 CoreFoundation 0x00007fff86e2e4f2 __exceptionPreprocess + 178 1 libobjc.A.dylib 0x00007fff8b16373c objc_exception_throw + 48 2 CoreFoundation 0x00007fff86e2e439 -[NSException raise] + 9 3 Foundation 0x00007fff8d403663 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 226 4 Foundation 0x00007fff8d2dd407 -[NSObject(NSKeyValueCoding) valueForKey:] + 414 5 Foundation 0x00007fff8d424bdb -[NSObject(NSScripting) scriptingProperties] + 355 6 Foundation 0x00007fff8d2dd407 -[NSObject(NSKeyValueCoding) valueForKey:] + 414 7 ModelIO 0x00007fff9094a58b _ZN7ModelIO18trianglesInSubmeshEP7MDLMeshP10MDLSubmesh + 27884 8 ModelIO 0x00007fff9094a715 _ZN7ModelIO18trianglesInSubmeshEP7MDLMeshP10MDLSubmesh + 28278 9 ??? 0x0000000108e906e6 0x0 + 4444456678 10 ??? 0x0000000108e9010a 0x0 + 4444455178 11 ??? 0x0000000108e8c9dc 0x0 + 4444441052 12 com.apple.dt.Xcode.PlaygroundStub-macosx 0x0000000102d3fb00 main + 0 13 com.apple.dt.Xcode.PlaygroundStub-macosx 0x0000000102d3fc29 _TToZFC25PlaygroundStub_macosx_XPC14PlaygroundStub7executefT_T_ + 25 14 CoreFoundation 0x00007fff86d9fa6c __invoking___ + 140 15 CoreFoundation 0x00007fff86d9f8fe -[NSInvocation invoke] + 286 16 CoreFoundation 0x00007fff86dbad56 -[NSInvocation invokeWithTarget:] + 54 17 ViewBridge 0x00007fff8d809e33 -[NSVB_ViewServiceImplicitAnimationDecodingProxy forwardInvocation:] + 264 18 CoreFoundation 0x00007fff86d9e382 ___forwarding___ + 514 19 CoreFoundation 0x00007fff86d9e0f8 _CF_forwarding_prep_0 + 120 20 CoreFoundation 0x00007fff86d9fa6c __invoking___ + 140 21 CoreFoundation 0x00007fff86d9f8fe -[NSInvocation invoke] + 286 22 CoreFoundation 0x00007fff86dbad56 -[NSInvocation invokeWithTarget:] + 54 23 ViewBridge 0x00007fff8d7da8c6 -[NSVB_QueueingProxy forwardInvocation:] + 323 24 CoreFoundation 0x00007fff86d9e382 ___forwarding___ + 514 25 CoreFoundation 0x00007fff86d9e0f8 _CF_forwarding_prep_0 + 120 26 CoreFoundation 0x00007fff86d9fa6c __invoking___ + 140 27 CoreFoundation 0x00007fff86d9f8fe -[NSInvocation invoke] + 286 28 CoreFoundation 0x00007fff86dbad56 -[NSInvocation invokeWithTarget:] + 54 29 CoreFoundation 0x00007fff86d9e382 ___forwarding___ + 514 30 CoreFoundation 0x00007fff86d9e0f8 _CF_forwarding_prep_0 + 120 31 CoreFoundation 0x00007fff86d9fa6c __invoking___ + 140 32 CoreFoundation 0x00007fff86d9f8fe -[NSInvocation invoke] + 286 33 CoreFoundation 0x00007fff86dbad56 -[NSInvocation invokeWithTarget:] + 54 34 CoreFoundation 0x00007fff86d9e382 ___forwarding___ + 514 35 CoreFoundation 0x00007fff86d9e0f8 _CF_forwarding_prep_0 + 120 36 CoreFoundation 0x00007fff86d9fa6c __invoking___ + 140 37 CoreFoundation 0x00007fff86d9f8fe -[NSInvocation invoke] + 286 38 ViewBridge 0x00007fff8d81930b withHintInProgress + 501 39 ViewBridge 0x00007fff8d819091 __deferNSXPCInvocationOntoMainThread_block_invoke_2 + 220 40 ViewBridge 0x00007fff8d7b7b4f +[NSViewServiceApplication withHostPID:invoke:] + 46 41 ViewBridge 0x00007fff8d818f5f __deferNSXPCInvocationOntoMainThread_block_invoke + 129 42 ViewBridge 0x00007fff8d818b6a __deferBlockOntoMainThread_block_invoke_2 + 448 43 CoreFoundation 0x00007fff86dc34ac __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 44 CoreFoundation 0x00007fff86da2d05 __CFRunLoopDoBlocks + 341 45 CoreFoundation 0x00007fff86da2a6b __CFRunLoopRun + 2347 46 CoreFoundation 0x00007fff86da1ed8 CFRunLoopRunSpecific + 296 47 HIToolbox 0x00007fff96adf935 RunCurrentEventLoopInMode + 235 48 HIToolbox 0x00007fff96adf76f ReceiveNextEventCommon + 432 49 HIToolbox 0x00007fff96adf5af _BlockUntilNextEventMatchingListInModeWithFilter + 71 50 AppKit 0x00007fff921abdf6 _DPSNextEvent + 1067 51 AppKit 0x00007fff921ab226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454 52 ViewBridge 0x00007fff8d7b8b21 -[NSViewServiceApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 73 53 AppKit 0x00007fff9219fd80 -[NSApplication run] + 682 54 AppKit 0x00007fff92169368 NSApplicationMain + 1176 55 libxpc.dylib 0x00007fff99b0c194 _xpc_objc_main + 795 56 libxpc.dylib 0x00007fff99b0abbe xpc_main + 494 57 ViewBridge 0x00007fff8d7de683 xpc_connection_handler + 0 58 ViewBridge 0x00007fff8d7bc9d9 NSViewServiceApplicationMain + 2818 59 com.apple.dt.Xcode.PlaygroundStub-macosx 0x0000000102d3fb5e main + 94 60 libdyld.dylib 0x00007fff942be5ad start + 1 61 ??? 0x0000000000000001 0x0 + 1 ) Version: Xcode 7.3.1 (7D1014) OS X 10.11.5
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!