LLDB can't print variables (evaluate expression) inside some dispatch blocks.

Originator:volodymyr.gorlov
Number:rdar://24106425 Date Originated:08-Jan-2016
Status:Duplicate of 22738516 Resolved:
Product:Xcode Product Version:7.2 (7C68)
Classification:Developer Tools Reproducible:100%
 
Summary:
In application with asynchronous code, while debugging, LLDB can't print contents of variables (evaluate expression). It fails to resolve expression when typing "po variableName" or "p variableName".
Instead of evaluating expression lldb returns error:

error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x81000).
The process has been returned to the state before expression evaluation.

Note that in such cases lldb command "fr v" still working properly.

Steps to Reproduce:
1. Open LLDBDemo project from https://github.com/vgorloff/Radar24106425.
2. Disable breakpoints (there should be shared breakpoints)
3. Launch application with iPhone 6s simulator.
4. Enable breakpoints (there should be shared breakpoints. Other vise set breakpoint "po someValue" on every line where Swift "print" function is used).
5. Launch application with iPhone 6s simulator.

Expected Results:
In Xcode console there should be output produced by application (using print statements) and output produced by breakpoint evaluation.

Something like this:

"A"
A
-----

"A+B"
A+B
-----

"A+B"
A+B
-----

"A+B+C"
A+B+C
-----

"A+B+C"
A+B+C
-----

Actual Results:
In Xcode console there is an output produced by application (using print statements) and output produced by breakpoint evaluation. But some breakpoints can't evaluate expression and fail with message:

error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x81000).
The process has been returned to the state before expression evaluation.

Something like this:

error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x81000).
The process has been returned to the state before expression evaluation.
A

-----
"A+B"
A+B

-----
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x81000).
The process has been returned to the state before expression evaluation.
A+B
-----

"A+B+C"
A+B+C
-----

"A+B+C"
A+B+C
-----

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!