Bug 196573

Summary: Add logging and ASSERTs to investigate issue with VPModuleInitialize
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description youenn fablet 2019-04-03 15:54:27 PDT
Add logging and ASSERTs to investigate issue with VPModuleInitialize
Comment 1 youenn fablet 2019-04-03 16:12:54 PDT
Created attachment 366663 [details]
Patch
Comment 2 youenn fablet 2019-04-03 18:38:52 PDT
Created attachment 366688 [details]
Patch
Comment 3 Eric Carlson 2019-04-03 19:49:41 PDT
Comment on attachment 366688 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366688&action=review

> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp:81
> +    if (!library)
> +        fprintf(stderr, "Cannot find VideoProcessingLibrary: %s\n", dlerror());
> +    softLinkVideoProcessingVPModuleInitialize = (void (*)()) dlsym(library, "VPModuleInitialize");
> +    if (!softLinkVideoProcessingVPModuleInitialize)
> +        fprintf(stderr, "Cannot find function VPModuleInitialize: %s\n", dlerror());

Is it OK that we will crash after logging either of these errors? Is it possible to fall back to use an alternative library if this fails?
Comment 4 youenn fablet 2019-04-03 20:07:50 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 366688 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=366688&action=review
> 
> > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.cpp:81
> > +    if (!library)
> > +        fprintf(stderr, "Cannot find VideoProcessingLibrary: %s\n", dlerror());
> > +    softLinkVideoProcessingVPModuleInitialize = (void (*)()) dlsym(library, "VPModuleInitialize");
> > +    if (!softLinkVideoProcessingVPModuleInitialize)
> > +        fprintf(stderr, "Cannot find function VPModuleInitialize: %s\n", dlerror());
> 
> Is it OK that we will crash after logging either of these errors? Is it
> possible to fall back to use an alternative library if this fails?

This patch is merely trying to investigate things and it is good to continue crashing to further investigate.
If we do not find a solution, we could try to skip calling VPModuleInitialize.
It might be that encoding would fail or would fallback to the regular VTB encoder.
Comment 5 WebKit Commit Bot 2019-04-03 20:34:58 PDT
Comment on attachment 366688 [details]
Patch

Clearing flags on attachment: 366688

Committed r243850: <https://trac.webkit.org/changeset/243850>
Comment 6 WebKit Commit Bot 2019-04-03 20:35:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-04-03 20:36:17 PDT
<rdar://problem/49590120>