Firefox 59.0 for linux cannot paste text copied from IBM client access emulator 5250

RESOLVED FIXED in Firefox 60

Status

()

defect
RESOLVED FIXED
a year ago
10 months ago

People

(Reporter: mobbe, Assigned: stransky)

Tracking

({regression})

59 Branch
mozilla61
Unspecified
Linux
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox59 wontfix, firefox60 fixed, firefox61 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180310025718

Steps to reproduce:

I try to copy text from IBM client access emulator 5250 and paste it in Firefox address bar or in input field
I select text in client access emulator using ctrl+c, I paste it in Firefox address bar or in input/textara field using ctrl+v or right click + paste.



Actual results:

The text is not pasted in Firefox 59 for linux and later versions. I've tried also wiht Firefox 61.a01 Nightly
The text is pasted correctly in Firefox 58 for linux and previuous versions.
The text is pasted correctly in all other applicatione like text editor (Kate and KWrite) or other applications like Thunderbird 31.4.0, Libre Office etc.
The text is pasted correctly in Firefox 59 for windows.
The same result is obtained in all other linux machines used by my collegues


Expected results:

Continue to have the text pasted as in previous versions

Updated

a year ago
Keywords: regression
OS: Unspecified → Linux

Updated

a year ago
Component: Untriaged → Event Handling
Product: Firefox → Core
Monica, could you perhaps try to find the regression range?
https://mozilla.github.io/mozregression/
(Reporter)

Comment 2

a year ago
I had some problems using mozregression-gui that cannot install automatically in .mozilla/mozregression/persist/ in my PC, but I extracted and checked manually the different versions and this is the result:

- 2017-12-07--mozilla-central--firefox-59.0a1.en-US.linux-x86_64.tar.bz2 changeset: 8c84a3550f7adfc529b8568d9c559e7fd58946c3 run well, I can paste the text

- 2017-12-08--mozilla-central--firefox-59.0a1.en-US.linux-x86_64.tar.bz2 changeset: 6e2181b6137c87fde58434bb926ea3f21fc1ed11 doesn't run well and I cannot paste the text. 

Sorry, but I'm not able to execute a completely check because mozregression-gui doesn't extract automatically from file .tar.bz2 so doesn't run fine

Comment 3

a year ago
given regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8c84a3550f7adfc529b8568d9c559e7fd58946c3&tochange=6e2181b6137c87fde58434bb926ea3f21fc1ed11
	

Suspect: 
296dd5f8849a	Martin Stransky — Bug 1417874 - Split clipboard implementation to shared (nsClipboard) and backend specific (nsClipboardX11) parts, r=jhorak

@:stransky]
Your patch seems to cause the regression, Could you look into this?
Blocks: 1417874
Component: Event Handling → Widget: Gtk
Flags: needinfo?(stransky)
(Assignee)

Comment 4

a year ago
Yes, I'll look at it. Monica, can you please run firefox in terminal and see if there's any error message?
Flags: needinfo?(stransky) → needinfo?(mobbe)
(Reporter)

Comment 5

