[Pidgin] #16542: GTK interface crashes when editing pasted HTML

Pidgin trac at pidgin.im
Tue Jan 20 11:36:44 EST 2015

#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

 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

 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

 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>

More information about the Tracker mailing list