Ticket #1312 (new defect)

Opened 3 years ago

Last modified 4 months ago

Mouse (Ubuntu) Copy Paste X-Clipboard

Reported by: bowtie Owned by:
Priority: major Milestone:
Component: editor Version: 0.91
Keywords: Mouse X Copy Paste Middle Button Cc: Sewi, bowtie, submersible_toaster

Description

Sewi

bowtie: Sorry for asking this _again_, but you're on Win or Linux?

bowtie

Sewi, Padre on ubuntu natty 11.04, unity and classic :)
why?

Sewi

Do you have any trouble using the clipboard on current trunk?

bowtie

Sewi, which one, Ctrl v/c or X middle button
just tested for you, all working, but I think sometimes X losses it's focus,

Sewi

I got huge trouble um 11.04: Select something, copy it (doesn't matter how), press pageup, try to paste -> copy buffer empty.
Select something, copy, select something else (using keyboard), try to paste the first selection over the second: clipboard buffer empty.
Select & copy, click on another function in the functions list, paste: gone.
Select & copy, do more than one tab switch: gone
There are so many issues where it's gone, I can't count them :) system-installed 0.76 seems to be ok.

bowtie

Sewi, you mean the x buffer, losing focus, yes I agree, copy then paste ok, copy do some thing paste :(

submersible_toaster

Sewi: even on 10.10 with trunk i have similar issue

Change History

comment:1 Changed 3 years ago by Sewi

  • Priority changed from major to blocker

comment:2 Changed 3 years ago by bowtie

See:

  1. http://irclog.perlgeek.de/padre/2011-08-26#i_4328229
  2. http://irclog.perlgeek.de/padre/2011-08-27#i_4332188

suggest you load Glipper if you are running Ubuntu Gnome, and test, add results here.

comment:3 Changed 3 years ago by bowtie

  • Priority changed from blocker to trivial

As this is a ubuntu/gnome issue,

this is not a Padre issue

downgrading to trivial

comment:4 Changed 3 years ago by Sewi

  • Priority changed from trivial to blocker

How to reproduce:

  • Open the "dev" script from trunk in Padre
  • Select $DEBUG around line 18 my double clicking on it (should copy the selection into the buffer)
  • Select $FULLTRACE by double clicking it
  • Press Ctrl+V to paste

Padre 0.76 (Ubuntu packaged?) pasts $DEBUG replacing $FULLTRACE.

Current trunk r15814 doesn't do the paste, but clears the pasting buffer. Pasting at another location without selecing anything before doesn't paste anything.

Padre 0.90 from CPAN works flawlessly.

Strange thing: It doesn't fail on my Ubuntu 11.04 Desktop but fails on my 11.04 company notebook as well as on Submersible Toaster's 10.10. I don't use any clipboard tool besides Ubuntu defaults. I don't expect this problem on Windows as it has a completly different pasting behaviour.

It is clearly no Ubuntu issue and we can't ever tell people: "Install xyz Ubuntu package (which might conflict with other packages or may not be aviable on your version) to solve bugs we created."

comment:5 Changed 3 years ago by Sewi

The bug came in at r15630. Anybody feel free to start there searching for the actual line creating the bug.

comment:6 Changed 3 years ago by Sewi

glipper is no solution, it doesn't fix the problem at all, only introduces new shortcuts to call glipper.

comment:7 Changed 3 years ago by emilbarton

chat on #padre 110831 (exerpts):

<emilbarton> hi I have Padre 0.9 latest from Cpan installed on a Debian squeeze amd64. The editor is cool except that the selection overwrites the cut and paste clipboard prohibiting any serious use. What can I do?
..
<bowtie> emilbarton, have a look at http://padre.perlide.org/trac/ticket/1312
..
<emilbarton> I don't know about your trunk system but I doubt that the comment you cite be true: previously I had a Debian install of version 0.63 and it showed the same bug, though probably anterior to r15630.
..
<emilbarton> how long will it take to get fixed? shall I be informed?
..
<bowtie> emilbarton, you will receive e-mail updated against this ticket, but you comments will help
..

comment:8 Changed 3 years ago by Sewi

I doubt, emilbarton has the same issue, previous versions are clearly not affected.
It's more likely that he got confused by the two Padre clipboard modes usable on X11 machines, which are switchable in the preferences.
If this doesn't "solve" the issue, please report the Wx and Scintilla versions ( shown on the third "about" tab)

comment:9 Changed 3 years ago by emilbarton

Tests (updated 110904 for more precision and correction of 2 benign errors):

string_to_be_copied_with_Ctl-c
string_to_be_copied_with_selection

test 1: Preferences : Use X11 middle button paste style: unchecked:

  1. string_to_be_copied_with_Ctl-c : copied with Ctl-c: OK
  2. string_to_be_copied_with_Ctl-c : pasted with Ctl-v: OK
  3. string_to_be_copied_with_selection: selected: OK
  4. string_to_be_copied_with_selection: pasted with middle button: OK
  5. string_to_be_copied_with_selection: pasted with Ctl-v: *ERROR*

test 2: Preferences : Use X11 middle button paste style: checked:

  1. string_to_be_copied_with_Ctl-c : copied with Ctl-c: OK
  2. string_to_be_copied_with_Ctl-c : pasted with Ctl-v: OK
  3. string_to_be_copied_with_selection : selected: OK
  4. string_to_be_copied_with_selection : pasted with middle button: OK
  5. string_to_be_copied_with_Ctl-c : pasted with Ctl-v: OK
  6. string_to_be_copied_with_selection : selected a second time: OK
  7. string_to_be_copied_with_selection : pasted with Ctl-v: *ERROR*
  8. [no result]: middle button click: *ERROR*
  9. string_to_be_copied_with_selection : selected a third time: OK
  10. string_to_be_copied_with_selection: pasted with middle button: OK
  11. string_to_be_copied_with_Ctl-c: copied with Ctl-c: OK
  12. [no result]: middle button click: *ERROR*
  13. string_to_be_copied_with_Ctl-c: pasted with Ctl-v: OK

(repetition of such processes can lead to other unexpected error examples)

System Info
Perl 5.10.1
Wx 0.9702
wxWidgets 2.8.10
Alien::wxWidgets 0.50
Wx::Perl::ProcessStream0.30
PPI 1.215
Config: /home/emilbarton/.local/share/.padre
Uptime: 0:19:02
RAM: 633.3MB
Threads: 3

Version 3, edited 3 years ago by emilbarton (previous) (next) (diff)

comment:10 Changed 3 years ago by emilbarton

After a discussion with bowtie on irc yesterday I tried again test 1 to see if completely ignoring the middle button could improve anything, but unfortunately the bug remains.

People seem quick to doubt of my judgement here but are slow to react to my reports. Attitude that goes with the bug generally. If you can answer positively to the question "which non buggy, Perl-friendly editor remains available to Linux users nowadays?" then you are entitled to show signs of annoyance at my insistence on getting Padre at work.

test 3: Preferences : Use X11 middle button paste style: unchecked:

  1. string_to_be_copied_with_Ctl-c: copied with Ctl-c: OK
  2. string_to_be_copied_with_Ctl-c: pasted with Ctl-v: OK
  3. string_to_be_copied_with_selection: selected (with left mouse button): OK
  4. string_to_be_copied_with_selection: pasted with Ctl-v: *ERROR*
Last edited 3 years ago by emilbarton (previous) (diff)

comment:11 Changed 3 years ago by Sewi

Sorry for that.

The bug came in in r15630, up to me, there is no need for further testing until someone deep-checked that commit and tries to identify the file and lines where it happend.

comment:12 Changed 3 years ago by emilbarton

Many thanks, I keep hoping!

comment:13 Changed 3 years ago by ktaragorn

I can confirm this bug as well, and something i have noticed that might help pinpoint this issue..
The demo app at http://search.cpan.org/dist/Wx-Scintilla/lib/Wx/Scintilla.pm has very similar issues, except that instead of not doing anything, it deletes the text.. this is actually very similar to #390.

There is something interesting tho.. if i copy from an external app it seems to work as expected.. but copying within padre invokes this issue..
Is it possible that code to deal with the clipboard is double implemented at different levels or somesuch? it seems too convoluted a bug otherwise..

oh, forgot,
Ubuntu 11.04 x86_64, Padre latest release(.90) and trunk.
Wx Version=(0.9901) wxWidgets 2.8.11 unicode=(1)
Perl 5.10.1

Last edited 3 years ago by ktaragorn (previous) (diff)

comment:14 Changed 2 years ago by bowtie

  • Priority changed from blocker to major

comment:15 follow-up: ↓ 16 Changed 2 years ago by zenogantner

I still have this issue -- if it is the same.
When I copy something to the clipboard within Padre, it is lost as soon as I hit "Delete".

Padre 0.96 from CPAN on Ubuntu 12.04.

It is the single most annoying issue that Padre has, and the one that is keeping me from using Padre on a daily basis.

I currently have no time to dive into this issue and fix it myself, but I am willing to provide whichever information and testing necessary to help fix it ;-)

                  Padre 0.96
Core...
                  osname linux
                archname x86_64-linux-gnu-thread-multi
            Distribution Ubuntu 12.04 LTS 
                  Kernel 3.2.0-23-generic
                    Perl 5.14.2
                 Threads 4
                     RAM 748.4MB
Wx...
                      Wx 0.9903
               WxWidgets 2.8.11
                 unicode 1
        Alien::wxWidgets 0.54
 Wx::Perl::ProcessStream 0.29
           Wx::Scintilla 0.3801
Other...
                     PPI 1.215
           Debug::Client 0.20
                  Config /home/zgantner/.local/share/.padre

comment:16 in reply to: ↑ 15 Changed 2 years ago by bowtie

Replying to zenogantner:

                   Padre 0.96
Core...
                  osname linux
                archname i686-linux-thread-multi
            Distribution Ubuntu 12.04 LTS 
                  Kernel 3.2.0-23-generic
                    Perl 5.15.9
                 Threads 6
                     RAM 289.3MB
Wx...
                      Wx 0.9906
               WxWidgets 2.8.12
                 unicode 1
        Alien::wxWidgets 0.58
 Wx::Perl::ProcessStream 0.32
           Wx::Scintilla 0.3801
Other...
                     PPI 1.215
           Debug::Client 0.20
                  Config /home/kevin/.local/share/.padre

I just tested, this with above,

highlighted text in pm1 with mouse
switched to pm2
delete something with keyboard
centre mouse to paste, worked for me.

is above example acceptable, if so please try

Last edited 2 years ago by bowtie (previous) (diff)

comment:17 Changed 2 years ago by Sewi

Works accidently but doesn't work most of the times, the bug is still in place.
Safe copy/paste: select, copy, do not move cursor, open a blank document, paste, return to target document, select paste position, goto new document, select all, copy, select target document, paste.

comment:18 Changed 2 years ago by bowtie

Swei

I can not follow that, you will need to be more exact,

dose paste mean

  • centre button
  • right mouse paste
  • Padre icon Paste

I decided it did not mean 'Ctrl+V'

also how many documents original, blank, new and target :)

comment:19 Changed 15 months ago by vsespb

duplicate #1476 (under Ubuntu 10.04)

I confirm that the following sample code http://search.cpan.org/dist/Wx-Scintilla/lib/Wx/Scintilla.pm affected by this bug too.

Every other app on my ubuntu work flawless, so I don't think it's Gnome issue.

comment:20 Changed 15 months ago by vsespb

if i copy from an external app it seems to work as expected.. but copying within padre invokes this issue..

yes, same here.

even more.., once I saw then clipboard content is not destroyed, but replaced with something that was in clipboard previously..
But can't reproduce this.

also, someone reported similar issue for Wx-Scintilla
https://rt.cpan.org/Public/Bug/Display.html?id=74765

comment:21 Changed 15 months ago by vsespb

That's definitely show-stopper. I tried to use Padre several times, but I can't, with my typical clipboard use habbits it's absolutely unusable.

I tried to fix that bug, but no miracle happened (probably because I don't have experience with Wx, with Linux GUI subsystems and even with C under Linux).

comment:22 Changed 8 months ago by bowtie

take a look at http://irclog.perlgeek.de/padre/2013-08-16#i_7457194
and the previous day

  • usr/src/Padre/Padre/lib/Padre/Wx/Editor.pm

     
    14621462    return 1; 
    14631463} 
    14641464 
     1465# hack for cut n paste - start 
     1466sub Cut { 
     1467    my $self = shift; 
     1468    $self->{internal_copy} = $self->GetSelectedText; 
     1469    return $self->SUPER::Cut(@_); 
     1470} 
     1471 
     1472sub Copy { 
     1473    my $self = shift; 
     1474    $self->{internal_copy} = $self->GetSelectedText; 
     1475    return $self->SUPER::Copy(@_); 
     1476} 
     1477 
    14651478sub CanPaste { 
    14661479    my $self = shift; 
     1480    return 1 if $self->{internal_copy}; 
    14671481    return 0 unless $self->SUPER::CanPaste; 
    14681482    return 0 unless $self->clipboard_length; 
    14691483    return 1; 
     
    14831497        # Please see ticket:589, "Pasting in a UNIX document in win32 
    14841498        # corrupts it to MIXEd" 
    14851499        $self->ReplaceSelection( $self->_convert_paste_eols($text) ); 
     1500    } else { 
     1501        $self->ReplaceSelection( $self->_convert_paste_eols( $self->{internal_copy} ) ); 
    14861502    } 
    14871503 
    14881504    return 1; 
    14891505} 
     1506# hack for cut n past - end  
    14901507 
    14911508# 
    14921509# This method converts line ending based on current document EOL mode 

add in r19782

comment:23 Changed 8 months ago by bowtie

garry++

for above

comment:24 Changed 8 months ago by vsespb

looks genious!

comment:25 Changed 4 months ago by vsespb

problem still presents in Padre 1.00 under Ubuntu 12.04

Note: See TracTickets for help on using tickets.