Hi,
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:
Process: TextMate [1241] Path: /Applications/TextMate.app/Contents/MacOS/TextMate Identifier: com.macromates.TextMate.preview Version: 2.0-beta.1 (1) Code Type: X86-64 (Native) Parent Process: launchd [175]
Date/Time: 2014-10-20 12:34:06.072 +0200 OS Version: Mac OS X 10.7.5 (11G63) Report Version: 9
Interval Since Last Report: 177914 sec Crashes Since Last Report: 15 Per-App Interval Since Last Report: 5892 sec Per-App Crashes Since Last Report: 4 Anonymous UUID: D3F953DB-35AC-4B9F-A64C-38C36DD15434
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010
VM Regions Near 0x10: --> __TEXT 000000010e666000-000000010e69a000 [ 208K] r-x/rwx SM=COW /Applications/TextMate.app/Contents/MacOS/TextMate
Application Specific Information: 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 2 com.macromates.dialog2 0x0000000111823d67 -[TMDInsertCommands handleCommand:] + 137 3 com.apple.CoreFoundation 0x00007fff8048870d -[NSObject performSelector:withObject:] + 61 4 com.macromates.dialog2 0x00000001118213ca -[Dialog2 dispatch:] + 182 5 com.apple.Foundation 0x00007fff838f3186 __NSFireDelayedPerform + 392 6 com.apple.CoreFoundation 0x00007fff8044d934 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20 7 com.apple.CoreFoundation 0x00007fff8044d486 __CFRunLoopDoTimer + 534 8 com.apple.CoreFoundation 0x00007fff8042de11 __CFRunLoopRun + 1617 9 com.apple.CoreFoundation 0x00007fff8042d486 CFRunLoopRunSpecific + 230 10 com.apple.HIToolbox 0x00007fff869d52bf RunCurrentEventLoopInMode + 277 11 com.apple.HIToolbox 0x00007fff869dc56d ReceiveNextEventCommon + 355 12 com.apple.HIToolbox 0x00007fff869dc3fa BlockUntilNextEventMatchingListInMode + 62 13 com.apple.AppKit 0x00007fff88290779 _DPSNextEvent + 659 14 com.apple.AppKit 0x00007fff8829007d -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135 15 com.apple.AppKit 0x00007fff8828c9b9 -[NSApplication run] + 470 16 com.apple.AppKit 0x00007fff88508eac NSApplicationMain + 867 17 com.macromates.TextMate.preview 0x000000010e681f24 main + 840 18 com.macromates.TextMate.preview 0x000000010e667ec4 start + 52
This also happens for grammars like C if you type e.g. "str", press ALT+ESC and choose a completion item.
On MacOSX 10.9.5 it works perfectly.
Any hints?
Cheers, Hans
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.m...
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/fff3e32087524c020c774942f63ef0b16b...
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.
I don’t have 10.7 available myself.
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.m...) 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
On 20 Oct 2014, at 18:14, Ronald Wampler wrote:
Just a guess. This looks odd ( https://github.com/textmate/dialog/blob/master/Commands/Utilities/TextMate.m...) 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.
That sounds very likely, sicne the crash seemed to be retain sent to a bogus object, I’ll fix the signature.