jhgorse / onevideo

Connected Collaboration: Peer-to-peer video conferencing
GNU Lesser General Public License v2.1
4 stars 0 forks source link

GTK GUI - ov_aggregate_call_details_for_remotes() caps issue for FaceTime HD PCIe camera #2

Closed jhgorse closed 8 years ago

jhgorse commented 8 years ago

This occurs during initiation of the session with the GUI. CLI does not exhibit this behavior.

thiscaps[] and thatcaps[] values in ov_aggregate_call_details_for_remotes():outgoing.c:533:

(lldb) expr gst_caps_to_string(thatcaps[0])
(gchar *) $0 = 0x0000000107529bf0 "audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved"
(lldb) expr gst_caps_to_string(thatcaps[1])
(gchar *) $1 = 0x00000001075e1bb0 "image/jpeg, width=(int)1280, height=(int)720, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)640, height=(int)360, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)320, height=(int)240, framerate=(fraction){ 10/1, 5/1 }"
(lldb) expr gst_caps_to_string(thatcaps[2])
(gchar *) $2 = 0x000000010b143360 "audio/x-opus"
(lldb) expr gst_caps_to_string(thatcaps[3])
(gchar *) $3 = 0x000000010b1432f0 "image/jpeg; video/x-h264"
(lldb) expr gst_caps_to_string(thatcaps[4])
(gchar *) $4 = 0x00000001075675f0 "ANY"
(lldb) expr gst_caps_to_string(thatcaps[5])
(gchar *) $5 = 0x000000010bc04130 "NULL"
(lldb) expr gst_caps_to_string(thatcaps[6])
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x0).
The process has been returned to the state before expression evaluation.
(lldb) expr gst_caps_to_string(thiscaps[0])
(gchar *) $6 = 0x000000010b142ee0 "audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved"
(lldb) expr gst_caps_to_string(thiscaps[1])
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x28).
The process has been returned to the state before expression evaluation.
(lldb) expr gst_caps_to_string(thiscaps[2])
(gchar *) $7 = 0x0000000107531b80 "audio/x-opus"
(lldb) expr gst_caps_to_string(thiscaps[3])
(gchar *) $8 = 0x000000010bc08d00 "image/jpeg; video/x-h264"
(lldb) expr gst_caps_to_string(thiscaps[4])
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=EXC_I386_GPFLT).
The process has been returned to the state before expression evaluation.

bt all

(lldb) bt all
  thread #1: tid = 0x4e7bc3, 0x00007fff99ea3386 libsystem_kernel.dylib`mach_msg_trap + 10, queue = 'com.apple.main-thread
    frame #0: 0x00007fff99ea3386 libsystem_kernel.dylib` mach_msg_trap  + 10
    frame #1: 0x00007fff99ea27c7 libsystem_kernel.dylib` mach_msg  + 55
    frame #2: 0x00007fff9e20d624 CoreFoundation` __CFRunLoopServiceMachPort  + 212
    frame #3: 0x00007fff9e20caec CoreFoundation` __CFRunLoopRun  + 1356
    frame #4: 0x00007fff9e20c338 CoreFoundation` CFRunLoopRunSpecific  + 296
    frame #5: 0x00007fff94f31935 HIToolbox` RunCurrentEventLoopInMode  + 235
    frame #6: 0x00007fff94f3176f HIToolbox` ReceiveNextEventCommon  + 432
    frame #7: 0x00007fff94f315af HIToolbox` _BlockUntilNextEventMatchingListInModeWithFilter  + 71
    frame #8: 0x00007fff954180ee AppKit` _DPSNextEvent  + 1067
    frame #9: 0x00007fff957e4943 AppKit` -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:]  + 454
    frame #10: 0x000000010079a3e3 libgdk-3.0.dylib` poll_func  + 172
    frame #11: 0x0000000100b323ce libglib-2.0.0.dylib` g_main_context_iterate  + 326
    frame #12: 0x0000000100b3247d libglib-2.0.0.dylib` g_main_context_iteration  + 55
    frame #13: 0x00000001009d40d2 libgio-2.0.0.dylib` g_application_run  + 410
    frame #14: 0x0000000100004dff one-video-gui` main(argc=1, argv=0x00007fff5fbfc908)  + 63 at ovg-main.c:74
    frame #15: 0x00007fff8fb0a5ad libdyld.dylib` start  + 1
    frame #16: 0x00007fff8fb0a5ad libdyld.dylib` start  + 1

  thread #3: tid = 0x4e7be3, 0x00007fff99ea9ff6 libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager
    frame #0: 0x00007fff99ea9ff6 libsystem_kernel.dylib` kevent_qos  + 10
    frame #1: 0x00007fff92b1e099 libdispatch.dylib` _dispatch_mgr_invoke  + 216
    frame #2: 0x00007fff92b1dd01 libdispatch.dylib` _dispatch_mgr_thread  + 52

  thread #4: tid = 0x4e7be4, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

  thread #6: tid = 0x4e7bf8, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

  thread #7: tid = 0x4e7c12, 0x00007fff99ea9176 libsystem_kernel.dylib`__select + 10, name = 'gmain
    frame #0: 0x00007fff99ea9176 libsystem_kernel.dylib` __select  + 10
    frame #1: 0x0000000100b3d8e3 libglib-2.0.0.dylib` g_poll  + 399
    frame #2: 0x0000000100b323ce libglib-2.0.0.dylib` g_main_context_iterate  + 326
    frame #3: 0x0000000100b3247d libglib-2.0.0.dylib` g_main_context_iteration  + 55
    frame #4: 0x0000000100b3355e libglib-2.0.0.dylib` glib_worker_main  + 53
    frame #5: 0x0000000100b52b49 libglib-2.0.0.dylib` g_thread_proxy  + 90
    frame #6: 0x00007fff98897c13 libsystem_pthread.dylib` _pthread_body  + 131
    frame #7: 0x00007fff98897b90 libsystem_pthread.dylib` _pthread_start  + 168
    frame #8: 0x00007fff98895375 libsystem_pthread.dylib` thread_start  + 13

  thread #10: tid = 0x4e7c4f, 0x00007fff99ea3386 libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread
    frame #0: 0x00007fff99ea3386 libsystem_kernel.dylib` mach_msg_trap  + 10
    frame #1: 0x00007fff99ea27c7 libsystem_kernel.dylib` mach_msg  + 55
    frame #2: 0x00007fff9e20d624 CoreFoundation` __CFRunLoopServiceMachPort  + 212
    frame #3: 0x00007fff9e20caec CoreFoundation` __CFRunLoopRun  + 1356
    frame #4: 0x00007fff9e20c338 CoreFoundation` CFRunLoopRunSpecific  + 296
    frame #5: 0x00007fff954d7065 AppKit` _NSEventThread  + 149
    frame #6: 0x00007fff98897c13 libsystem_pthread.dylib` _pthread_body  + 131
    frame #7: 0x00007fff98897b90 libsystem_pthread.dylib` _pthread_start  + 168
    frame #8: 0x00007fff98895375 libsystem_pthread.dylib` thread_start  + 13

  thread #11: tid = 0x4e7c54, 0x00007fff99ea9176 libsystem_kernel.dylib`__select + 10
    frame #0: 0x00007fff99ea9176 libsystem_kernel.dylib` __select  + 10
    frame #1: 0x0000000100b3d8e3 libglib-2.0.0.dylib` g_poll  + 399
    frame #2: 0x000000010079acb4 libgdk-3.0.dylib` select_thread_func  + 119
    frame #3: 0x00007fff98897c13 libsystem_pthread.dylib` _pthread_body  + 131
    frame #4: 0x00007fff98897b90 libsystem_pthread.dylib` _pthread_start  + 168
    frame #5: 0x00007fff98895375 libsystem_pthread.dylib` thread_start  + 13

  thread #12: tid = 0x4e7cd7, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

  thread #13: tid = 0x4e7cd8, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

  thread #14: tid = 0x4e7cd9, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

  thread #15: tid = 0x4e7cda, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

  thread #16: tid = 0x4e7cdb, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

  thread #18: tid = 0x4e7d6e, 0x00007fff99ea96de libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff99ea96de libsystem_kernel.dylib` __workq_kernreturn  + 10
    frame #1: 0x00007fff98897729 libsystem_pthread.dylib` _pthread_wqthread  + 1283
    frame #2: 0x00007fff98895365 libsystem_pthread.dylib` start_wqthread  + 13

* thread #17: tid = 0x4e7d73, 0x0000000100b3859c libglib-2.0.0.dylib`_g_log_abort + 22, name = 'pool, stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
    frame #0: 0x0000000100b3859c libglib-2.0.0.dylib` _g_log_abort  + 22
    frame #1: 0x0000000100b37f2d libglib-2.0.0.dylib` g_logv  + 798
    frame #2: 0x0000000100b37bfa libglib-2.0.0.dylib` g_log  + 134
    frame #3: 0x0000000100057087 libgstreamer-1.0.0.dylib` gst_caps_intersect_full(caps1=<unavailable>, caps2=<unavailable>, mode=<unavailable>)  + 279 at gstcaps.c:1658
  * frame #4: 0x000000010001c5bf libonevideo.0.dylib` ov_aggregate_call_details_for_remotes(local=0x00000001038491c0, in=0x000000010185a640, call_id=864265420267)  + 1343 at outgoing.c:533
    frame #5: 0x000000010001b5ed libonevideo.0.dylib` ov_local_peer_negotiate_thread(task=0x0000000103885a70, local=0x00000001038491c0, task_data=0x0000000000000000, cancellable=0x000000010d507a70)  + 1085 at outgoing.c:933
    frame #6: 0x00000001009b5dce libgio-2.0.0.dylib` g_task_thread_pool_thread  + 247
    frame #7: 0x0000000100b537ed libglib-2.0.0.dylib` g_thread_pool_thread_proxy  + 37
    frame #8: 0x0000000100b52b49 libglib-2.0.0.dylib` g_thread_proxy  + 90
    frame #9: 0x00007fff98897c13 libsystem_pthread.dylib` _pthread_body  + 131
    frame #10: 0x00007fff98897b90 libsystem_pthread.dylib` _pthread_start  + 168
    frame #11: 0x00007fff98895375 libsystem_pthread.dylib` thread_start  + 13
jhgorse commented 8 years ago

This apparently affects Linux just as well, if the source video camera is the Apple Facetime via v4l2.

gst-device-monitor-1.0 Video/Sources
Probing devices...

Failed to start device monitor!
[gst-master] [jhg@omega onevideo]$ gst-device-monitor-1.0 Video/Source
Probing devices...

Device found:

    name  : FaceTime HD Camera (Built-in)
    class : Video/Source
    caps  : video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction)10/1;
            video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            video/x-raw, format=(string)YUY2, width=(int)480, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            video/x-raw, format=(string)YUY2, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            video/x-raw, format=(string)YUY2, width=(int)176, height=(int)144, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            video/x-raw, format=(string)YUY2, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            image/jpeg, width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
            image/jpeg, width=(int)960, height=(int)544, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
    properties:
        device.path = /dev/video0
        udev-probed = false
        device.api = v4l2
        v4l2.device.driver = uvcvideo
        v4l2.device.card = "FaceTime\ HD\ Camera\ \(Built-in\)"
        v4l2.device.bus_info = usb-0000:00:1a.0-1.1
        v4l2.device.version = 262148 (0x00040004)
        v4l2.device.capabilities = 2216689665 (0x84200001)
        v4l2.device.device_caps = 69206017 (0x04200001)
