topfunky / PeepOpen-Issues

Bug reports and feature requests for the PeepOpen application
http://peepcode.com/products/peepopen
41 stars 1 forks source link

No longer works #246

Closed xnzac closed 3 years ago

xnzac commented 13 years ago

PeepOpen hasn't worked for me for a while. Only just getting around to reporting it.

I'm running: Textmate 1.5.10 (1623) PeepOpen 0.3.5 OS X Lion (although I'm pretty sure PeepOpen was broken on Snow Leopard too)

When I press Apple-T the Open File dialogue appears, showing the 'Read Files..' progress bar then soon after crashes. I've tried reinstalling the plugin from the preference dialogue but to no avail.

Any ideas?

Zac

topfunky commented 13 years ago

It's curious that it opens, then crashes. That could actually be a good thing.

Is there anything in Console.app?

Does this happen with all projects or just one?

xnzac commented 13 years ago

Thanks for the reply.

It only crashes with one fairly large and old project. Other / newer projects work fine.

Here's the relevant console.app dump:

01/08/2011 17:15:34.990 TextMate: PeepOpen: Opening URL peepopen:///Users/zac/code/proj-name/trunk?editor=TextMate 01/08/2011 17:15:38.982 [0x0-0x145145].com.topfunky.PeepOpen: unknown: warning: already initialized constant KInternetEventClass 01/08/2011 17:15:38.982 [0x0-0x145145].com.topfunky.PeepOpen: unknown: warning: already initialized constant KAEGetURL 01/08/2011 17:15:38.982 [0x0-0x145145].com.topfunky.PeepOpen: unknown: warning: already initialized constant KeyDirectObject 01/08/2011 17:15:39.537 PeepOpen: Using Directory as Project Root: /Users/zac/code/proj-name/trunk 01/08/2011 17:15:39.833 PeepOpen: An uncaught exception was raised 01/08/2011 17:15:39.847 PeepOpen: undefined method map' for nil:NilClass (NoMethodError) 01/08/2011 17:15:40.002 PeepOpen: ( 0 CoreFoundation 0x00007fff9221a986 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff8fbe7d5e objc_exception_throw + 43 2 libmacruby.dylib 0x00000001001dc4ee rb_vm_raise + 430 3 libmacruby.dylib 0x00000001000bdf19 rb_exc_raise + 9 4 libmacruby.dylib 0x00000001001e0c62 rb_vm_method_missing + 562 5 libmacruby.dylib 0x00000001001cbe24 rb_vm_dispatch + 7828 6 libmacruby.dylib 0x00000001001cf090 rb_vm_respond_to2 + 736 7 libmacruby.dylib 0x00000001001ca598 rb_vm_dispatch + 1544 8 PathOperation.rbo 0x00000001048a71d4 PathOperation.rbo + 4564 9 PathOperation.rbo 0x00000001048a8d43 MREP_AA1EDE6FEE0E4049B20647600849D0FE + 6259 10 Foundation 0x00007fff96da30b0 -[__NSOperationInternal start] + 705 11 Foundation 0x00007fff96db63d2 ____NSOQSchedule_block_invoke_2 + 124 12 libdispatch.dylib 0x00007fff8d60d90a _dispatch_call_block_and_release + 18 13 libdispatch.dylib 0x00007fff8d60e7e9 _dispatch_worker_thread2 + 255 14 libsystem_c.dylib 0x00007fff8e3bf3da _pthread_wqthread + 316 15 libsystem_c.dylib 0x00007fff8e3c0b85 start_wqthread + 13 ) 01/08/2011 17:15:40.003 PeepOpen: *** Terminating app due to uncaught exception 'NoMethodError', reason: 'undefined methodmap' for nil:NilClass (NoMethodError) ' *\ First throw call stack: ( 0 CoreFoundation 0x00007fff9221a986 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff8fbe7d5e objc_exception_throw + 43 2 libmacruby.dylib 0x00000001001dc4ee rb_vm_raise + 430 3 libmacruby.dylib 0x00000001000bdf19 rb_exc_raise + 9 4 libmacruby.dylib 0x00000001001e0c62 rb_vm_method_missing + 562 5 libmacruby.dylib 0x00000001001cbe24 rb_vm_dispatch + 7828 6 libmacruby.dylib 0x00000001001cf090 rb_vm_respond_to2 + 736 7 libmacruby.dylib 0x00000001001ca598 rb_vm_dispatch + 1544 8 PathOperation.rbo 0x00000001048a71d4 PathOperation.rbo + 4564 9 PathOperation.rbo 0x00000001048a8d43 MREP_AA1EDE6FEE0E4049B20647600849D0FE + 6259 10 Foundation 0x00007fff96da30b0 -[NSOperationInternal start] + 705 11 Foundation 0x00007fff96db63d2 __NSOQSchedule_block_invoke_2 + 124 12 libdispatch.dylib 0x00007fff8d60d90a _dispatch_call_block_and_release + 18 13 libdispatch.dylib 0x00007fff8d60e7e9 _dispatch_worker_thread2 + 255 14 libsystem_c.dylib 0x00007fff8e3bf3da _pthread_wqthread + 316 15 libsystem_c.dylib 0x00007fff8e3c0b85 start_wqthread + 13 )

