View Issue Details

IDProjectCategoryView StatusLast Update
0003056DCP-o-maticBugspublic2026-07-28 20:41
Reporterstereo3d Assigned Tocarl  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformMac AMDOSOS XOS Version15.2
Target Version2.18.22 
Summary0003056: 2.18.20 version crash choosing source file 3D Left only or Right only
Description

the application dcp o matic crashes

DCP-o-matic
An exception occurred: Programming error at ../src/lib/butler.cc: 155 Butler audio buffers reached 960000 frames at
0 (video is 0).
Please report this problem by using Help
-> Report a problem or via email to

Steps To Reproduce

create new project
import Right and Left Movie (prores or folder of single images)
select type and change from 2D to 3D left only or right only.
The application crashes.

Additional Information

I tried several times
I downgrade to the previous version to see if the problem is there.

Tags3d, stereoscopic
Attached Files
Branch3056-3d-crash
Estimated weeks required
Estimated work requiredUndecided

Relationships

related to 0003164 resolvedcarl Butler error after loading left image set for 3D DCP 

Activities

carl

2025-07-03 13:08

administrator   ~0007024

Last edited: 2025-07-03 14:39

@carl Added a test to the branch which captures at least part of this. I think that fails because Player::use_video() doesn't do anything for left-eye images (awaiting the right).

carl

2025-07-03 14:39

administrator   ~0007025

@carl Potential fix on branch, need to send a build to test.

carl

2025-07-03 17:32

administrator   ~0007026

Could you please try this build: https://dcpomatic.com/temp/3056-3d-crash/1fa1a2d/osx-10.10/DCP-o-matic%203056-3d-crash-1fa1a2d5e%20macOS10.10+.dmg
and see if it solves the problem?

carl

2025-09-06 21:08

administrator   ~0007086

@stereo3d ping

carl

2025-09-07 09:35

administrator   ~0007088

Thanks!

carl

2026-07-28 20:40

administrator   ~0007346

Hopefully fixed by the fix for 0003164.

carl

2026-07-28 20:41

administrator   ~0007347

For reference the proposed fix I made for this bug was

commit 0fe862a41368e6de5572ac5451285395248ca109
Author: Carl Hetherington <cth@carlh.net>
Date:   Thu Jul 3 15:38:52 2025 +0200

    Insert black for missing 3D eyes in the Shuffler (#3056).

diff --git a/src/lib/shuffler.cc b/src/lib/shuffler.cc
index 318166a07..aa3be6506 100644
--- a/src/lib/shuffler.cc
+++ b/src/lib/shuffler.cc
@@ -22,6 +22,8 @@
 #include "content_video.h"
 #include "dcpomatic_assert.h"
 #include "dcpomatic_log.h"
+#include "image.h"
+#include "raw_image_proxy.h"
 #include "shuffler.h"
 #include <iostream>
 #include <string>
@@ -91,13 +93,42 @@ Shuffler::video(weak_ptr<Piece> weak_piece, ContentVideo video)
            break;
        }

+       optional<Eyes> extra;
+
        if (_store.size() > _max_size) {
            LOG_WARNING("Shuffler is full after receiving frame at {}; 3D sync may be incorrect.", to_string(video.time));
+           /* Now that we've given up waiting for the correct frames to arrive, we may need to insert some extra
+            * left/right eyes so that the player doesn't wait forever for lefts/rights that will never come.
+            * Set extra to the extra eye that we should insert based on what we'll emit now and what's coming next.
+            */
+           auto const& this_frame = _store.front();
+           auto const& next_frame = *std::next(_store.begin());
+           if (this_frame.second.eyes == next_frame.second.eyes) {
+               extra = this_frame.second.eyes == Eyes::LEFT ? Eyes::RIGHT : Eyes::LEFT;
+           }
+       }
+
+       auto emit_black = [this](Eyes eyes) {
+           LOG_DEBUG_THREE_D("Shuffler emits extra time=%1 eyes=%2 store=%3", to_string(_store.front().second.time), static_cast<int>(eyes), _store.size());
+           auto image = std::make_shared<Image>(AV_PIX_FMT_RGB24, dcp::Size(64, 64), Image::Alignment::COMPACT);
+           image->make_black();
+           auto proxy = std::make_shared<RawImageProxy>(image);
+           ContentVideo black(proxy, _store.front().second.time, eyes, _store.front().second.part);
+           Video(_store.front().first, black);
+       };
+
+       if (extra && *extra == Eyes::LEFT) {
+           emit_black(*extra);
        }

        LOG_DEBUG_THREE_D("Shuffler emits time={} eyes={} store={}", to_string(_store.front().second.time), static_cast<int>(_store.front().second.eyes), _store.size());
        Video(_store.front().first, _store.front().second);
        _last = _store.front().second;
+
+       if (extra && *extra == Eyes::RIGHT) {
+           emit_black(*extra);
+       }
+
        _store.pop_front();
    }
 }
diff --git a/test/shuffler_test.cc b/test/shuffler_test.cc
index 118b626ac..7afaf2716 100644
--- a/test/shuffler_test.cc
+++ b/test/shuffler_test.cc
@@ -180,6 +180,7 @@ BOOST_AUTO_TEST_CASE(shuffler_test6)
 {
    Shuffler s;
    s.Video.connect(boost::bind(&receive, _1, _2));
+   pending_cv.clear();

    push(s, 0, Eyes::LEFT);
    check(0, Eyes::LEFT, __LINE__);
@@ -196,3 +197,23 @@ BOOST_AUTO_TEST_CASE(shuffler_test6)
    push(s, 3, Eyes::RIGHT);
    check(3, Eyes::RIGHT, __LINE__);
 }
+
+
+BOOST_AUTO_TEST_CASE(shuffler_full_test)
+{
+   Shuffler s;
+   s.Video.connect(boost::bind(&receive, _1, _2));
+
+   push(s, 0, Eyes::LEFT);
+   check(0, Eyes::LEFT, __LINE__);
+
+   for (int i = 1; i < 65; ++i) {
+       push(s, i, Eyes::LEFT);
+   }
+   BOOST_CHECK(pending_cv.empty());
+
+   push(s, 64, Eyes::LEFT);
+   check(1, Eyes::LEFT, __LINE__);
+   check(1, Eyes::RIGHT, __LINE__);
+}
+

Issue History

Date Modified Username Field Change
2025-07-03 09:10 stereo3d New Issue
2025-07-03 09:10 stereo3d Tag Attached: 3d
2025-07-03 09:10 stereo3d Tag Attached: stereoscopic
2025-07-03 09:10 stereo3d File Added: Screenshot 2025-07-03 at 17.02.47.jpg
2025-07-03 09:10 stereo3d File Added: Screenshot 2025-07-03 at 16.50.19.jpg
2025-07-03 12:17 carl Priority normal => urgent
2025-07-03 12:17 carl Status new => confirmed
2025-07-03 12:17 carl Target Version => 2.18.21
2025-07-03 12:17 carl Estimated work required => Undecided
2025-07-03 13:07 carl Branch => 3056-3d-crash
2025-07-03 13:08 carl Note Added: 0007024
2025-07-03 14:39 carl Note Added: 0007025
2025-07-03 14:39 carl Note Edited: 0007024
2025-07-03 17:32 carl Assigned To => carl
2025-07-03 17:32 carl Status confirmed => feedback
2025-07-03 17:32 carl Note Added: 0007026
2025-07-22 00:12 carl Target Version 2.18.21 => 2.18.22
2025-09-06 21:08 carl Note Added: 0007086
2025-09-07 07:05 stereo3d Status feedback => assigned
2025-09-07 09:35 carl Priority urgent => normal
2025-09-07 09:35 carl Note Added: 0007088
2025-09-07 09:35 carl Status assigned => feedback
2026-07-28 20:26 carl Relationship added related to 0003164
2026-07-28 20:40 carl Status feedback => resolved
2026-07-28 20:40 carl Resolution open => fixed
2026-07-28 20:40 carl Note Added: 0007346
2026-07-28 20:41 carl Note Added: 0007347