Bug 196573 - Add logging and ASSERTs to investigate issue with VPModuleInitialize
Summary: Add logging and ASSERTs to investigate issue with VPModuleInitialize
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-03 15:54 PDT by youenn fablet
Modified: 2019-04-03 20:36 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.98 KB, patch)
2019-04-03 16:12 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (4.09 KB, patch)
2019-04-03 18:38 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>