#3  0x00007ffff4b2fee9 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=pretty_function@entry=0x7ffff7759880 <__func__.20241> "gst_caps_intersect_full", expression=expression@entry=0x7ffff7759358 "GST_IS_CAPS (caps1)") at gmessages.c:1088
#4  0x00007ffff76cfd4f in gst_caps_intersect_full (caps1=<optimized out>, caps2=<optimized out>, mode=<optimized out>)
    at gstcaps.c:1658
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator': 
#5  0x00007ffff7bceb74 in ov_aggregate_call_details_for_remotes (local=0x9d31a0 [OvLocalPeer], in=0xb39b00, call_id=8429511061)
    at onevideo/outgoing.c:533
(gdb) fr 5
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator': 
#5  0x00007ffff7bceb74 in ov_aggregate_call_details_for_remotes (local=0x9d31a0 [OvLocalPeer], in=0xb39b00, call_id=8429511061)
    at onevideo/outgoing.c:533
533       tmp = gst_caps_intersect (thiscaps[1], thatcaps[3]);
(gdb) list
528       g_assert (thatcaps);
529       /* this.send_acaps = this.send_acaps.intersect(that.recv_acaps) */
530       tmp = gst_caps_intersect (thiscaps[0], thatcaps[2]);
531       gst_caps_unref (thiscaps[0]), thiscaps[0] = tmp;
532       /* this.send_vcaps = this.send_vcaps.intersect(that.recv_vcaps) */
533       tmp = gst_caps_intersect (thiscaps[1], thatcaps[3]);
534       gst_caps_unref (thiscaps[1]), thiscaps[1] = tmp;
535     }
536   }
537 
(gdb) thread apply all bt

Thread 5 (Thread 0x7fffd9a86700 (LWP 9309)):
#0  0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7fffd40008c0, timeout=<optimized out>, context=0x859180) at gmain.c:4103
#2  0x00007ffff4b28dbc in g_main_context_iterate (context=context@entry=0x859180, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3  0x00007ffff4b28ecc in g_main_context_iteration (context=0x859180, may_block=may_block@entry=1) at gmain.c:3869
#4  0x00007ffff4b28f09 in glib_worker_main (data=<optimized out>) at gmain.c:5618
#5  0x00007ffff4b500a5 in g_thread_proxy (data=0x85ab70) at gthread.c:764
#6  0x00007ffff48ca555 in start_thread (arg=0x7fffd9a86700) at pthread_create.c:333
#7  0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fffd3fff700 (LWP 9311)):
#0  0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7fffc80010c0, timeout=<optimized out>, context=0x7fffcc01a4f0) at gmain.c:4103
#2  0x00007ffff4b28dbc in g_main_context_iterate (context=context@entry=0x7fffcc01a4f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3  0x00007ffff4b28ecc in g_main_context_iteration (context=context@entry=0x7fffcc01a4f0, may_block=may_block@entry=1) at gmain.c:3869
#4  0x00007fffd867a2ad in dconf_gdbus_worker_thread (user_data=0x7fffcc01a4f0) at dconf-gdbus-thread.c:82
#5  0x00007ffff4b500a5 in g_thread_proxy (data=0x7fffcc0039e0) at gthread.c:764
#6  0x00007ffff48ca555 in start_thread (arg=0x7fffd3fff700) at pthread_create.c:333
---Type <return> to continue, or q <return> to quit---
#7  0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fffd9285700 (LWP 9310)):
#0  0x00007ffff4b2fd3b in g_logv (breakpoint=1) at gmessages.c:315
#1  0x00007ffff4b2fd3b in g_logv (log_domain=0x7ffff77542d0 <g_log_domain_gstreamer> "GStreamer", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffd9284860) at gmessages.c:1041
#2  0x00007ffff4b2feaf in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff4b9f95d "%s: assertion '%s' failed") at gmessages.c:1079
#3  0x00007ffff4b2fee9 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=pretty_function@entry=0x7ffff7759880 <__func__.20241> "gst_caps_intersect_full", expression=expression@entry=0x7ffff7759358 "GST_IS_CAPS (caps1)") at gmessages.c:1088
#4  0x00007ffff76cfd4f in gst_caps_intersect_full (caps1=<optimized out>, caps2=<optimized out>, mode=<optimized out>)
    at gstcaps.c:1658
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator': 
#5  0x00007ffff7bceb74 in ov_aggregate_call_details_for_remotes (local=0x9d31a0 [OvLocalPeer], in=0xb39b00, call_id=8429511061)
    at onevideo/outgoing.c:533
