tieto / sipe

A third-party Pidgin plugin for Microsoft Lync/OCS - clone of upstream http://repo.or.cz/w/siplcs.git
GNU General Public License v2.0
129 stars 24 forks source link

Pidgin SEGV in gtk_style_context_get_valist() #117

Closed joakim-tjernlund closed 8 years ago

joakim-tjernlund commented 8 years ago

Got this with latest launchpad branch(both pidgin and pidgin-sipe):

(19:19:46) Gtk: Style property "ythickness" is not registered (19:19:46) GLib-GObject: /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/gobject/gtype.c:4272: type id '0' is invalid (19:19:46) GLib-GObject: can't peek value table for type '' which is not currently referenced

Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault.
0x00007ffff41bac33 in gtk_style_context_get_valist () from /usr/lib64/libgtk-3.so.0
(gdb) bt
#0  0x00007ffff41bac33 in gtk_style_context_get_valist () from /usr/lib64/libgtk-3.so.0
#1  0x00007ffff41baef3 in gtk_style_context_get () from /usr/lib64/libgtk-3.so.0
#2  0x00007ffff7b8f409 in ?? () from /usr/lib64/libpidgin.so.20
#3  0x00007ffff41210b9 in ?? () from /usr/lib64/libgtk-3.so.0
#4  0x00007ffff4124bdf in gtk_menu_popup_for_device () from /usr/lib64/libgtk-3.so.0
#5  0x00007ffff412506a in gtk_menu_popup () from /usr/lib64/libgtk-3.so.0
#6  0x00007ffff7b8f743 in ?? () from /usr/lib64/libpidgin.so.20
#7  0x00007ffff1bf61a4 in ?? () from /usr/lib64/libgobject-2.0.so.0
#8  0x00007ffff1c10687 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#9  0x00007ffff1c10fff in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#10 0x00007ffff1bf5f75 in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#11 0x00007ffff1c08301 in ?? () from /usr/lib64/libgobject-2.0.so.0
#12 0x00007ffff1c10d99 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#13 0x00007ffff1c10fff in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#14 0x00007ffff420483d in ?? () from /usr/lib64/libgtk-3.so.0
#15 0x00007ffff1bf5f75 in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#16 0x00007ffff1c07c24 in ?? () from /usr/lib64/libgobject-2.0.so.0
#17 0x00007ffff1c10d99 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#18 0x00007ffff1c10fff in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#19 0x00007ffff40175ed in ?? () from /usr/lib64/libgtk-3.so.0
#20 0x00007ffff4017655 in ?? () from /usr/lib64/libgtk-3.so.0
#21 0x00007ffff1bf5f75 in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#22 0x00007ffff1c07c24 in ?? () from /usr/lib64/libgobject-2.0.so.0
#23 0x00007ffff1c10d99 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#24 0x00007ffff1c10fff in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#25 0x00007ffff4015a40 in ?? () from /usr/lib64/libgtk-3.so.0
#26 0x00007fffe8d0a020 in ffi_call_unix64 () from /usr/lib64/libffi.so.6
#27 0x00007fffe8d09a88 in ffi_call () from /usr/lib64/libffi.so.6
#28 0x00007ffff1bf6bdc in g_cclosure_marshal_generic_va () from /usr/lib64/libgobject-2.0.so.0
#29 0x00007ffff1bf61a4 in ?? () from /usr/lib64/libgobject-2.0.so.0
#30 0x00007ffff1c10687 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#31 0x00007ffff1c10fff in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#32 0x00007ffff40cbd11 in ?? () from /usr/lib64/libgtk-3.so.0
#33 0x00007ffff1bf8f2e in g_cclosure_marshal_VOID__BOXEDv () from /usr/lib64/libgobject-2.0.so.0
#34 0x00007ffff1bf61a4 in ?? () from /usr/lib64/libgobject-2.0.so.0
#35 0x00007ffff1c10687 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#36 0x00007ffff1c10fff in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#37 0x00007ffff40c902e in ?? () from /usr/lib64/libgtk-3.so.0
#38 0x00007ffff40ca663 in ?? () from /usr/lib64/libgtk-3.so.0
#39 0x00007ffff40cd295 in ?? () from /usr/lib64/libgtk-3.so.0
#40 0x00007ffff409cd6b in gtk_event_controller_handle_event () from /usr/lib64/libgtk-3.so.0
#41 0x00007ffff4253853 in ?? () from /usr/lib64/libgtk-3.so.0
#42 0x00007ffff4112da9 in ?? () from /usr/lib64/libgtk-3.so.0
#43 0x00007ffff1bf61a4 in ?? () from /usr/lib64/libgobject-2.0.so.0
#44 0x00007ffff1c10130 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#45 0x00007ffff1c10fff in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#46 0x00007ffff42551ac in ?? () from /usr/lib64/libgtk-3.so.0
#47 0x00007ffff410ff6e in ?? () from /usr/lib64/libgtk-3.so.0
#48 0x00007ffff4111e38 in gtk_main_do_event () from /usr/lib64/libgtk-3.so.0
#49 0x00007ffff3c70215 in ?? () from /usr/lib64/libgdk-3.so.0
#50 0x00007ffff3c9d1c2 in ?? () from /usr/lib64/libgdk-3.so.0
#51 0x00007ffff77dee9d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#52 0x00007ffff77df180 in ?? () from /usr/lib64/libglib-2.0.so.0
#53 0x00007ffff77df4a2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#54 0x00007ffff4111025 in gtk_main () from /usr/lib64/libgtk-3.so.0
#55 0x00007ffff7b97a24 in pidgin_start () from /usr/lib64/libpidgin.so.20
#56 0x00007ffff71f76d0 in __libc_start_main (main=0x400880 <main>, argc=0x2, argv=0x7fffffffd268, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffffffd258) at libc-start.c:289
#57 0x0000000000400909 in _start ()
(gdb) 
joakim-tjernlund commented 8 years ago

