On Mon, Oct 20, 2014 at 7:41 AM, Allan Odgaard <mailinglist@textmate.org> wrote:
On 20 Oct 2014, at 12:38, Hans-Jörg Bibiko wrote:

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:
[…]
objc_msgSend() selector name: retain
objc[1241]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                     0x00007fff864f7e90 objc_msgSend + 16
1   com.macromates.dialog2              0x000000011182d52b insert_snippet(NSString*) + 254

If I symbolicate the report then it points to this line https://github.com/textmate/dialog/blob/master/Commands/Utilities/TextMate.mm#L103

On MacOSX 10.9.5 it works perfectly.

Any hints?

This is most likely related to ARC on 10.7, the Dialog plug-in was updated to ARC last month: https://github.com/textmate/dialog/commit/fff3e32087524c020c774942f63ef0b16b5e2e7c

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.

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.

Just a guess. This looks odd (https://github.com/textmate/dialog/blob/master/Commands/Utilities/TextMate.mm#L7) 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. 

 

I don’t have 10.7 available myself.


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate