LLDB: <extracting data from value failed>
| Originator: | heath.borders | ||
| Number: | rdar://29198627 | Date Originated: | 10-Nov-2016 08:50 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Version 8.1 (8B62) |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
While debugging my iMessage Extension in LLDB, printing an object from -[NSUserDefaults objectForKey:] emits `<extracting data from value failed>`.
Steps to Reproduce:
Debug an iMessage Extension in LLDB, which uses a app group named "group.com.example", which it shares with its host app. Ensure the iMessage Extension has the following code:
NSUserDefaults * _Nullable sharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.example"];
[sharedDefaults setObject:@{ @"foo" : @[ @{ @"bar" : @"baz", }, ], }];
NSLog(@"sharedDefaults foo: %@", [sharedDefaults objectForKey:@"foo"]); // set a breakpoint here
At the breakpoint, run `po [sharedDefaults objectForKey:@"foo"]`
Expected Results:
LLDB prints:
(
{
"bar" = @"baz";
},
)
Actual Results:
LLDB prints:
<extracting data from value failed>
Regression:
Notes:
If I instead run the following in LLDB, I get the expected result:
po [NSArray arrayWithArray:[sharedDefaults objectForKey:@"foo"]]
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!