gtk+3.20.9

Also, when the SEGV happens in gdb, my DE completely freezes. I had to open a second console and kill pidgin there to get back my DE

xhaakon commented 8 years ago

This seems like it's happening when you're opening some menu. What exactly were you doing right prior the crash?

Also, when the SEGV happens in gdb, my DE completely freezes. I had to open a second console and kill pidgin there to get back my DE

I guess this is because of the unfortunate way GTK+ popup menus work. They somehow steal all input events, and if the program halts in gdb on a breakpoint or because it crashed while a menu is opened, keyboard or mouse input stops being delivered to the DE and you can't do anything but kill gdb from another virtual console. That's a GTK+ bug/feature.

For debugging issues which concern GTK menus, I recommend running the application in a nested Xephyr window so that your main X session doesn't get frozen.

joakim-tjernlund commented 8 years ago

I am just clicking the "A Font" button. The same happens if I press "+ Insert"

There must be some option to gtk that "undoes" this feature, will goolge some

xhaakon commented 8 years ago

Yeah I can reproduce the crash with GTK+ 3.21.5. Also the button text has a weird black background.

joakim-tjernlund commented 8 years ago

Yes, weird black background too.

Also, status text window is way bigger now, it fits about 4-5 lines of text but I can only type in the first row.

joakim-tjernlund commented 8 years ago

Would it be possible to build with gtk+ 2 instead?

xhaakon commented 8 years ago

Pidgin 3 doesn't support GTK+ 2. But if you're building for Gentoo, you may try to switch to Pidgin's release-2.x.y branch which still does. Compile & install it, then rebuild pidgin-sipe. Not very tested but should work since all the important pieces should be already backported to 2.x Pidgin.

joakim-tjernlund commented 8 years ago

Oh, I figured pidgin 3 was required for sipe 3. I will test with pidgin 2

joakim-tjernlund commented 8 years ago

pidgin 2 works :) I can share my desktop but only share readonly.

