View Bug Details

IDProjectCategoryView StatusLast Update
0001982DCP-o-maticBugspublic2021-10-08 00:05
Reportercarl Assigned Tocarl  
PriorityimmediateSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Target Version2.16.0 
Summary0001982: Crash on closing player because (viewer thread is stopped too late?)
Description

Play a DCP in the player and close the window; traces below.

Tagsalpha-1-blocker
Branch
Estimated weeks required
Estimated work requiredUndecided

Activities

carl

2021-04-22 23:26

administrator   ~0004288

--Type <RET> for more, q to quit, c to continue without paging--
#0  __lll_lock_wait (futex=futex@entry=0x555555c2c230, private=0) at lowlevellock.c:52
0000001  0x00007ffff43210a3 in __GI___pthread_mutex_lock (mutex=0x555555c2c230) at ../nptl/pthread_mutex_lock.c:80
0000002  0x00007ffff3ada82a in RtApiPulse::abortStream() () at /usr/local/lib/librtaudio.so.6
0000003  0x00007ffff782e6b5 in RtAudio::abortStream() (this=0x555555962910) at /usr/local/include/rtaudio/RtAudio.h:878
0000004  0x00007ffff7827acd in FilmViewer::stop() (this=0x555555962800) at ../src/wx/film_viewer.cc:378
0000005  0x00007ffff78262c8 in FilmViewer::~FilmViewer() (this=0x555555962800, __in_chrg=<optimized out>) at ../src/wx/film_viewer.cc:118
0000006  0x00007ffff78263ea in FilmViewer::~FilmViewer() (this=0x555555962800, __in_chrg=<optimized out>) at ../src/wx/film_viewer.cc:119
0000007  0x00005555556f4f76 in std::_Sp_counted_ptr<FilmViewer*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (this=0x555555b7f890) at /usr/include/c++/9/bits/shared_ptr_base.h:377
0000008  0x00005555556ad386 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (this=0x555555b7f890) at /usr/include/c++/9/bits/shared_ptr_base.h:155
0000009  0x00005555556a6483 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (this=0x555555c966e8, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:730
0000010 0x00005555556958c2 in std::__shared_ptr<FilmViewer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (this=0x555555c966e0, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
0000011 0x00005555556958e2 in std::shared_ptr<FilmViewer>::~shared_ptr() (this=0x555555c966e0, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:103
0000012 0x00007ffff77b72ee in Controls::~Controls() (this=0x555555c96400, __in_chrg=<optimized out>) at ../src/wx/controls.h:51
0000013 0x00007ffff7a0c2ca in StandardControls::~StandardControls() (this=0x555555c96400, __in_chrg=<optimized out>) at ../src/wx/standard_controls.h:23
0000014 0x00007ffff7a0c2ea in StandardControls::~StandardControls() (this=0x555555c96400, __in_chrg=<optimized out>) at ../src/wx/standard_controls.h:23
0000015 0x00007ffff4f0008c in wxWindowBase::Destroy() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000016 0x00007ffff4f000c4 in wxWindowBase::DestroyChildren() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000017 0x00007ffff4d38997 in wxWindow::~wxWindow() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000018 0x00007ffff4eb88fd in  () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000019 0x00007ffff4f0008c in wxWindowBase::Destroy() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000020 0x00007ffff4f000c4 in wxWindowBase::DestroyChildren() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000021 0x00007ffff4d38997 in wxWindow::~wxWindow() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000022 0x00005555556f34ea in DOMFrame::~DOMFrame() (this=0x555555afd700, __in_chrg=<optimized out>) at ../src/tools/dcpomatic_player.cc:137
0000023 0x00005555556f350a in DOMFrame::~DOMFrame() (this=0x555555afd700, __in_chrg=<optimized out>) at ../src/tools/dcpomatic_player.cc:137
0000024 0x00007ffff4843597 in wxAppConsoleBase::DeletePendingObjects() () at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
0000025 0x00007ffff4843619 in wxAppConsoleBase::ProcessIdle() () at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
0000026 0x00007ffff4dd2f18 in wxAppBase::ProcessIdle() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000027 0x00007ffff4cfd6a5 in wxApp::DoIdle() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000028 0x00007ffff4cfd7a7 in  () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000029 0x00007ffff16da04e in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
0000030 0x00007ffff16da400 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
0000031 0x00007ffff16da6f3 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
0000032 0x00007fffefda637d in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0
0000033 0x00007ffff4d1b575 in wxGUIEventLoop::DoRun() () at /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
0000034 0x00007ffff4881d41 in wxEventLoopBase::Run() () at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
0000035 0x00007ffff48493da in wxAppConsoleBase::MainLoop() () at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
0000036 0x00007ffff48d573d in wxEntry(int&, wchar_t**) () at /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
0000037 0x0000555555687631 in main(int, char**) (argc=2, argv=0x7fffffffdd48) at ../src/tools/dcpomatic_player.cc:1264

carl

2021-04-22 23:26

administrator   ~0004289

Thread 52 "dcpomatic2_play" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff677fe700 (LWP 1573814)]
0x0000000000000000 in ?? ()
(gdb) where
#0  0x0000000000000000 in  ()
0000001  0x00007ffff76927c8 in wxWindowBase::GetSize() const (this=0x555555e36d10) at /usr/include/wx-3.0/wx/window.h:327
0000002  0x00007ffff78bad49 in GLVideoView::draw(Position<int>, dcp::Size) (this=0x555555c25d50, inter_position=..., inter_size=...) at ../src/wx/gl_video_view.cc:167
0000003  0x00007ffff78bbeb3 in GLVideoView::set_image_and_draw() (this=0x555555c25d50) at ../src/wx/gl_video_view.cc:349
0000004  0x00007ffff78bbcdb in GLVideoView::thread_playing() (this=0x555555c25d50) at ../src/wx/gl_video_view.cc:329
0000005  0x00007ffff78bc3b7 in GLVideoView::thread() (this=0x555555c25d50) at ../src/wx/gl_video_view.cc:422
0000006  0x00007ffff78c4769 in boost::_mfi::mf0<void, GLVideoView>::operator()(GLVideoView*) const (this=0x555555b7dcf8, p=0x555555c25d50) at /usr/include/boost/bind/mem_fn_template.hpp:49
0000007  0x00007ffff78c45d3 in boost::_bi::list1<boost::_bi::value<GLVideoView*> >::operator()<boost::_mfi::mf0<void, GLVideoView>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf0<void, GLVideoView>&, boost::_bi::list0&, int)
    (this=0x555555b7dd08, f=..., a=...) at /usr/include/boost/bind/bind.hpp:259
0000008  0x00007ffff78c435c in boost::_bi::bind_t<void, boost::_mfi::mf0<void, GLVideoView>, boost::_bi::list1<boost::_bi::value<GLVideoView*> > >::operator()() (this=0x555555b7dcf8) at /usr/include/boost/bind/bind.hpp:1294
0000009  0x00007ffff78c3f10 in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, GLVideoView>, boost::_bi::list1<boost::_bi::value<GLVideoView*> > > >::run() (this=0x555555b7dbc0)
    at /usr/include/boost/thread/detail/thread.hpp:120
0000010 0x00007ffff57e243b in  () at /lib/x86_64-linux-gnu/libboost_thread.so.1.71.0
0000011 0x00007ffff431e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
0000012 0x00007ffff4245293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread apply all bt

carl

2021-04-22 23:27

administrator   ~0004290

Calling wxWindowBase::GetSize() from the GL thread also feels very dodgy.

carl

2021-04-23 00:13

administrator   ~0004292

cde59064499abaf8f30d0979747041af363cbef4

Bug History

Date Modified Username Field Change
2021-04-22 23:25 carl New Bug
2021-04-22 23:26 carl Tag Attached: alpha-1-blocker
2021-04-22 23:26 carl Assigned To => carl
2021-04-22 23:26 carl Status new => confirmed
2021-04-22 23:26 carl Note Added: 0004288
2021-04-22 23:26 carl Note Added: 0004289
2021-04-22 23:27 carl Note Added: 0004290
2021-04-22 23:42 carl Summary Crash on closing player because viewer thread is stopped too late => Crash on closing player because (viewer thread is stopped too late?)
2021-04-22 23:42 carl Estimated work required => Undecided
2021-04-23 00:13 carl Status confirmed => resolved
2021-04-23 00:13 carl Resolution open => fixed
2021-04-23 00:13 carl Note Added: 0004292
2021-10-08 00:05 carl Status resolved => closed