a year ago
(In reply to Martin Stránský [:stransky] from comment #4)

Martin, what do you mean for "run firefox in terminal"?
Could you give me detailed instructions what I have to do?
(Assignee)

Comment 6

a year ago
(In reply to Monica Bettoli from comment #5)
> (In reply to Martin Stránský [:stransky] from comment #4)
> 
> Martin, what do you mean for "run firefox in terminal"?
> Could you give me detailed instructions what I have to do?

Just close all your firefox windows, open terminal (gnome-terminal or anything else) and type "firefox" there + enter. It should launch firefox and you'll also see terminal output there.
(Reporter)

Comment 7

a year ago
(In reply to Martin Stránský [:stransky] from comment #6)
> Just close all your firefox windows, open terminal (gnome-terminal or
> anything else) and type "firefox" there + enter. It should launch firefox
> and you'll also see terminal output there.

I used "Konsole" and those are the messages received

These message before appears the profile selection window 
(firefox:4845): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(firefox:4845): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
(firefox:4845): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: classe ELF errata: ELFCLASS32


These message before appears in firefox opening
(/home/mob/firefox-59.0/firefox/firefox-bin:4923): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed
(/home/mob/firefox-59.0/firefox/firefox-bin:4923): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
(/home/mob/firefox-59.0/firefox/firefox-bin:4923): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: classe ELF errata: ELFCLASS32

But the same messages appears also if I run FF 58 version
Flags: needinfo?(mobbe)
(Assignee)

Comment 8

a year ago
Is there any message if you try to paste?
Flags: needinfo?(mobbe)
(Assignee)

Comment 9

a year ago
Which distro/system do you run? I expect your desktop is KDE.
(Reporter)

Comment 10

a year ago
(In reply to Martin Stránský [:stransky] from comment #8)
> Is there any message if you try to paste?

I've launched again and these messages are added in opening firefox:
###!!! [Parent][MessageChannel] Error: (msgtype=0x21000A,name=PClientManager::Msg___delete__) Channel closing: too late to send/recv, messages will be lost
###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

but no other messages appears when I try to paste the text in address bar


(In reply to Martin Stránský [:stransky] from comment #9)
> Which distro/system do you run? I expect your desktop is KDE.
Linux 3.16.7-7-desktop
openSUSE 13.2 (Harlequin) (x86_64)
Yes, my desktop is KDE
Flags: needinfo?(mobbe)
(Assignee)

Comment 11

a year ago
When your clipboard contains data from IBM client access emulator 5250, can you please run this command on console and attach the output here?

xclip -o -t TARGETS

(you need to type it to make sure you don't overwrite actual clipboard content). Thanks.
Flags: needinfo?(mobbe)
(Reporter)

Comment 12

a year ago
(In reply to Martin Stránský [:stransky] from comment #11)
> When your clipboard contains data from IBM client access emulator 5250, can
> you please run this command on console and attach the output here?
> 
> xclip -o -t TARGETS
> 
> (you need to type it to make sure you don't overwrite actual clipboard
> content). Thanks.

I haven't xclip, we are trying to find the package for suse 13.2, but we have some problem to find it.
Flags: needinfo?(mobbe)
(Reporter)

Comment 13

a year ago
Martin,
this is the result:

IBM_X5250_STRING
UTF-8
COMPOUND_TEXT
STRING
(Assignee)

Comment 14

a year ago
Thanks, looks like we need to use gtk_clipboard_request_text() to get the text to allow internal Gtk+ converts.
Assignee: nobody → stransky
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment hidden (mozreview-request)
(Assignee)

Updated

a year ago
See Also: → 1437314
Comment hidden (mozreview-request)
(Assignee)

Updated

a year ago
See Also: → 1449490
That patch makes my firefox crash whenever I paste something from a selection owner that previously did not work. Pasting selections that previously did work continue to work.

Unfortunately gdb is unhelpfull right now, so I can't provide any details.
Comment hidden (mozreview-request)
(Assignee)

Comment 19

a year ago
(In reply to Martin Husemann from comment #17)
> That patch makes my firefox crash whenever I paste something from a
> selection owner that previously did not work. Pasting selections that
> previously did work continue to work.
> 
> Unfortunately gdb is unhelpfull right now, so I can't provide any details.

Please try the latest patch - It fixes a crash in the original patch.
Blocks: 1437314
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 22

a year ago
mozreview-review
Comment on attachment 8962713 [details]
Bug 1447925 - Add GetClipboardText() to get text data from clipboard,

https://reviewboard.mozilla.org/r/231580/#review238706

::: widget/gtk/nsClipboardX11.h:29
(Diff revision 3)
>  
>      virtual const char* GetClipboardData(const char* aMimeType,
>                                           int32_t aWhichClipboard,
>                                           uint32_t* aContentLength) override;
> +    virtual const char* GetClipboardText(int32_t aWhichClipboard) override;
>      virtual void ReleaseClipboardData(const char* aClipboardData) override;

nit: please put GetTargets to the GetClipboardText, to make more clear that they are doing the simillar thing.

Comment 23

a year ago
mozreview-review
Comment on attachment 8962713 [details]
Bug 1447925 - Add GetClipboardText() to get text data from clipboard,

https://reviewboard.mozilla.org/r/231580/#review238722

::: widget/gtk/nsClipboardX11.h:31
(Diff revision 4)
>                                           int32_t aWhichClipboard,
>                                           uint32_t* aContentLength) override;
> +    virtual const char* GetClipboardText(int32_t aWhichClipboard) override;
>      virtual void ReleaseClipboardData(const char* aClipboardData) override;
>  
>      virtual GdkAtom* GetTargets(int32_t aWhichClipboard,

Can also this be renamed to GetClipboardTargets? I'll leave it up to you.
Attachment #8962713 - Flags: review?(jhorak) → review+

Comment 24

a year ago
mozreview-review
Comment on attachment 8964499 [details]
Bug 1447925 - Use GetClipboardText() to get text data at nsClipboard::GetData(),

https://reviewboard.mozilla.org/r/233228/#review238726
Attachment #8964499 - Flags: review?(jhorak) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Comment 27

a year ago
mozreview-review-reply
Comment on attachment 8962713 [details]
Bug 1447925 - Add GetClipboardText() to get text data from clipboard,

https://reviewboard.mozilla.org/r/231580/#review238706

> nit: please put GetTargets to the GetClipboardText, to make more clear that they are doing the simillar thing.

I'd preffer to keep them separately as GetClipboardText/Data needs to be released by ReleaseClipboardData() and GetTargets() by g_free(). I updated the comments accordingly at nsClipboard.h.

Comment 28

a year ago
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/537057d5ac49
Add GetClipboardText() to get text data from clipboard, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/4087700190a5
Use GetClipboardText() to get text data at nsClipboard::GetData(), r=jhorak

Comment 29

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/537057d5ac49
https://hg.mozilla.org/mozilla-central/rev/4087700190a5
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
(Reporter)

Comment 30

a year ago
I've tested the version firefox-61.0a1.en-US.linux-x86_64.tar.bz2 and copy/paste from client access emulator 5250 run well.

Comment 31

a year ago
These fixes broke the build for Wayland, I had to revert these commits to build it.
(Assignee)

Comment 32

a year ago
(In reply to greg from comment #31)
> These fixes broke the build for Wayland, I had to revert these commits to
> build it.

Sure, that's Bug 1449490.
(Assignee)

Updated

a year ago
Duplicate of this bug: 1446402
(Assignee)

Comment 34

a year ago
Comment on attachment 8962713 [details]
Bug 1447925 - Add GetClipboardText() to get text data from clipboard,

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1417874
[User impact if declined]: Pasting text fails from source which does not offer UTF-8 text.
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: yes, medium risk.
[Why is the change risky/not risky?]: The change is rather intrusive but it's  at nightly for while and also it's covered by automated testing.
[String changes made/needed]: none
Attachment #8962713 - Flags: approval-mozilla-beta?
(Assignee)

Comment 35

a year ago
Comment on attachment 8964499 [details]
Bug 1447925 - Use GetClipboardText() to get text data at nsClipboard::GetData(),

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1417874
[User impact if declined]: Pasting text fails from source which does not offer UTF-8 text.
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: yes, medium risk.
[Why is the change risky/not risky?]: The change is rather intrusive but it's  at nightly for while and also it's covered by automated testing.
[String changes made/needed]: none
Attachment #8964499 - Flags: approval-mozilla-beta?
Comment on attachment 8962713 [details]
Bug 1447925 - Add GetClipboardText() to get text data from clipboard,

fix a regression for pasting text from some apps on x11, seems worth getting this in for 60esr if nothing else.  approved for 60.0b13.
Attachment #8962713 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #8964499 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
> [Is this code covered by automated tests?]: yes
> [Needs manual test from QE? If yes, steps to reproduce]: no

Marking as qe-verify- since it is covered by automation.
Flags: qe-verify-
(Assignee)

Updated

a year ago
Duplicate of this bug: 1437314

Updated

10 months ago
Duplicate of this bug: 1448410
You need to log in before you can comment on or make changes to this bug.