Audio calls are unstable, often I cannot hear the other end. I can see this in Debug windown: 11:11:41) mediamanager: gst pipeline error: GStreamer encountered a general supporting library error. (11:11:41) mediamanager: Debug details: /var/tmp/portage/media-libs/gst-plugins-bad-1.6.3/work/gst-plugins-bad-1.6.3/ext/srtp/gstsrtpenc.c(1058): gst_srtp_enc_process_buffer (): /GstPipeline:pipeline0/GstBin:conf_0x7fcee800af60/FsRtpConference:fsrtpconference12/GstRtpBin:rtpbin12/GstSrtpEnc:srtpenc_1: Unable to protect buffer (protect failed) code 9 (11:11:41) backend-fs2: gst error GStreamer encountered a general supporting library error. debugging: /var/tmp/portage/media-libs/gst-plugins-bad-1.6.3/work/gst-plugins-bad-1.6.3/ext/srtp/gstsrtpenc.c(1058): gst_srtp_enc_process_buffer (): /GstPipeline:pipeline0/GstBin:conf_0x7fcee800af60/FsRtpConference:fsrtpconference12/GstRtpBin:rtpbin12/GstSrtpEnc:srtpenc_1: Unable to protect buffer (protect failed) code 9 (11:11:41) mediamanager: gst pipeline error: Internal data flow error. (11:11:41) mediamanager: Debug details: /var/tmp/portage/media-libs/gstreamer-1.6.3/work/gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:conf_0x7fcee800af60/FsRtpConference:fsrtpconference12/GstBin:bin40/GstNiceSrc:nicesrc28: streaming task paused, reason error (-5) (11:11:41) backend-fs2: gst error Internal data flow error. debugging: /var/tmp/portage/media-libs/gstreamer-1.6.3/work/gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:conf_0x7fcee800af60/FsRtpConference:fsrtpconference12/GstBin:bin40/GstNiceSrc:nicesrc28: streaming task paused, reason error (-5)

xnandersson commented 8 years ago

@joakim-tjernlund The audio issue might be this one https://github.com/tieto/sipe/issues/107

joakim-tjernlund commented 8 years ago

somewhat related.

Trying Video I get: 13:27:45) mediamanager: gst pipeline error: Internal data flow error. (13:27:45) mediamanager: Debug details: /var/tmp/portage/media-libs/gstreamer-1.8.2/work/gstreamer-1.8.2/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:vvconfig-videosrc/GstBin:pidgindefaultvideosrc/GstAutoVideoSrc:autovideosrc0/GstVideoTestSrc:fake-auto-video-src: streaming task paused, reason not-negotiated (-4) (13:27:45) backend-fs2: gst error Internal data flow error. debugging: /var/tmp/portage/media-libs/gstreamer-1.8.2/work/gstreamer-1.8.2/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:vvconfig-videosrc/GstBin:pidgindefaultvideosrc/GstAutoVideoSrc:autovideosrc0/GstVideoTestSrc:fake-auto-video-src: streaming task paused, reason not-negotiated (-4) (13:27:45) media: Error with your webcam

Any idea?

joakim-tjernlund commented 8 years ago

hmm, proably some gst codec missing, but which? I got: media-libs/gst-plugins-bad media-libs/gst-plugins-base media-libs/gst-plugins-good media-libs/gst-plugins-ugly media-plugins/gst-plugins-a52dec media-plugins/gst-plugins-cdparanoia media-plugins/gst-plugins-dts media-plugins/gst-plugins-dvdread media-plugins/gst-plugins-faad media-plugins/gst-plugins-flac media-plugins/gst-plugins-jpeg media-plugins/gst-plugins-libav media-plugins/gst-plugins-libnice media-plugins/gst-plugins-libpng media-plugins/gst-plugins-mad media-plugins/gst-plugins-meta media-plugins/gst-plugins-mpeg2dec media-plugins/gst-plugins-openh264 media-plugins/gst-plugins-pulse media-plugins/gst-plugins-resindvd media-plugins/gst-plugins-v4l2 media-plugins/gst-plugins-vaapi media-plugins/gst-plugins-vpx media-plugins/gst-plugins-x264

joakim-tjernlund commented 8 years ago
GST_DEBUG=3 gave me:
0:00:13.085157785 22011      0x1cdea70 WARN    fsrtpconference_disco fs-rtp-discover-codecs.c:1847:codec_blueprints_add_caps: Could not create send codec bin from blueprint for -1: video THEORA clock:90000 channels:0 params:(nil): Could not link element inside the send codec bin for pt 96
0:00:13.099343094 22011      0x1cdea70 WARN    fsrtpconference_disco fs-rtp-discover-codecs.c:1847:codec_blueprints_add_caps: Could not create send codec bin from blueprint for 33: video MP2T clock:90000 channels:0 params:(nil): Could not link element inside the send codec bin for pt 33
0:00:13.109690537 22011      0x1cdea70 WARN    fsrtpconference_disco fs-rtp-discover-codecs.c:1847:codec_blueprints_add_caps: Could not create send codec bin from blueprint for -1: video H265 clock:90000 channels:0 params:(nil): Could not link element inside the send codec bin for pt 96

So I guess I must get some of there codecs. I see that gentoo only has gst-0.10 for THEORA. The other ones I haven't found yet

xhaakon commented 8 years ago
/var/tmp/portage/media-libs/gstreamer-1.8.2
/var/tmp/portage/media-libs/gst-plugins-bad-1.6.3

Your installation looks rather all over the place. Could you try updating gst-plugins-bad and anything else that isn't the latest version?

xhaakon commented 8 years ago

Also do you have Farstream from https://github.com/tieto/farstream/tree/launchpad?

joakim-tjernlund commented 8 years ago

/var/tmp/portage/media-libs/.... This is Gentoo portage, it always builds and installs in a staging area and then merge all files into place, that is why it look a bit strange but it is all good :)

No, I don't have https://github.com/tieto/farstream/tree/launchpad, looking at it does not seem like there is much extra there but I will soon Currently I am looking at the missing codecs, THEORA, MP2T and H265. Maybe they are not relevant?

xhaakon commented 8 years ago

I'm not concerned about the "strange" path :) I meant the versions - 1.8.2 vs 1.6.3 differ pretty a lot.

joakim-tjernlund commented 8 years ago

Ahh, yes. I updated to 1.8.2 but obviusy I mised som gst packages. Will fix

joakim-tjernlund commented 8 years ago

https://github.com/tieto/farstream/tree/launchpad, did the trick! Now I can get a test image :) At least I got libnice from lanchpad ...

What about the read only shared desktop? Should it be that way?

joakim-tjernlund commented 8 years ago

took a look at FreeRDP upstream w.r.t lanchpad. Look to like lanchpad is fairly behind upstream now?

joakim-tjernlund commented 8 years ago

... and upstream freerdp does not work w.r.t sharing desktop :(

joakim-tjernlund commented 8 years ago

.. but it does, I screwed up my new farstrem so nothing worked, sorry

xhaakon commented 8 years ago

What about the read only shared desktop? Should it be that way?

By "read only" you mean that the person you are sharing your desktop with isn't able to remote-control it? Please read this thread. TL;DR version: Remote control should work when you're sharing with one of your buddies, but isn't supported in conference meetings.

joakim-tjernlund commented 8 years ago

Ahh, I only get that "desktop control" while sharing, thanks. The audio issue is what remains but I am not alone there it seems

joakim-tjernlund commented 8 years ago

So tried to share again an got this error sevral times: MESSAGE END >>>>>>>>>> SIP - 2016-09-16T14:39:49.393716Z (16:39:49) sipe: process_input_message: removing CSeq 2 (16:39:49) sipe: SIP transactions count:0 after removal (16:39:49) backend-fs2: farstream-component-state-changed: component: 1 state: CONNECTING (16:39:49) backend-fs2: farstream-component-state-changed: component: 2 state: CONNECTING (16:39:49) sipe: sipe_schedule_remove: action name=<9826gF660aE774iB5F4m4DD3tC057bC674x0E3Ex> [16:39:49:670] [1182:1182] [INFO][com.freerdp.server.shadow.x11] - X11 Extensions: XFixes: 1 Xinerama: 1 XDamage: 0 XShm: 0 [16:39:49:675] [1182:1182] [INFO][com.freerdp.core.listener] - Listening on 0.0.0.0:3389 ** ERROR:sipe-appshare.c:682:candidate_pairs_established_cb: assertion failed (error == NULL): No such file or directory (g-io-error-quark, 1) Aborted

This is with upstream freerdp though

joakim-tjernlund commented 8 years ago

and lanchpad too.

The freerdp that works is Gentoo's older snapshot: freerdp-2.0.0_pre20160722 from mid July.

xhaakon commented 8 years ago

@joakim-tjernlund Created issue #118 for the above described assertion failure. For any independent finding please create a new ticket and leave this one for the original GTK+ SEGV. I think I know how to fix it and will look into it during the weekend when I have time.

joakim-tjernlund commented 8 years ago

Sure, will do :)

Which error do known how to fix, GTK+ SEGV or the Assert in candidate_pairs_established_cb() ? I am using GTK2 now so I am more in need for a fix for the Assert problem.

xhaakon commented 8 years ago

@joakim-tjernlund GTK+ SEGV

xhaakon commented 8 years ago

This should be fixed with "gtkutils: remove usage of deprecated xthickness and ythickness" in Pidgin repo.