Skip to content

fix: report Java exceptions from native callbacks in one piece - #451

Merged
devopvoid merged 1 commit into
mainfrom
fix/jni-exception-reports
Oct 26, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/jni-exception-reports

Conversation

@devopvoid

@devopvoid devopvoid commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

ExceptionDescribe writes Exception in thread ... to native stderr and the stack trace to System.err. The prefixes piled up unterminated until a native line ended them (on macOS the Java2D GL warning during VideoViewTests), and setup-java's problem matcher turned that line into a failure annotation on every macOS test job, green or not.

  • Callbacks that clear a Java exception hand it to the thread's uncaught exception handler, as the other callbacks already do. LogSink prints the stack trace instead, since WebRTC holds its logging lock there.
  • jni-voithos ExceptionCheck no longer describes the exception it rethrows.
  • webrtc-media gets the same ReportPendingException in JniBoundary.

ExceptionDescribe writes "Exception in thread ..." to native stderr and the
stack trace to System.err. The prefixes piled up unterminated until a native
line ended them (on macOS the Java2D GL warning in VideoViewTests), and
setup-java's problem matcher turned that line into an error annotation on
every macOS test job.

Hand such exceptions to the thread's uncaught exception handler instead, as
other callbacks already do, and stop describing in ExceptionCheck, whose
exception travels on to be rethrown or reported.
@devopvoid
devopvoid merged commit c01723c into main Oct 26, 2026
25 checks passed
@devopvoid
devopvoid deleted the fix/jni-exception-reports branch October 26, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant