<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br>I just got it. <div><div><br></div><div>NSArray *arr = [NSArray array];</div></div><div><br></div><div>following code will trigger assertion:</div><div><br></div><div>SBValue res = frame.EvaluateExpression("[arr respondsToSelector:@selector(objectEnumerator)]");</div><div>if (res.IsValid()) {</div><div> res.GetTypeName(); // <-- here</div><div>}</div><div><br></div><div>backtrace:</div><div><div>#0 0x00007fff817aa9ce in __semwait_signal_nocancel ()</div><div>#1 0x00007fff817aa8d0 in nanosleep$NOCANCEL ()</div><div>#2 0x00007fff818073ce in usleep$NOCANCEL ()</div><div>#3 0x00007fff81826a00 in abort ()</div><div>#4 0x00007fff818139bc in __assert_rtn ()</div><div>#5 0x00000001002e5f43 in lldb_private::ClangASTType::GetTypeNameForQualType ()</div><div>#6 0x00000001002e60f1 in lldb_private::ClangASTType::GetConstTypeName ()</div><div>#7 0x0000000100259bf9 in lldb_private::ValueObjectConstResult::GetTypeName ()</div><div>#8 0x0000000100189607 in lldb::SBValue::GetTypeName ()</div><div>#9 0x000000010006f29e in jetcidr::EvaluatedValue2LLDBValue (pair=@0x101f86a78, lldb_val=0x1034c5050) at ResponseFactory.h:52</div><div>#10 0x000000010007b7cc in jetcidr::ResponseFactory::EvaluateExpression (this=0x103407910, pair=@0x101f86b20) at /Users/zajac/Projects/ULTIMATE/CIDR/LLDBProtobufFrontend/LLDBProtobufFrontend/src/ResponseFactory.cpp:92</div><div>#11 0x000000010006b8f1 in jetcidr::ProtobufHandler::HandleEvaluateExpression (this=0x1031001d0, req=@0x1034ade10) at /Users/zajac/Projects/ULTIMATE/CIDR/LLDBProtobufFrontend/LLDBProtobufFrontend/src/ProtobufHandler.cpp:156</div><div>#12 0x000000010006c2cf in jetcidr::ProtobufHandler::ProcessMessage (this=0x1031001d0, req=@0x101f86c50) at /Users/zajac/Projects/ULTIMATE/CIDR/LLDBProtobufFrontend/LLDBProtobufFrontend/src/ProtobufHandler.cpp:236</div><div>#13 0x000000010006c620 in __HandleHasBytesAvailable_block_invoke_0 (.block_descriptor=<value temporarily unavailable, due to optimizations>) at /Users/zajac/Projects/ULTIMATE/CIDR/LLDBProtobufFrontend/LLDBProtobufFrontend/src/ProtobufHandler.cpp:261</div><div>#14 0x00007fff8176cfbb in dispatch_barrier_sync_f ()</div><div>#15 0x000000010006c42f in jetcidr::ProtobufHandler::HandleHasBytesAvailable (this=0x1031001d0, r_source=0x103100000) at /Users/zajac/Projects/ULTIMATE/CIDR/LLDBProtobufFrontend/LLDBProtobufFrontend/src/ProtobufHandler.cpp:252</div><div>#16 0x00000001000699b1 in __StartHandlingClient_block_invoke_05 (.block_descriptor=<value temporarily unavailable, due to optimizations>) at /Users/zajac/Projects/ULTIMATE/CIDR/LLDBProtobufFrontend/LLDBProtobufFrontend/src/ProtobufServer.cpp:76</div><div>#17 0x00007fff817533f3 in _dispatch_source_invoke ()</div><div>#18 0x00007fff817527b4 in _dispatch_queue_invoke ()</div><div>#19 0x00007fff817528dc in _dispatch_queue_drain ()</div><div>#20 0x00007fff81752734 in _dispatch_queue_invoke ()</div><div>#21 0x00007fff817522de in _dispatch_worker_thread2 ()</div><div>#22 0x00007fff81751c08 in _pthread_wqthread ()</div><div>#23 0x00007fff81751aa5 in start_wqthread ()</div></div><div><br></div><div>This happened for me only in 32-bit mode when running app in simulator and attaching to process by pid.</div></div></blockquote><div><br></div><div>Do you mean you tried all other possible combinations (64-bit, not attaching by PID, ...) and the only way to get the crash is "32-bit in simulator(which simulator? iOS?) attaching by PID"?</div><div><br></div><div>If so, trying to reproduce this consistently might take some effort. If, on the other side, this happens in other possible scenarios, I bet it is an incomplete type problem.</div><div>Which version of LLDB are you using?</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>But(!): </div><div><div><br></div><div>(lldb) p [arr respondsToSelector:@selector(objectEnumerator)]</div><div>error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0xffffffff).</div><div>The process has been returned to the state before execution.</div></div><div><br></div><div>After this lldb won't crash.</div><div><br></div><div>What am I doing wrong?</div><div><br></div></div></blockquote><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On 09.08.2011, at 2:38, Enrico Granata wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Would you be able to provide example commands that trigger this?<div>This looks like some of your types are not completed, but it's hard to tell which ones and why without something reproducible<br><div><br><div><div>On Aug 8, 2011, at 3:34 PM, Andrey Zaytsev wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello everyone!<br>I'm very often getting this assertion when evaluating some sort of expressions:<br><br>Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer"), function getCommonPtr, file /SourceCache/lldb/lldb-69/llvm/tools/clang/include/clang/AST/Type.h, line 404.<br><br>This assertion fires every time I'm evaluating something like this: "[0x12345.. someSelector]". I'm stuck with it because I need values of this kind of expressions to display ns-collections.<br><br>Thanks for your consideration.<br>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br></div></blockquote></div><div><br></div>Thanks,<br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="font-family: Helvetica; font-size: medium; "><i>Enrico Granata</i></div></div></div><span class="Apple-style-span" style="font-family: 'Myriad Set'; font-size: 13px; ">✆ </span><span class="Apple-style-span" style="font-style: normal; font-family: 'Lucida Grande'; font-size: 11px; ">408.974.5572</span><span class="Apple-style-span" style="font-style: normal; font-size: 12px; color: rgb(92, 92, 92); font-family: 'Myriad Set'; "><span class="Apple-style-span" style="font-size: 13px; "><font class="Apple-style-span" size="3" style="font-size: 11px; "><span class="Apple-style-span" style="font-size: 12px; "> | <span class="Apple-style-span" style="font-family: Helvetica; font-size: 11px; "><font class="Apple-style-span" size="4" style="font-size: 13px; "><font class="Apple-style-span" color="#5C5C5C"><font class="Apple-style-span" face="'Myriad Set'">✉ </font></font></font></span></span></font></span></span><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">egranata@<font class="Apple-style-span" color="#F80A17"></font>.com</span></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br></span></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br></span></div><br class="Apple-interchange-newline">
</div>
<br></div></div></div></blockquote></div><br></div></div>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="font-family: Helvetica; font-size: medium; "><i>Enrico Granata</i></div></div></span></div></span><span class="Apple-style-span" style="font-style: normal; color: rgb(92, 92, 92); font-family: 'Myriad Set'; font-size: 13px; ">✆ </span><span class="Apple-style-span" style="font-style: normal; font-family: 'Lucida Grande'; font-size: 11px; ">408.974.5572</span><span class="Apple-style-span" style="font-style: normal; font-size: 12px; color: rgb(92, 92, 92); font-family: 'Myriad Set'; "><span class="Apple-style-span" style="font-size: 13px; "><font class="Apple-style-span" size="3" style="font-size: 11px; "><span class="Apple-style-span" style="font-size: 12px; "> | <span class="Apple-style-span" style="font-family: Helvetica; font-size: 11px; "><font class="Apple-style-span" size="4" style="font-size: 13px; "><font class="Apple-style-span" color="#5C5C5C"><font class="Apple-style-span" face="'Myriad Set'">✉ </font></font></font></span></span></font></span></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">egranata@<font class="Apple-style-span" color="#F80A17"></font>.com</span></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br></span></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></div></div></div></body></html>