#126 ✓resolved
Samsinite

Copy from other program

Reported by Samsinite | January 23rd, 2010 @ 08:26 PM

I've have not been able to reproduce the error, but I copied text, switched over to redcar and it crashed.
Hope this helps:
/home/sam/redcar/plugins/application/lib/application/clipboard.rb:63:in check_for_changes': undefined methodjoin' for nil:NilClass (NoMethodError)

    from /home/sam/redcar/plugins/application/lib/application/clipboard.rb:41:in `length'
    from /home/sam/redcar/plugins/edit_view/lib/edit_view.rb:41:in `sensitivities'
    from /home/sam/redcar/plugins/application/lib/application/sensitivity.rb:65:in `call'
    from /home/sam/redcar/plugins/application/lib/application/sensitivity.rb:65:in `recompute'
    from /home/sam/redcar/plugins/application/lib/application/sensitivity.rb:77:in `connect_listeners'
    from /home/sam/redcar/plugins/core/lib/core/observable.rb:103:in `call'
    from /home/sam/redcar/plugins/core/lib/core/observable.rb:103:in `run_blocks'
    from /home/sam/redcar/plugins/core/lib/core/observable.rb:103:in `each'
     ... 15 levels...
    from /home/sam/redcar/plugins/core/lib/core/gui.rb:39:in `start'
    from ./bin/../lib/redcar/../../bin/../lib/redcar.rb:91:in `pump'
    from ./bin/../lib/redcar/../../bin/redcar:14

Comments and changes to this ticket

  • Roger

    Roger January 25th, 2010 @ 09:13 PM

    got this once, too...

    e:\dev\digitalarchive_trunk>E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/application/lib/application/clipboard.rb:63:in check_for_changes': undefined methodjoin' for nil:NilClass (NoMethodError)

        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/application/lib/application/clipboard.rb:41:in `length'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/edit_view/lib/edit_view.rb:41:in `sensitivities'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/application/lib/application/sensitivity.rb:65:in `call'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/application/lib/application/sensitivity.rb:65:in `recompute'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/application/lib/application/sensitivity.rb:77:in `connect_listeners'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/core/lib/core/observable.rb:103:in `call'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/core/lib/core/observable.rb:103:in `run_blocks'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/core/lib/core/observable.rb:103:in `each'
         ... 15 levels...
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/core/lib/core/gui.rb:39:in `start'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/lib/redcar/boot.rb:75:in `pump'
        from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/lib/redcar/../../bin/redcar:14
    
  • Roger

    Roger January 27th, 2010 @ 05:49 AM

    • Tag set to clipboard

    For better or worse this seemed to take care of it (without actually knowing what is going on)

      
    diff --git a/plugins/application/lib/application/clipboard.rb b/plugins/application/lib/application/clipboard.rb  
    index 07bb037..b188c32 100644  
    --- a/plugins/application/lib/application/clipboard.rb
    +++ b/plugins/application/lib/application/clipboard.rb
    @@ -59,7 +59,7 @@ module Redcar
         private
         
         def check_for_changes
    -      if controller and controller.changed?
    +      if controller and controller.changed? and @contents.length > 0
             controller.last_set = @contents.last.join("\n")
             contents = controller.get_contents
             self << contents if contents
    
    
  • Daniel Lucraft

    Daniel Lucraft January 31st, 2010 @ 07:40 AM

    • State changed from “new” to “open”
  • Roger

    Roger February 4th, 2010 @ 12:33 AM

    How to reproduce:
    clear the clipboard
    start redcar
    go to some other window
    "copy something" go back to redcar window

  • Roger
  • Daniel Lucraft

    Daniel Lucraft February 4th, 2010 @ 06:24 AM

    • State changed from “open” to “resolved”

    OK then I'll close it, that ok Roger?

  • Roger

    Roger February 8th, 2010 @ 07:07 PM

    appears my patch was a bit short sighted, and broke the clipboard for the normal case (pesky unit tests).
    This should hopefully do it.

    http://github.com/rdp/redcar/commit/39615800768b7b481317a818651e756...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A programmer's text editor for Gnome.

People watching this ticket

Tags

Referenced by

Pages