<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 20, 2014 at 7:41 AM, Allan Odgaard <span dir="ltr"><<a href="mailto:mailinglist@textmate.org" target="_blank">mailinglist@textmate.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 20 Oct 2014, at 12:38, Hans-Jörg Bibiko wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
I'm just testing my new bundle on MacOSX 10.7.5 with TM 2.0-beta-1. I'm using for completion the DIALOG2 command x-insert, but after execution TM crashes with this:<br></span>
[…]<span class=""><br>
objc_msgSend() selector name: retain<br>
objc[1241]: garbage collection is OFF<br>
<br>
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread<br>
0   libobjc.A.dylib                     0x00007fff864f7e90 objc_msgSend + 16<br>
1   com.macromates.dialog2              0x000000011182d52b insert_snippet(NSString*) + 254<br>
</span></blockquote>
<br>
If I symbolicate the report then it points to this line <a href="https://github.com/textmate/dialog/blob/master/Commands/Utilities/TextMate.mm#L103" target="_blank">https://github.com/textmate/<u></u>dialog/blob/master/Commands/<u></u>Utilities/TextMate.mm#L103</a><span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On MacOSX 10.9.5 it works perfectly.<br>
<br>
Any hints?<br>
</blockquote>
<br></span>
This is most likely related to ARC on 10.7, the Dialog plug-in was updated to ARC last month: <a href="https://github.com/textmate/dialog/commit/fff3e32087524c020c774942f63ef0b16b5e2e7c" target="_blank">https://github.com/textmate/<u></u>dialog/commit/<u></u>fff3e32087524c020c774942f63ef0<u></u>b16b5e2e7c</a><br>
<br>
Do you have a build environment on 10.7? If so, it would be nice if you could insert an NSLog with all the objects involved in that line and see if anything pops out, and if the log statements are shown, i.e. that it actually is this line causing the crash.<br>
<br>
ARC would cause objects involved in that line to be retained (I think), but that should also be safe, unless some of the objects are not actually objects, but I don’t see anything wrong there.</blockquote><div><br></div><div>Just a guess. This looks odd (<a href="https://github.com/textmate/dialog/blob/master/Commands/Utilities/TextMate.mm#L7">https://github.com/textmate/dialog/blob/master/Commands/Utilities/TextMate.mm#L7</a>) the return type for `insertSnippetWithOptions:` is declared as id, though the method returns void. Maybe ARC is calling retain expecting it to return an object.  Unfortunately, I cannot test this neither. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
I don’t have 10.7 available myself.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/<u></u>listinfo/textmate</a></div></div></blockquote></div><br></div></div>