Xcode 7.3: Accessing specular field of MDLScatteringFunction crashes playground (OS X and iOS)
| Originator: | iosdeveloperzone | ||
| Number: | rdar://26190497 | Date Originated: | 10-May-2016 12:20 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7.3 (7D175) |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary:
Provide a descriptive summary of the issue.
Steps to Reproduce:
1) Create an iOS playground
2) Paste in the following code:
import UIKit
import ModelIO
let scatteringFunction = MDLScatteringFunction()
print(scatteringFunction.specular)
Expected Results:
The playground should print the value of the specular field and, you know, not crash.
Actual Results:
The playground crashes with the following message on the console:
5/10/16 12:14:59.856 AM com.apple.dt.Xcode.Playground[13137]: IDEPlaygroundExecutionSessionThread(pid=13330) IDEPlaygroundExecution: Playground execution failed: Error Domain=IDEPlaygroundErrorDomain Code=3 "Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x0).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation." UserInfo={IDEPlaygroundExprCrashDate=2016-05-10 07:14:59 +0000, IDEPlaygroundExprCrashBacktrace=* thread #1: tid = 0x131b2a, 0x0000000111b25b31 libswiftCore.dylib`swift::_swift_getClass(void const*) + 33, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x0000000111b25b31 libswiftCore.dylib`swift::_swift_getClass(void const*) + 33
frame #1: 0x0000000111af83d3 libswiftCore.dylib`findDynamicValueAndType(swift::OpaqueValue*, swift::Metadata const*, swift::OpaqueValue*&, swift::Metadata const*&, bool&) + 179
frame #2: 0x0000000111af977c libswiftCore.dylib`_dynamicCastToExistential(swift::OpaqueValue*, swift::OpaqueValue*, swift::Metadata const*, swift::ExistentialTypeMetadata const*, swift::DynamicCastFlags) + 60
frame #3: 0x0000000111af8d8f libswiftCore.dylib`swift_dynamicCast + 671
frame #4: 0x00000001119deaf1 libswiftCore.dylib`generic specialization <protocol<>, Swift._TeeStream<Swift.String, Swift._Stdout> with Swift._TeeStream<Swift.String, Swift._Stdout> : Swift.OutputStreamType in Swift> of Swift._print_unlocked <A, B where B: Swift.OutputStreamType> (A, inout B) -> () + 433
frame #5: 0x0000000111a73185 libswiftCore.dylib`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed and Exploded, Arg[2] = Owned To Guaranteed and Exploded> of generic specialization <Swift._TeeStream<Swift.String, Swift._Stdout> with Swift._TeeStream<Swift.String, Swift._Stdout> : Swift.OutputStreamType in Swift> of Swift._print <A where A: Swift.OutputStreamType> (Swift.Array<protocol<>>, separator : Swift.String, terminator : Swift.String, toStream : inout A) -> () + 373
frame #6: 0x0000000111a73652 libswiftCore.dylib`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed and Exploded, Arg[2] = Owned To Guaranteed and Exploded> of Swift.print (Swift.Array<protocol<>>, separator : Swift.String, terminator : Swift.String) -> () + 194
frame #7: 0x00000001119e19bd libswiftCore.dylib`Swift.print (Swift.Array<protocol<>>, separator : Swift.String, terminator : Swift.String) -> () + 29
frame #8: 0x000000011b0d5995 $__lldb_expr14`main + 661 at ModelIO.playground:7
frame #9: 0x000000010f4c2ab0 ModelIO
frame #10: 0x000000010f4c59a1 ModelIO`reabstraction thunk helper from @callee_owned () -> (@unowned ()) to @callee_owned (@in ()) -> (@out ()) + 17
frame #11: 0x000000010f4c5401 ModelIO`partial apply forwarder for reabstraction thunk helper from @callee_owned () -> (@unowned ()) to @callee_owned (@in ()) -> (@out ()) + 81
frame #12: 0x000000010f4c59d0 ModelIO`reabstraction thunk helper from @callee_owned (@in ()) -> (@out ()) to @callee_owned () -> (@unowned ()) + 32
frame #13: 0x000000010f4c5a07 ModelIO`reabstraction thunk helper from @callee_owned () -> (@unowned ()) to @callee_unowned @convention(block) () -> (@unowned ()) + 39
frame #14: 0x000000010fee42ec CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
frame #15: 0x000000010fed9f75 CoreFoundation`__CFRunLoopDoBlocks + 341
frame #16: 0x000000010fed96d2 CoreFoundation`__CFRunLoopRun + 850
frame #17: 0x000000010fed90f8 CoreFoundation`CFRunLoopRunSpecific + 488
frame #18: 0x0000000116a9ead2 GraphicsServices`GSEventRunModal + 161
frame #19: 0x0000000110374f09 UIKit`UIApplicationMain + 171
frame #20: 0x000000010f4c2f39 ModelIO`main + 1161
frame #21: 0x0000000112d0492d libdyld.dylib`start + 1
, IDEPlaygroundExprCrashMessage=Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x0).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation., IDEPlaygroundExprCrashLineNumber=6, NSLocalizedDescription=Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x0).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.}
Regression:
Unknown occurs on both iOS and OS X.
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!