Skip to content

Commit ea935a9

Browse files
committed
Bug 1999994 - catch NPE during IPC. r=geckoview-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D272738
1 parent 3fd0993 commit ea935a9

File tree

1 file changed

+6
-2
lines changed
  • mobile/android/geckoview/src/main/java/org/mozilla/gecko/media

1 file changed

+6
-2
lines changed

mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/CodecProxy.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,12 @@ public synchronized boolean releaseOutput(final Sample sample, final boolean ren
441441
try {
442442
mRemote.releaseOutput(sample, render);
443443
} catch (final RemoteException e) {
444-
Log.e(LOGTAG, "remote fail to release output:" + sample.info.presentationTimeUs);
445-
e.printStackTrace();
444+
Log.e(LOGTAG, "remote fail to release output:" + sample.info.presentationTimeUs, e);
445+
} catch (final NullPointerException npe) {
446+
// Sometimes NPE happens when unmarshalling IPC reply, but it's fine because
447+
// releasing/rendering has been done remotely already.
448+
Log.d(
449+
LOGTAG, "ignore NPE when " + (render ? "render" : "release") + " output: " + sample, npe);
446450
}
447451
sample.dispose();
448452

0 commit comments

Comments
 (0)