Hi-
I'm a newcomer to TextMate, and making a start at converting the Ruby support to version 1.9. Most of what I've run into are small niggles, but this one seems to be a little harder to fix. It crops up when I ^H on a Ruby method name that is implemented in more than one class, and TextMate wants to put up a selection menu.
My computer: Darwin spinoza 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun 9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386
Anyway, using a simpler piece of code: http://pastie.textmate.org/20239 this works fine in 1.8.6. In 1.9 I get:
Users/cturner/Desktop/pastie-20239.rb:15: [BUG] Segmentation fault ruby 1.9.0 (2007-12-25 revision 14709) [i686-darwin9.4.0]
-- control frame ---------- c:0004 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :to_plist c:0003 p:0136 s:0009 b:0009 l:000008 d:000008 TOP /Users/cturner/Desktop/pastie-20239.rb:15 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP <dummy toplevel>:25428 --------------------------- DBG> : "/Users/cturner/Desktop/pastie-20239.rb:15:in `<main>'" -- backtrace of native function call (Use addr2line) -- 0xdb4a6 0x1b7ec 0x1b82b 0x98ec1 0x93ad909b 0xffffffff 0x9719736e 0x1d7705 0x1d753f 0x1d7769 0x9e898 0x1d781d 0x1d7552 0x1d73e5 0xce585 0xd1930 0xd57c4 0xd9b3c 0xd9e09 0x1eca4 0x2380a 0x239f 0x2306 -------------------------------------------------------
So the issue seems to be some interaction between Ruby 1.9 and the plist.bundle, which is compiled, and I have no source access to. Any thoughts on how to proceed? I've attached the crash log below.
Thanks for your fine editor, which is convincing me to switch from Aquamacs!
Best, Charles Turner
-------------------------------------------------------
Process: ruby [10834] Path: /usr/local/bin/ruby Identifier: ruby Version: ??? (???) Code Type: X86 (Native) Parent Process: ruby [10802]
Date/Time: 2008-08-24 08:50:43.420 -0400 OS Version: Mac OS X 10.5.4 (9E17) Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x000000006d657449 Crashed Thread: 0
Thread 0 Crashed: 0 libSystem.B.dylib 0x93adab9e __kill + 10 1 libSystem.B.dylib 0x93b51ec2 raise + 26 2 libSystem.B.dylib 0x93b6147f abort + 73 3 ruby 0x0001b830 rb_compile_bug + 0 4 ruby 0x00098ec1 sigsegv + 113 5 libSystem.B.dylib 0x93ad909b _sigtramp + 43 6 ??? 0xffffffff 0 + 4294967295 7 com.apple.CoreFoundation 0x9719736e CFStringCreateWithBytes + 94 8 plist.bundle 0x001d7705 convertString + 162 (plist.c:463) 9 plist.bundle 0x001d753f convertObject + 183 (plist.c:439) 10 plist.bundle 0x001d7769 iterateHash + 17 (plist.c:474) 11 ruby 0x0009e898 st_foreach + 56 12 plist.bundle 0x001d781d convertHash + 109 (plist.c:487) 13 plist.bundle 0x001d7552 convertObject + 202 (plist.c:440) 14 plist.bundle 0x001d73e5 obj_to_plist + 167 (plist.c:413) 15 ruby 0x000ce585 call_cfunc + 837 (vm_insnhelper.c:281) 16 ruby 0x000d1930 vm_call_method + 1008 (vm_insnhelper.c:373) 17 ruby 0x000d57c4 vm_eval + 14932 (insns.def:1050) 18 ruby 0x000d9b3c vm_eval_body + 1004 (vm.c:1149) 19 ruby 0x000d9e09 rb_iseq_eval + 105 (vm.c:1358) 20 ruby 0x0001eca4 ruby_exec_node + 228 21 ruby 0x0002380a ruby_run_node + 90 22 ruby 0x0000239f main + 95 (main.c:41) 23 ruby 0x00002306 start + 54
Thread 1: 0 libSystem.B.dylib 0x93a7368e __semwait_signal + 10 1 ruby 0x000dc8be thread_timer + 62 (thread_pthread.c:563) 2 libSystem.B.dylib 0x93a9d6f5 _pthread_start + 321 3 libSystem.B.dylib 0x93a9d5b2 thread_start + 34
Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x93b6143f ecx: 0xbfffd76c edx: 0x93adab9e edi: 0x0000000f esi: 0xbfffd814 ebp: 0xbfffd788 esp: 0xbfffd76c ss: 0x0000001f efl: 0x00000282 eip: 0x93adab9e cs: 0x00000007 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0xb00c5c58
Binary Images: 0x1000 - 0x119fff +ruby ??? (???) <485833533248f0049ec4f48d1a224df7> /usr/local/bin/ruby 0x181000 - 0x183ff7 +tm_interactive_input.dylib ??? (???) /Library/Application Support/TextMate/Support/lib/tm_interactive_input.dylib 0x1d6000 - 0x1d7fff +plist.bundle ??? (???) /Library/Application Support/TextMate/Support/lib/osx/plist.bundle 0x8fe00000 - 0x8fe2da53 dyld 96.2 (???) <14ac3b684fa5a31932fa89c4bba7a29b> /usr/lib/dyld 0x91957000 - 0x9195bfff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x91bc8000 - 0x91bf3fe7 libauto.dylib ??? (???) <42d8422dc23a18071869fdf7b5d8fab5> /usr/lib/libauto.dylib 0x92920000 - 0x92927fe9 libgcc_s.1.dylib ??? (???) <28a7cbc3a5ca2982d124668306f422d9> /usr/lib/libgcc_s.1.dylib 0x92b0c000 - 0x92bebfff libobjc.A.dylib ??? (???) <a53206274b6c2d42691f677863f379ae> /usr/lib/libobjc.A.dylib 0x93142000 - 0x9319fffb libstdc++.6.dylib ??? (???) <6106b1f2b0b303b06ae476253dbb5f3f> /usr/lib/libstdc++.6.dylib 0x93a6b000 - 0x93bcbff3 libSystem.B.dylib ??? (???) <98fc91f31f185411ddc46d3225e9af55> /usr/lib/libSystem.B.dylib 0x942e3000 - 0x9441bff7 libicucore.A.dylib ??? (???) <5031226ea28b371d8dfdbb32acfb48b5> /usr/lib/libicucore.A.dylib 0x9710a000 - 0x9723cfff com.apple.CoreFoundation 6.5.3 (476.14) <7ef7f5db09ff6dd0135a6165872803cc> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0xfffe8000 - 0xfffebfff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib 0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib
On 24 Aug 2008, at 15:11, Charles Turner wrote:
[...] So the issue seems to be some interaction between Ruby 1.9 and the plist.bundle, which is compiled, and I have no source access to. Any thoughts on how to proceed?
The source for the plist bundle can be found here: http://macromates.com/svn/Bundles/trunk/Tools/plist/
We are of course interested in changes required to make things work with Ruby 1.9.
On Sun, 24 Aug 2008 18:18:41 +0200, Allan Odgaard wrote:
The source for the plist bundle can be found here: http://macromates.com/svn/Bundles/trunk/Tools/plist/
Thanks so much for this pointer, and also the kind educational discount.
We are of course interested in changes required to make things work with Ruby 1.9.
When things calm down a bit, I'll send along what I've got.
Best, Charles
On Sun, 24 Aug 2008 14:21:42 -0400, Charles Turner wrote:
On Sun, 24 Aug 2008 18:18:41 +0200, Allan Odgaard wrote:
The source for the plist bundle can be found here: http://macromates.com/svn/Bundles/trunk/Tools/plist/
Allan-
It was a simple fix: RSTRING(buffer)->ptr becomes RSTRING_PTR(buffer). Same for RSTRING_LEN and RHASH_TBL.
Seems to work as advertised now...
Thanks again!
Charles