Does that mean anything to you?

topfunky commented 13 years ago

That's confusing. It seems that it's a Subversion project, but other than that it appears to be finding the correct directory to use as the root of the project.

flyingoctopus commented 13 years ago

Hey @topfuny, don't know if this falls under this issue, but since upgrading to Lion (currently runningLion 10.7.1 and will be used with MacVim eventually) PeepOpen doesn't even show up in the menu bar at all. It seems to show up in the Activity Monitor:

Activity Monitor wtf

Andthe console log shows the following:

11-09-30 11:47:31.831 AM [0x0-0x36036].com.topfunky.PeepOpen: unknown: warning: already initialized constant KInternetEventClass 11-09-30 11:47:31.831 AM [0x0-0x36036].com.topfunky.PeepOpen: unknown: warning: already initialized constant KAEGetURL 11-09-30 11:47:31.831 AM [0x0-0x36036].com.topfunky.PeepOpen: unknown: warning: already initialized constant KeyDirectObject

omg wtf bbq

loe commented 12 years ago

I'm getting this issue every time on several large projects.

loe commented 12 years ago

Tarball of crash reports: https://ws.onehub.com/files/tntwwxip

borgand commented 12 years ago

[PATCH]

Mocking around with editor support (open peepopen://Users/laas/...), PeepOpen crashes on me to, both 0.3.5 and 0.3.6 versions with the same above error message:

*** Terminating app due to uncaught exception 'NoMethodError', reason: 'undefined method `map' for nil:NilClass (NoMethodError)
'

Debugging the issue in Xcode and locating it to PathOperation.rb:28 I came to a conclusion that this is because I was giving the URL incorrectly and NSFileManager#contentsOfDirectoryAtPath:error: returns nil if any errors occur accessing the directory and PathOperation.rb does not handle it.

A quick and dirty fix sure enough fixes the issue:

--- Classes/Operations/PathOperation.rb-orig    2012-02-27 12:30:40.000000000 +0200
+++ Classes/Operations/PathOperation.rb 2012-02-27 12:30:49.000000000 +0200
@@ -25,7 +25,7 @@

   def main
     fileManager = NSFileManager.defaultManager
-    filenames = fileManager.contentsOfDirectoryAtPath(@projectRoot, error:nil).map {|f| @projectRoot.stringByAppendingPathComponent(f) }
+    filenames = fileManager.contentsOfDirectoryAtPath(@projectRoot, error:nil).to_a.map {|f| @projectRoot.stringByAppendingPathComponent(f) }

     index = 0
     recordsSize = @fuzzyTableViewController.records.size
@@ -44,7 +44,7 @@

       if File.directory?(filename)
         # TODO: Should probably ignore all dot directories
-        fileManager.contentsOfDirectoryAtPath(filename, error:nil).map {|f|
+        fileManager.contentsOfDirectoryAtPath(filename, error:nil).to_a.map {|f|
           filenames.insert(index, filename.stringByAppendingPathComponent(f))
         }
         break if isCancelled

Of course the correct way would be to handle the actual error instead, but in my case PeepOpen now displays an error message saying that it "couldn't find a project" and tries to display parent folder (which fails silently if again error happens). This is enough for me.

PS. With PeepOpen being paid software, is it OK for me to post code samples and patches here or should I send them directly to you guys?