…ready gone
When a meeting was ended while one of its presentations was being
prepared for conversion, bbb-web logged "Error in Presentation service:"
with a NullPointerException from
PresentationFileProcessor.determineNumberOfPages. The scheduler in
PresentationService hands a file over only once it finds the meeting
started, but process() then looked the meeting up twice more: once,
null-safe, for the conversion cache check, and once in
determineNumberOfPages, which read meeting.getMaxNumPages() without a
check. A meeting removed between the scheduler's check and that second
lookup left it null. Ending a meeting about 150 ms after create, while
its default presentation is processed, hit this on every try.
Look the meeting up once at the start of process() and use that
reference for both the cache check and the page limit. When the meeting
is no longer there, log one presentation_conversion_meeting_gone line at
WARN and return before the page count, so nothing is converted or sent
for a meeting that has ended. The same return covers images, which did
not fail but were still converted for the ended meeting. A meeting that
is still running is processed as before.
PresentationFileProcessorTest covers both cases: without a meeting,
process() returns without calling the page counter or the notifier; with
a meeting, the page counter receives the meeting's maxNumPages. Against
the previous code the first case fails with the same
NullPointerException at PresentationFileProcessor.java:274.
What does this PR do?
Stops bbb-web from logging a
NullPointerExceptionwith a 60-line stack trace every time a meeting is ended while one of its presentations is waiting to be converted.PresentationFileProcessor.process()is handed a file once the scheduler inPresentationServicehas found the meeting started. It then looked the meeting up twice more: once, null-safe, for the conversion-cache check, and once indetermineNumberOfPages(), which readmeeting.getMaxNumPages()without a check. A meeting removed between the scheduler's check and that second lookup left itnull:Every meeting processes the default presentation, so no upload is needed:
createfollowed byendabout 150 ms later hits it on every try, and API-level tests do exactly that. On one dev server running the Playwright suite the trace appeared 33 times in a day, 30 of them from API-only tests.The change:
process()looks the meeting up once, at the start, and uses that reference for the cache check and for the page limit (determineNumberOfPages(pres, meeting)); the second lookup is gone.presentation_conversion_meeting_goneline at WARN, in the file's--analytics--style, and returns before the page count. Nothing is converted or sent for a meeting that has ended. The same early return covers image uploads, which did not fail before but were still converted for the ended meeting.Closes Issue(s)
None filed; found while reconfirming the 4.0.1 release notes on a dev server.
Motivation
An ended meeting is a normal event, not an error, and the trace buried real conversion errors in
bbb-web.log.How to test
Unit test:
PresentationFileProcessorTest(ScalaTest, bbb-common-web). Without a meeting,process()returns without calling the page counter or the notifier; with a meeting, the page counter receives the meeting'smaxNumPages. Against the previous code the first case fails with the productionNullPointerExceptionatPresentationFileProcessor.java:274.Note on the harness: plain
sbt testin bbb-common-web does not compile onv4.0.x-developtoday because seven older test files still use the ScalaTest 3.0 API (FlatSpec/Matchers) against the resolved 3.2.11, and the HTML reporter lacks flexmark; this PR does not touch them. The new spec,RecordingServiceFileImplTestandXmlServiceImplTestrun with those files excluded for the run and the console reporter: 11/11 pass (see the attached logs for the exactsbtinvocation).On a server:
Run on a 4.0.1 dev server (a-noble-40-dev-79, 2026-10-28) with the fixed classes swapped into the installed bbb-common-web jar: three create/end pairs at +145 ms produced 0 new NPE traces (45 before, 45 after; the same recipe gave 8/8 on the stock build earlier that day) and two
presentation_conversion_meeting_goneWARN lines (the third end landed outside the window, as the timing jitter predicts):