Live stills: the analysis keeps its own copy of the experiment; a failed end message fill sends the end message without the results

StillsGPUAnalysis held the DiffractionExperiment it was given by reference, and
JFJochReceiverRugnuxStills::OnStart gave it a local (the experiment with the goniometer
removed for force_still), which went at the end of OnStart while the pre-pass, analysis
and merge threads and every checkpoint merge went on reading it. Seen as std::bad_alloc
and heap corruption in a second stills run after a failed one. The member is now a copy.

AddToEndMessage of the stills receiver catches a failure of FillEndMessage as the
rotation receiver does: the end message goes out without the analysis results instead
of not at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-11-13 14:52:45 +01:00
1 parent edda9ed504
commit 807f791b3f
2 files changed
+10 -3

No files matched your search

+9 -2
View File
@@ -9,6 +9,7 @@
#include "../common/time_utc.h"
#include "../frame_serialize/CBORStream2Serializer.h"
#include "../rugnux/RugnuxDefaults.h"
#include "RugnuxStructure.h"
JFJochReceiverRugnuxStills::JFJochReceiverRugnuxStills(const DiffractionExperiment &in_experiment,
const PixelMask &in_pixel_mask,
@@ -216,8 +217,14 @@ void JFJochReceiverRugnuxStills::SendAnalysedImage(DataMessage &message, const A
void JFJochReceiverRugnuxStills::AddToEndMessage(EndMessage &message) {
JFJochReceiverStream::AddToEndMessage(message);
if (stills)
stills->FillEndMessage(message);
// A failure here costs the end message the analysis only: it goes out as the receiver made it.
try {
if (stills)
stills->FillEndMessage(message);
} catch (const std::exception &e) {
logger.Error("rugnux live: the end message goes without the analysis results - {}", e.what());
DropResultBlocks(message);
}
}
void JFJochReceiverRugnuxStills::Cut(const std::string &reason) {
+1 -1
View File
@@ -88,7 +88,7 @@ public:
void FillEndMessage(EndMessage &message) const;
private:
const DiffractionExperiment &experiment;
const DiffractionExperiment experiment;
const PixelMask &mask;
const StartMessage start;
IndexerThreadPool *indexing_thread_pool;