#16542: GTK interface crashes when editing pasted HTML

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

#16542: GTK interface crashes when editing pasted HTML

Pidgin
#16542: GTK interface crashes when editing pasted HTML
----------------------+--------------------------
 Reporter:  Boozam1k  |      Owner:
     Type:  defect    |     Status:  new
Milestone:            |  Component:  pidgin (gtk)
  Version:  2.10.11   |   Keywords:  html
----------------------+--------------------------
 Example: Save this HTML as `test.html` and open it in your browser:

 {{{
 <html>
 <body>
 <div id="post_118810" style="margin-top: 24px;" class="container drop-
 shadow">
         <span style="font-size: 14px; font-weight: bold; padding-right:
 12px;">Post title</span>
         <hr>
         <div id="p_118810">Post content</div>
 </div>
 </body>
 </html>
 }}}
 (Also see attached as `test.html`)

 This bases on a real-life thing I wanted to paste someone. I'm not sure
 which parts are relevant, but at least it's a small, self-contained
 example.

 0. Open it in your browser (you should see a bold "Post title" and a
 normal "Post content"), then select (Ctrl-A) and copy (Ctrl-C) the text.
 1. Open a conversation in Pidgin (the GTK interface)
 2. Paste it. It should now appear as "parsed"
 3. Move the cursor in the middle of the text (specifically, in front of
 the horizontal bar) by pressing the arrow-up key
 4. Press the "delete" key multiple times
 5. If successful, delete all text and repeat from step 2

 For me it usually crashes in the first iteration, but always crashes
 before the third iteration. (So it crases *early* and *reproducably*).

 The exit flags sometimes indicate a SIGSEGV, but most the time SIGABRT.

 I *guess* it has something to do with HTML-tags being deleted only
 "partially" which subsequently fails to be parsed/displayed, but I have no
 idea.

 ----

 I followed TipsForBugReports:
 * I have all plugins disables by renaming `~/.purple.prefs.xml`, the
 problem still is there.
 * All plugins, libpurple, pidgin, and the system as a whole is updated to
 the newest version available for Debian testing (which might be outdated,
 but at least it's "pretty new"). See below for concrete version numbers.
 * There doesn't seem to be an existing bug report:
 [https://developer.pidgin.im/query?component=pidgin+%28gtk%29&description=~crash+html&col=id&col=summary&col=component&col=type&col=status&col=milestone&order=priority
 This query finds no tickets].
 * I followed GetABacktrace:
         * "The Easy Way": See files `pidgin-backtrace-20150119*.log`
                 Sorry for the missing function names, but the package
 "pidgin-dbg" is installed, and I don'tknow what other "debug symbols" I
 should use.
         * "The Hard Way": See file `core`, but same problem. If someone
 tells me how to apply the debug symbols, I'd love to be of help.
 * "Obtaining a Debug Log": See file `pidgin-debug-20150119153753.log`
         Note that it doesn't tell anything important.

 Versions:
 * General setup: Debian ("testing" release) on GNU/Linux, using X, Xfce,
 Iceweasel (basically Firefox)
 * `pidgin -v`: Pidgin 2.10.11 (libpurple 2.10.11)
 * `aptitude` says (I have no idea which of these might be relevant):
         * `libpurple0   2.10.11-1`
         * `libpurple-bin        2.10.11-1`
         * `pidgin-dbg   2.10.11-1`
         * `pidgin       2.10.11-1`
         * `pidgin-data  2.10.11-1`
         * `libgtk-3-0   3.14.5-1`
         * `libgtk2.0-0  2.24.25-1`
         * `libwebkitgtk-1.0-0   2.4.7-3`
         * `libwebkitgtk-1.0-common      2.4.7-3`
         * `libwebkitgtk-3.0-0   2.4.7-3`
         * `libwebkitgtk-3.0-common      2.4.7-3`
         * `libwxgtk3.0-0        3.0.2-1+b1`
         * `libgtk-3-bin 3.14.5-1`
         * `libgtk-3-common      3.14.5-1`
         * `libgtk2.0-bin        2.24.25-1`
         * `libgtk2.0-common     2.24.25-1`
 * `firefox -v`: Mozilla Iceweasel 31.4.0 (but the browser shouldn't be
 relevant)

--
Ticket URL: <https://developer.pidgin.im/ticket/16542>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16542: GTK interface crashes when editing pasted HTML

Pidgin
#16542: GTK interface crashes when editing pasted HTML
----------------------+---------------------------
 Reporter:  Boozam1k  |       Owner:
     Type:  defect    |      Status:  new
Milestone:            |   Component:  pidgin (gtk)
  Version:  2.10.11   |  Resolution:
 Keywords:  html      |
----------------------+---------------------------

Comment (by Boozam1k):

 Attachment "core" (core dump, see first post) is too big for upload here.

 See instead:
     * [https://www.dropbox.com/s/3z0l1pcdngrbxav/core?dl=0 Dropbox page]
     * [https://www.dropbox.com/s/3z0l1pcdngrbxav/core?dl=1 Direct
 download]

--
Ticket URL: <https://developer.pidgin.im/ticket/16542#comment:1>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16542: GTK interface crashes when editing pasted HTML

Pidgin
In reply to this post by Pidgin
#16542: GTK interface crashes when editing pasted HTML
----------------------+---------------------------
 Reporter:  Boozam1k  |       Owner:
     Type:  defect    |      Status:  pending
Milestone:            |   Component:  pidgin (gtk)
  Version:  2.10.11   |  Resolution:
 Keywords:  html      |
----------------------+---------------------------
Changes (by datallah):

 * status:  new => pending


Comment:

 The crashing is within GTK+, and you don't have the debug symbols for that
 installed.  If you install `libgtk2.0-dbg`, your backtrace should be more
 useful.

--
Ticket URL: <https://developer.pidgin.im/ticket/16542#comment:2>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16542: GTK interface crashes when editing pasted HTML

Pidgin
In reply to this post by Pidgin
#16542: GTK interface crashes when editing pasted HTML
----------------------+---------------------------
 Reporter:  Boozam1k  |       Owner:
     Type:  defect    |      Status:  pending
Milestone:            |   Component:  pidgin (gtk)
  Version:  2.10.11   |  Resolution:
 Keywords:  html      |
----------------------+---------------------------
Changes (by Boozam1k):

 * status:  pending => new


Comment:

 I was invoking the wrong build of gdb, sorry. Installed required debug
 symbols, and now it works. See next attachement.

--
Ticket URL: <https://developer.pidgin.im/ticket/16542#comment:3>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16542: GTK interface crashes when editing pasted HTML

Pidgin
In reply to this post by Pidgin
#16542: GTK interface crashes when editing pasted HTML
----------------------+---------------------------
 Reporter:  Boozam1k  |       Owner:
     Type:  defect    |      Status:  new
Milestone:            |   Component:  pidgin (gtk)
  Version:  2.10.11   |  Resolution:
 Keywords:  html      |
----------------------+---------------------------

Comment (by Boozam1k):

 Only by reading the last backtrace, I find that line 414 of gtkimhtml.c
 (pidgin)

 {{{
 GtkIMHtmlScalable *scale = GTK_IMHTML_SCALABLE(sd->scalable);
 scale->scale(scale, rect.width - xminus, rect.height); // line 414
 }}}

 effectively calls a function in `gtkwidget.c` (gtk2.0), which has this
 signature:

 {{{
 void
 gtk_widget_set_size_request (GtkWidget *widget,
                              gint       width,
                              gint       height)
 {
 }}}

 However, as defined in line 200 of `gtkimhtml.h` (pidgin), the expected
 signature is:

 {{{
 struct _GtkIMHtmlScalable {
         void (*scale)(struct _GtkIMHtmlScalable *, int, int);
         // ...
 }}}

 I don't know about C and all the black magic involved, but to me this
 looks like a mismatch: `gtkimhtml.c` defines that the `scale` function can
 take a `* _GtkIMHtmlScalable` as
 the first argument. But somewhere the function pointer was set to
 `gtk_widget_set_size_request`: I don't see why and how this can be
 correct? (or the bug happened before and this is only the symptom, not the
 cause)

 I never did object oriented programming in
 C, so I may be missing some of the magic involved. Please enlighten me :)

--
Ticket URL: <https://developer.pidgin.im/ticket/16542#comment:4>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16542: GTK interface crashes when editing pasted HTML

Pidgin
In reply to this post by Pidgin
#16542: GTK interface crashes when editing pasted HTML
----------------------+---------------------------
 Reporter:  Boozam1k  |       Owner:
     Type:  defect    |      Status:  closed
Milestone:            |   Component:  pidgin (gtk)
  Version:  2.10.11   |  Resolution:  duplicate
 Keywords:  html      |
----------------------+---------------------------
Changes (by dx):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Closed as duplicate of #15994.

--
Ticket URL: <https://developer.pidgin.im/ticket/16542#comment:5>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker