[CRASH] in gtk code when trying to paste unicode

VERIFIED FIXED in M12

Status

()

P1
blocker
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: akkzilla, Assigned: pavlov)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: PATCH ATTACHED - waiting for M12 tree to open)

Attachments

(2 attachments)

(Reporter)

Description

19 years ago
When trying to paste unicode, we crash in gtk code trying to get data from the
native clipboard:

#12 0x405ec9b9 in gtk_main_iteration_do ()
#13 0x405223af in nsClipboard::DoRealConvert (this=0x842fcf0, type=0)
    at nsClipboard.cpp:424
#14 0x40522524 in nsClipboard::DoConvert (this=0x842fcf0, format=3)
    at nsClipboard.cpp:465
#15 0x4052293f in nsClipboard::GetNativeClipboardData (this=0x842fcf0,
    aTransferable=0x8533090) at nsClipboard.cpp:538
#16 0x405412e1 in nsBaseClipboard::GetData (this=0x842fcf0,
    aTransferable=0x8533090) at nsBaseClipboard.cpp:102
#17 0x4157e752 in nsHTMLEditor::Paste (this=0x84fee20) at nsHTMLEditor.cpp:3561
#18 0x415af89d in nsHTMLEditorLog::Paste (this=0x84fee20)
    at nsHTMLEditorLog.cpp:357

In order to see this, apply the attached patch in editor/base, then try a simple
plaintext paste into the editor window.

This is blocking I18n pasting on all platforms (because the editor code is XP
and can't be checked in until the Linux crash is fixed).

Since this is crashing inside gtk, the real fix may involve a gtk fix or an
elaborate workaround.  As a temporary fix, I'd like to change line 465 of
nsClipboard.cpp from
    r = DoRealConvert(sSelTypes[TARGET_COMPOUND_TEXT]);
to
    r = DoRealConvert(GDK_SELECTION_TYPE_STRING);
which does fix the problem (but not in the right way).
(Reporter)

Comment 1

19 years ago
Created attachment 2715 [details] [diff] [review]
Patch for the editor to enable unicode pasting
(Reporter)

Updated

19 years ago
Blocks: 16803
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
Priority: P3 → P1
Whiteboard: PATCH ATTACHED - waiting for M12 tree to open
Target Milestone: M12
(Assignee)

Comment 2

19 years ago
Created attachment 2718 [details] [diff] [review]
patch to fix bad behavior
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

19 years ago
checked in fix

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 4

19 years ago
code level fix, amrking VERIFIED
(Reporter)

Comment 5

19 years ago
I don't see how a crash when trying to paste unicode is a code level fix, but,
whatever ..
(Assignee)

Comment 6

19 years ago
to see it, the unicode pasting patch would have had to be applyed... its hard to
apply code patches to binaries... :-)
You need to log in before you can comment on or make changes to this bug.