#6  0x00007ffff7bcfeee in ov_local_peer_negotiate_thread (task=0x86c9b0 [GTask], local=0x9d31a0 [OvLocalPeer], task_data=0x0, cancellable=0xa774d0 [GCancellable]) at onevideo/outgoing.c:933
#7  0x00007ffff50f0895 in g_task_thread_pool_thread (thread_data=0x86c9b0, pool_data=<optimized out>) at gtask.c:1231
#8  0x00007ffff4b50a3e in g_thread_pool_thread_proxy (data=<optimized out>) at gthreadpool.c:307
#9  0x00007ffff4b500a5 in g_thread_proxy (data=0xb7f450) at gthread.c:764
#10 0x00007ffff48ca555 in start_thread (arg=0x7fffd9285700) at pthread_create.c:333
#11 0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fffe67bd700 (LWP 9307)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=2, fds=0x7fffe00010e0, timeout=<optimized out>, context=0x65aa10) at gmain.c:4103
#2  0x00007ffff4b28dbc in g_main_context_iterate (context=0x65aa10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3  0x00007ffff4b29142 in g_main_loop_run (loop=0x65a9a0) at gmain.c:4002
#4  0x00007ffff514a696 in gdbus_shared_thread_func (user_data=0x65a9e0) at gdbusprivate.c:274
#5  0x00007ffff4b500a5 in g_thread_proxy (data=0x63cb20) at gthread.c:764
#6  0x00007ffff48ca555 in start_thread (arg=0x7fffe67bd700) at pthread_create.c:333
#7  0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff7fba980 (LWP 9303)):
#0  0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=8, fds=0xb52ba0, timeout=<optimized out>, context=0x648d20) at gmain.c:4103
#2  0x00007ffff4b28dbc in g_main_context_iterate (context=context@entry=0x648d20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3  0x00007ffff4b28ecc in g_main_context_iteration (context=0x648d20, context@entry=0x0, may_block=may_block@entry=1) at gmain.c:3869
#4  0x00007ffff511426c in g_application_run (application=0x621100 [OvgApp], argc=4, argv=0x7fffffffb888) at gapplication.c:2308
#5  0x000000000040743e in main (argc=4, argv=0x7fffffffb888) at gui/ovg-main.c:74
jhgorse commented 8 years ago

linux w/ facetime camera ./debug-one-video-gui.sh -p 5015 --low-res=0 ... snip onevideo onevideo/lib.c:739:ov_local_peer_set_video_device: Supported send vcaps: EMPTY

jhgorse commented 8 years ago

./memcheck-one-video-gui.sh --low-res=0 ... snip 0:00:03.188003923 9644 0xfe753c0 DEBUG onevideo onevideo/lib.c:739:ov_local_peer_set_video_device: Supported send vcaps: EMPTY 0:00:06.541192772 9644 0xfe753c0 DEBUG onevideo onevideo/lib.c:1076:ov_local_peer_discovery_start: Searching for remote peers Adding new row: 192.168.88.202:5000 Waiting for remote peers 0:00:30.479558332 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type start negotiating to the network; contents: (217613236173, 'omega.local:5000-89aa41670e9661959e2555da56c1f669', 5000) 0:00:30.513550227 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type ok, can negotiate and version 1 of length 68 bytes 0:00:30.530290722 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:209:ov_remote_peer_tcp_client_start_negotiate: Recvd OK from 'localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650' Remotes have replied; continuing negotiation... 0:00:30.537443522 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:313:get_all_remotes_addr_list_except_this: Peers (other than us) remote to peer localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650: (217613236173, []) 0:00:30.544427233 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type query media caps to the network; contents: (217613236173, []) 0:00:30.549952197 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type reply media caps and version 1 of length 468 bytes 0:00:30.555130794 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:337:ov_remote_peer_tcp_client_query_caps: Reply caps from localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650: (217613236173, 5001, 5002, 'audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved', 'image/jpeg, width=(int)1280, height=(int)720, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)640, height=(int)360, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)320, height=(int)240, framerate=(fraction){ 10/1, 5/1 }', 'audio/x-opus', 'image/jpeg; video/x-h264', [('omega.local:5000-89aa41670e9661959e2555da56c1f669', 5003, 5004, 5005, 5006)])

(OneVideo:9644): GStreamer-CRITICAL **: gst_caps_intersect_full: assertion 'GST_IS_CAPS (caps1)' failed 0:00:30.584391869 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:588:ov_aggregate_call_details_for_remotes: Set remote peer call details: localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650, [5003, 5004, 5001, 5005, 5006, 5002] 0:00:30.589063815 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:647:ov_aggregate_call_details_for_remotes: aggports table is: From: omega.local:5000-89aa41670e9661959e2555da56c1f669 To: localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650 Ports: [5003, 5004, 5001, 5005, 5006, 5002] From: localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650 To: omega.local:5000-89aa41670e9661959e2555da56c1f669 Ports: [5003, 5004, 5001, 5005, 5006, 5002]

(OneVideo:9644): GStreamer-CRITICAL **: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(OneVideo:9644): GStreamer-CRITICAL **: gst_structure_get_name: assertion 'structure != NULL' failed

(OneVideo:9644): GStreamer-CRITICAL *_: gst_mini_object_unref: assertion 'mini_object != NULL' failed 0:00:30.610684033 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type call details to the network; contents: (217613236173, 'audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved', 'image/jpeg, width=(int)1280, height=(int)720, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)640, height=(int)360, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)320, height=(int)240, framerate=(fraction){ 10/1, 5/1 }', [('omega.local:5000-89aa41670e9661959e2555da56c1f669', 'audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved', 'NULL', 5003, 5004, 5001, 5005, 5006, 5002)]) 0:00:30.618762847 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type acknowledged and version 1 of length 8 bytes 0:00:30.622025301 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:746:ov_remote_peer_tcp_client_send_call_details: Recvd from 'localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650' ACK 0:00:30.629495933 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:279:get_all_peers_list_except_this: Peers remote to peer localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650: (217613236173, ['omega.local:5000-89aa41670e9661959e2555da56c1f669']) 0:00:30.634690282 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type start call to the network; contents: (217613236173, ['omega.local:5000-89aa41670e9661959e2555da56c1f669']) 0:00:30.640185270 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type acknowledged and version 1 of length 8 bytes 0:00:30.641542592 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:789:ov_remote_peer_tcp_client_start_call: Recvd from 'localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650' ACK ./memcheck-one-video-gui.sh: line 13: 9644 Killed G_SLICE="always-malloc" G_DEBUG="$G_DEBUG,gc-friendly" GSTDEBUG=":3,onevideo:6,$GST_DEBUG" $LIBTOOL --mode=execute valgrind --suppressions="${build_dir}"/tests/supp/gst.supp --tool=memcheck --leak-check=full --show-leak-kinds=definite,indirect --leak-resolution=high --num-callers=30 --log-file="${VALGRIND_LOG}" "${build_dir}"/${progtype}/one-video-${progtype} "$@"

valgrind log

jhgorse commented 8 years ago

GST_DEBUG 6 dump on linux fedora22 side

jhgorse commented 8 years ago

13 0x00007ffff7bc6d63 in ov_local_peer_setup_transmit_pipeline (local=0x9d41a0 [OvLocalPeer]) at onevideo/ov-local-peer-setup.c:247

priv->video_device is not defined (crashes when gdb$ print gst_device_get_display_name (priv->video_device) )

jhgorse commented 8 years ago

Different failures for the two different C920 cameras. One has H264, which gets selected and fails local_peer_setup_transmit_pipeline. The other which does not support H264, ov_aggregate_call_details_for_remotes.

jhgorse commented 8 years ago
b lib.c:752 
priv->video_device = device;
n
(gdb) p gst_device_get_display_name (device)
$2 = (gchar *) 0x85ac70 "UVC Camera (046d:0821)"
(gdb) p gst_device_get_display_name (priv->video_device)
$3 = (gchar *) 0x85a3b0 "UVC Camera (046d:0821)"
watch priv->video_device
Hardware watchpoint 4: priv->video_device
(gdb) c
Continuing.

Watchpoint 4 deleted because the program has left the block in
which its expression is valid.
ovg_app_startup (app=0x621100 [OvgApp]) at gui/ovg-app.c:199
199   g_list_free_full (devices, g_object_unref);
(gdb) bt
#0  0x0000000000404795 in ovg_app_startup (app=0x621100 [OvgApp]) at gui/ovg-app.c:199
#1  0x00007ffff4e28f04 in _g_closure_invoke_va (closure=closure@entry=0x613bb0, return_value=return_value@entry=0x0, instance=instance@entry=0x621100, args=args@entry=0x7fffffffb4c0, n_params=<optimized out>, param_types=0x0) at gclosure.c:831
#2  0x00007ffff4e42c7d in g_signal_emit_valist (instance=0x621100, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffb4c0) at gsignal.c:3214
#3  0x00007ffff4e4329f in g_signal_emit (instance=instance@entry=0x621100, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3361
#4  0x00007ffff5113712 in g_application_register (application=application@entry=0x621100 [OvgApp], cancellable=cancellable@entry=0x0, error=error@entry=0x7fffffffb600) at gapplication.c:2012
#5  0x00007ffff5113e97 in g_application_real_local_command_line (application=0x621100 [OvgApp], arguments=0x7fffffffb6f8, exit_status=0x7fffffffb6f4) at gapplication.c:980
#6  0x00007ffff51141da in g_application_run (application=0x621100 [OvgApp], argc=4, argv=0x7fffffffb868) at gapplication.c:2277
#7  0x000000000040743e in main (argc=4, argv=0x7fffffffb868) at gui/ovg-main.c:74
jhgorse commented 8 years ago

ec03420 Fixed in: 3a4ab3ab5b0bc6618007aec264b8610f693ed339 and ec03420dbacbba2cb524544c45e686a13ea5e39b

jhgorse commented 8 years ago

Do we need to add a unref() to balance the ref()?

tp-m commented 8 years ago

Probably, maybe like this (untested):

diff --git a/onevideo/ov-local-peer.c b/onevideo/ov-local-peer.c
index 63d3320..a1f3f35 100644
--- a/onevideo/ov-local-peer.c
+++ b/onevideo/ov-local-peer.c
@@ -377,6 +377,7 @@ ov_local_peer_dispose (GObject * object)
   g_clear_pointer (&priv->send_acaps, gst_caps_unref);
   g_clear_pointer (&priv->send_vcaps, gst_caps_unref);

+  g_clear_object (&priv->video_device);
   g_clear_object (&priv->transmit_vcapsfilter);
   g_clear_object (&priv->transmit);
   g_clear_object (&priv->playback);