Re: [Opalvoip-user] Segmentation fault with V4L2
Brought to you by:
csoutheren,
rjongbloed
From: Denis L. <den...@go...> - 2011-11-28 16:53:35
|
Hello again, I am still facing major problems with simpleopal. I tried to call two simpleopal clients in the same network via IP address. The call is being established, but Party B crashes with a full system freeze immediately after the camera is beeing accessed. When I was using an opal version 26636 against 26691, the latter one will crash when I initiate a call from the old version to the new version. It does NOT crash, when I try it vice versa. Two old clients will not crash, but two new clients does. It is always the called party which fails. I checked the codecs H.261, H.263P and H.264-1 by choosing the Fake/BouncingBoxes video, which works in both directions for all of them. When I do the same tests with a usb video camera connected to the new client, the old client uses Fake/BouncingBoxes, the new client system crashes. Same test, camera connected to the old client, the new client is faking boxes, the new client system does not crash. If logs are required, I can provide as many as possible. However, when the system freezes, it is very likely that they are empty. 2011/11/24 Denis Loh <den...@go...> > I did some additional tests: when I call a service number, which > automatically plays an H.264 file, everything works fine. However, do I try > the same setup with a Polycom VVX hardphone my system freezes. > > I created a picture, because the log broke up after registering. The rest > was not saved. > > http://imageshack.us/photo/my-images/337/20111124155147828.jpg/ > > First, I thought, it's the libx264, but I disabled those codecs and used > H.263P instead, where I got exact the same behavior. > > > 2011/11/24 Denis Loh <den...@go...> > >> I still have some issues with my webcam. Simpleopal won't open the camera: >> >> 0:13.702 Pool:0xb7579b70 call.cxx(653) Call >> Selected media formats YUV420P -> H.264-1 >> 0:13.702 Pool:0xb7579b70 vidinput_v4l2.cxx(982) >> Detecting V4L2 devices >> 0:13.703 Pool:0xb7579b70 vidinput_v4l2.cxx(1029) >> PV4L2Plugin detected device metadata at /sys/class/video4linux/ >> 0:13.785 Pool:0xb7579b70 vidinput_v4l2.cxx(159) >> PVidInDev Open() videoFd:-1 >> 0:13.785 Pool:0xb7579b70 vidinput_v4l2.cxx(239) >> PVidInDev Close() videoFd:-1 started:0 >> 0:13.785 Pool:0xb7579b70 vidinput_v4l2.cxx(982) >> Detecting V4L2 devices >> 0:13.785 Pool:0xb7579b70 vidinput_v4l2.cxx(1029) >> PV4L2Plugin detected device metadata at /sys/class/video4linux/ >> 0:13.866 Pool:0xb7579b70 vidinput_v4l2.cxx(163) >> PVidInDev Open() devName:/dev/video3 videoFd:-1 >> 0:13.886 Pool:0xb7579b70 vidinput_v4l2.cxx(367) >> VideoInputDevice S_STD failed : Invalid argument >> 0:13.886 Pool:0xb7579b70 vidinput_v4l2.cxx(466) >> PVidInDev S_FMT failed : Device or resource busy >> 0:13.886 Pool:0xb7579b70 vidinput_v4l2.cxx(467) >> used code of 1196444237 for palette: YUV420P >> 0:13.886 Pool:0xb7579b70 vidinput_v4l2.cxx(367) >> VideoInputDevice S_STD failed : Invalid argument >> 0:13.886 Pool:0xb7579b70 vidinput_v4l2.cxx(402) >> VideoInputDevice S_INPUT failed : Device or resource busy >> 0:13.886 Pool:0xb7579b70 vidinput_v4l2.cxx(239) >> PVidInDev Close() videoFd:51 started:0 >> 0:13.887 Pool:0xb7579b70 vidinput_v4l2.cxx(256) >> PVidInDev Close() videoFd:-1 started:0 >> 0:13.887 Pool:0xb7579b70 manager.cxx(980) >> OpalCon Could not open video device "UVC Camera (046d:0991)" >> >> ptlib/sample/vidtest works. I was able to open the camera with respect of >> the issues in my previous emails. >> >> Another thing is, that if you don't set a video preview device, opal >> crashes with a segfault. The patch below will fix it. >> >> Index: connection.cxx >> =================================================================== >> --- connection.cxx (Revision 26691) >> +++ connection.cxx (Arbeitskopie) >> @@ -860,8 +860,9 @@ >> >> PVideoOutputDevice * previewDevice; >> PBoolean autoDeletePreview; >> - if (!CreateVideoOutputDevice(mediaFormat, PTrue, previewDevice, >> autoDeletePreview)) { >> + if (CreateVideoOutputDevice(mediaFormat, PTrue, previewDevice, >> autoDeletePreview)) { >> PTRACE(4, "OpalCon\tCreated preview device \"" << >> previewDevice->GetDeviceName() << '"'); >> + } else { >> previewDevice = NULL; >> } >> return new OpalVideoMediaStream(*this, mediaFormat, sessionID, >> videoDevice, previewDevice, autoDeleteGrabber, autoDeletePreview); >> >> >> ---------- Forwarded message ---------- >> From: Denis Loh <den...@go...> >> Date: 2011/11/24 >> Subject: Re: [Opalvoip-user] Segmentation fault with V4L2 >> To: Eugen Dedu <Eug...@pu...> >> >> >> I retried a fresh copy of the latest svn on a second machine and I got >> the same segfault with vidtest. I found out, that it is not the libv4l >> which is causing the problem but the Videooutputdevice_SDL plugin. When I >> switch from qcif to cif resolution the camera stuck to cif. The output >> device still gets frame data but with the wrong data size which leads to a >> segmentation fault. >> >> Unfortunately, the size of the data pointer is unknown in the >> SetFrameData method, so I cannot prevent the plugin from copying a bigger >> memory block than actually available. >> >> >> 2011/11/23 Eugen Dedu <Eug...@pu...> >> >>> On 23/11/11 13:47, Denis Loh wrote: >>> > Hi, >>> > >>> > I have an issue with the latest svn of opal and ptlib where I cannot >>> make >>> > video calls with v4l2. When I try to use vidtest to verify the camera >>> I got >>> > this log: >>> > >>> > 0:00.005 vidtest (0) >>> Version >>> > 1.0.0 by PwLib Video Example on Unix Linux (2.6.32-33-generic-i686) >>> with >>> > PTLib (v2.10beta4 (svn:26606)) at 2011/11/23 13:16:08.588 >>> > 0:00.005 vidtest vidinput_v4l2.cxx(985) >>> > Detecting V4L2 devices >>> > 0:00.005 vidtest vidinput_v4l2.cxx(1032) >>> > PV4L2Plugin detected device metadata at /sys/class/video4linux/ >>> > 0:00.031 vidtest vidinput_v4l2.cxx(159) >>> > PVidInDev Open() videoFd:-1 >>> > 0:00.031 vidtest vidinput_v4l2.cxx(239) >>> > PVidInDev Close() videoFd:-1 started:0 >>> > 0:00.031 vidtest vidinput_v4l2.cxx(985) >>> > Detecting V4L2 devices >>> > 0:00.031 vidtest vidinput_v4l2.cxx(1032) >>> > PV4L2Plugin detected device metadata at /sys/class/video4linux/ >>> > 0:00.059 vidtest vidinput_v4l2.cxx(163) >>> > PVidInDev Open() devName:/dev/video0 videoFd:-1 >>> > 0:00.068 vidtest vidinput_v4l2.cxx(367) >>> > VideoInputDevice S_STD failed : Invalid argument >>> > 0:00.303 vidtest vidinput_v4l2.cxx(985) >>> > Detecting V4L2 devices >>> > 0:00.303 vidtest vidinput_v4l2.cxx(1032) >>> > PV4L2Plugin detected device metadata at /sys/class/video4linux/ >>> > 0:00.335 vidtest vsdl.cxx(129) VSDL >>> > Compiled version: 1.2.14 Run-Time version: 1.2.14 >>> > 0:00.335 vidtest osutil.cxx(189) >>> PWLib >>> > File handle high water mark set: 8 Thread unblock pipe >>> > 0:00.335 vidtest tlibthrd.cxx(423) >>> PTLib >>> > Created thread 0x8a4f9a8 SDL >>> > 0:00.335 vidtest tlibthrd.cxx(588) >>> PTLib >>> > Thread high water mark set: 2 >>> > 0:00.335 SDL:0xb77cab70 tlibthrd.cxx(500) >>> PTLib >>> > Started thread 0x8a4f9a8 (3020) SDL:0xb77cab70 >>> > 0:00.335 SDL:0xb77cab70 vsdl.cxx(135) VSDL >>> > Start of event thread >>> > 0:00.607 vidtest vidinput_v4l2.cxx(568) >>> > PVidInDev Waiting for the device to close >>> > 0:01.843 vidtest osutil.cxx(189) >>> PWLib >>> > File handle high water mark set: 12 Thread unblock pipe >>> > 0:01.843 vidtest tlibthrd.cxx(423) >>> PTLib >>> > Created thread 0x8a775f8 GrabAndDisplay >>> > 0:01.843 vidtest tlibthrd.cxx(588) >>> PTLib >>> > Thread high water mark set: 3 >>> > 0:01.843 GrabAndDis...0xb75c8b70 tlibthrd.cxx(500) >>> PTLib >>> > Started thread 0x8a775f8 (3021) GrabAndDisplay:0xb75c8b70 >>> > 0:03.149 GrabAndDis...0xb75c8b70 videoio.cxx(857) >>> > PVidDev SetFrameSize to 176x144 >>> > 0:08.594 vidtest videoio.cxx(857) >>> > PVidDev SetFrameSize to 352x288 >>> > 0:08.710 vidtest vidinput_v4l2.cxx(568) >>> > PVidInDev Waiting for the device to close >>> > 0:09.711 vidtest vidinput_v4l2.cxx(784) >>> > PVidInDev S_FMT failed : Device or resource busy >>> > 0:09.712 vidtest vidinput_v4l2.cxx(785) >>> used >>> > frame size of 176x144 >>> > 0:09.712 vidtest vidinput_v4l2.cxx(572) >>> > PVidInDev VerifyHardwareFrameSize failed for size 352x288 >>> > 0:09.712 vidtest vidinput_v4l2.cxx(568) >>> > PVidInDev Waiting for the device to close >>> > 0:10.712 vidtest vidinput_v4l2.cxx(784) >>> > PVidInDev S_FMT failed : Device or resource busy >>> > 0:10.712 vidtest vidinput_v4l2.cxx(785) >>> used >>> > frame size of 176x144 >>> > 0:10.712 vidtest vidinput_v4l2.cxx(572) >>> > PVidInDev VerifyHardwareFrameSize failed for size 352x288 >>> > 0:10.713 vidtest vidinput_v4l2.cxx(985) >>> > Detecting V4L2 devices >>> > 0:10.713 vidtest vidinput_v4l2.cxx(1032) >>> > PV4L2Plugin detected device metadata at /sys/class/video4linux/ >>> > 0:10.747 vidtest videoio.cxx(785) >>> > PVidDev Cannot set an apropriate size to scale from. >>> > 0:10.747 vidtest videoio.cxx(857) >>> > PVidDev SetFrameSize to 352x288 >>> > >>> > I tried to change the recording size from qcif to cif, which leads to >>> an >>> > segfault. When I try to use simpleopal, I get a full system freeze. >>> >>> I think you need to send us a gdb stack trace. >>> >>> -- >>> Eugen >>> >>> >>> ------------------------------------------------------------------------------ >>> All the data continuously generated in your IT infrastructure >>> contains a definitive record of customers, application performance, >>> security threats, fraudulent activity, and more. Splunk takes this >>> data and makes sense of it. IT sense. And common sense. >>> http://p.sf.net/sfu/splunk-novd2d >>> _______________________________________________ >>> Opalvoip-user mailing list >>> Opa...@li... >>> https://lists.sourceforge.net/lists/listinfo/opalvoip-user >>> >> >> >> > |