<div dir="ltr"><div style="font-size:small" class="gmail_default">I was able to finally reproduce the problem.  Seems like it is the select_region call</div><div style="font-size:small" class="gmail_default">is holding locks that are needed by the renderengine.  I did try a simple fix but it did</div><div style="font-size:small" class="gmail_default">not work on the first try.  It is late here, and I can now reproduce a bug (hopefully</div><div style="font-size:small" class="gmail_default">the only issue, there are other similar handlers in this callback).  I will give this</div><div style="font-size:small" class="gmail_default">problem priority tomorrow, and let you know how it goes.   This is the traceback</div><div style="font-size:small" class="gmail_default">for the gdb that I was trying to describe earlier.  Thanks for you help and</div><div style="font-size:small" class="gmail_default">perseverance.  It would be very good to fix this bug, a real hazard.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">gg<br></div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default"><br></div><br><div class="gmail_default" style="font-size:small">(gdb) p dump()<br>signal_entry: lock table size=29<br>    0x65af7b0 VIconThread::draw_lock, VIconThread::run 0 0x7fff37fff700<br>    0x6f1a6e0 CWindowTool::input_lock, CWindowTool::run 0x7fff10ff9700<br>    0x7033cf0 BC_DialogThread::active_lock, BC_DialogThread::run 0x7ffee37fe700 *<br>    0x7e08ad0 RecordSetChannel::change_channel, (null) 0x7ffde27fc700<br>    0x7de2480 RecordCutAdsStatus::wait_lock, RecordCutAdsStatus::run 0x7ffde1ffb700<br>    0x7f07cd0 ChannelInfo::scan_lock, (null) 0x7ffde17fa700<br>    0x7f09530 SWindow::swin_lock, (null) 0x7ffde0ff9700<br>    0x490e8a0 BC_Synchronous::next_command, BC_Synchronous::run 0x7fffc97fa700<br>    0x490bbb0 MWindow::run_lock, MWindow::run 0x7ffff6d49840 *<br>    0x7ffedc6b64e0 PlaybackEngine::output_lock, PlaybackEngine::run 0x7ffea4ff9700<br>    0x85e6dc0 MainIndexes::input_lock, MainIndexes::run 1 0x7ffd997fa700<br>    0x707b360 ResourceThread::draw_lock, ResourceThread::run 0x7ffe4f7fe700<br>    0x7fffa8005fa0 BC_Xfer::Slicer::init, Slicer::run 0x7ffd7dfe3700<br>    0x7fffa8005e10 BC_Xfer::Slicer::init, Slicer::run 0x7fffb2388700<br>    0x687e848 Cinelerra: Compositor, BC_WindowBase::dispatch_event 1 0x7fff8ffff700 *<br>    0x687e848 Cinelerra: Compositor, TimeBar::select_region 0x7fff8ffff700 *<br>    0x687e848 Cinelerra: Compositor, VDeviceX11::open_output 0x7ffee3fff700<br>    0x6ed27f0 Canvas::canvas_lock, Canvas::refresh 0x7fff8ffff700 0x7ffee3fff700<br>    0x687e848 Cinelerra: Compositor, BC_Repeater::run 0x7fffb0ff9700<br>    0x85e7da0 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7fffcaffd700<br>    0x7f0d480 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7fffe0e98700<br>    0x5f78d20 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7fff8f7fe700<br>    0x7ffedc0028c0 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7ffee37fe700<br>    0x7035980 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7ffff6d49840<br>    0x7705950 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7ffde3fff700<br>lock_items: 25<br>lock_frees: 4<br>$1 = void<br>(gdb) thr find 0x7fff8ffff700<br>Thread 192 has target id 'Thread 0x7fff8ffff700 (LWP 2979)'<br>(gdb) thr 192<br>[Switching to thread 192 (Thread 0x7fff8ffff700 (LWP 2979))]<br>#0  0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0<br>(gdb) bt<br>#0  0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0<br>#1  0x0000000000d95f3a in Condition::lock (this=0x6ed27f0, location=0x2b19f64 "Canvas::refresh") at condition.C:64<br>#2  0x0000000000a2bbe6 in Canvas::lock_canvas (this=0x6ed64c0, loc=0x2b19f64 "Canvas::refresh") at canvas.C:92<br>#3  0x0000000000a2d560 in Canvas::refresh (this=0x6ed64c0, flush=0) at canvas.C:475<br>#4  0x0000000000a2d512 in Canvas::reposition_window (this=0x6ed64c0, edl=0x5f93d50, x=23, y=0, w=937, h=561) at canvas.C:465<br>#5  0x0000000000a2d3df in Canvas::update_geometry (this=0x6ed64c0, edl=0x5f93d50, x=23, y=0, w=937, h=561) at canvas.C:448<br>#6  0x0000000000a769ef in CWindow::update (this=0x608d5a0, dir=1, overlays=0, tool_window=0, operation=0, timebar=0) at cwindow.C:237<br>#7  0x0000000000c6a94b in TimeBar::select_region (this=0x6edb8c0, position=7.8278200000000009) at timebar.C:922<br>#8  0x0000000000c6a120 in TimeBar::button_press_event (this=0x6edb8c0) at timebar.C:753<br>#9  0x0000000000d84e34 in BC_WindowBase::dispatch_button_press (this=0x6edb8c0) at bcwindowbase.C:1584<br>#10 0x0000000000d84e0e in BC_WindowBase::dispatch_button_press (this=0x687e840) at bcwindowbase.C:1581<br>#11 0x0000000000d837a4 in BC_WindowBase::dispatch_event (this=0x687e840) at bcwindowbase.C:1056<br>#12 0x0000000000d82793 in BC_WindowBase::run_window (this=0x687e840) at bcwindowbase.C:741<br>#13 0x0000000000a7676c in CWindow::run (this=0x608d5a0) at cwindow.C:204<br>#14 0x0000000000da4f5d in Thread::entrypoint (parameters=0x608d5a0) at thread.C:65<br>#15 0x00007ffff7cae4e2 in start_thread () from /lib64/libpthread.so.0<br>#16 0x00007ffff7539693 in clone () from /lib64/libc.so.6<br>(gdb) up<br>#1  0x0000000000d95f3a in Condition::lock (this=0x6ed27f0, location=0x2b19f64 "Canvas::refresh") at condition.C:64<br>64              while(value <= 0) pthread_cond_wait(&cond, &mutex);<br>(gdb) p *this<br>$2 = {<trace_info> = {trace = 0x7ffe34000fc0, owner = 140732723623680}, cond = {__data = {{__wseq = 66, __wseq32 = {__low = 66, __high = 0}}, {__g1_start = 62, __g1_start32 = {__low = 62, __high = 0}}, __g_refs = {2, 0}, __g_size = {0, 0}, __g1_orig_size = 4, __wrefs = 8, __g_signals = {0, 0}}, __size = "B", __align = 66}, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "", __align = 0}, value = 0, init_value = 1, is_binary = 1, title = 0x2b19f50 "Canvas::canvas_lock"}<br>(gdb) p /x 140732723623680<br>$3 = 0x7ffee3fff700<br>(gdb) thr find 0x7ffee3fff700<br>Thread 81 has target id 'Thread 0x7ffee3fff700 (LWP 2868)'<br>(gdb) thr 81<br>[Switching to thread 81 (Thread 0x7ffee3fff700 (LWP 2868))]<br>#0  0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0<br>(gdb) bt<br>#0  0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0<br>#1  0x00007ffff7e9c045 in _XDisplayLockWait () from /lib64/libX11.so.6<br>#2  0x00007ffff7e9c4ed in _XLockDisplay () from /lib64/libX11.so.6<br>#3  0x00007ffff7e9bebb in XLockDisplay () from /lib64/libX11.so.6<br>#4  0x0000000000d8a593 in BC_WindowBase::lock_window (this=0x687e840, location=0x2b97520 "VDeviceX11::open_output") at bcwindowbase.C:3322<br>#5  0x0000000000d8a545 in BC_WindowBase::lock_window (this=0x6ed2880, location=0x2b97520 "VDeviceX11::open_output") at bcwindowbase.C:3313<br>#6  0x0000000000a2bc10 in Canvas::lock_canvas (this=0x6ed64c0, loc=0x2b97520 "VDeviceX11::open_output") at canvas.C:94<br>#7  0x0000000000ca24f5 in VDeviceX11::open_output (this=0x7fffd00070e0) at vdevicex11.C:103<br>#8  0x0000000000ca63f9 in VideoDevice::open_output (this=0x7fffd0007900, config=0x7fffd000dca0, rate=29.9700298, out_w=1440, out_h=1080, output=0x6ed64c0, single_frame=1) at videodevice.C:689<br>#9  0x0000000000c23c76 in RenderEngine::open_output (this=0x7fffd000a2d0) at renderengine.C:328<br>#10 0x0000000000c2361c in RenderEngine::arm_command (this=0x7fffd000a2d0, command=0x6d7d910) at renderengine.C:180<br>#11 0x0000000000bc1553 in PlaybackEngine::arm_render_engine (this=0x6f3fff0) at playbackengine.C:147<br>#12 0x0000000000bc1f99 in PlaybackEngine::run (this=0x6f3fff0) at playbackengine.C:401<br>#13 0x0000000000da4f5d in Thread::entrypoint (parameters=0x6f3fff0) at thread.C:65<br>#14 0x00007ffff7cae4e2 in start_thread () from /lib64/libpthread.so.0<br>#15 0x00007ffff7539693 in clone () from /lib64/libc.so.6<br>(gdb) q<br>A debugging session is active.<br><br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 2, 2020 at 7:35 PM Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com">randrianasulu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">..more debug<br>
<br>
So, after looking at things with gdb (as suggested by Bill)<br>
<br>
I enabled some more debug this time in canvas.C:<br>
<br>
diff --git a/cinelerra-5.1/cinelerra/canvas.C b/cinelerra-5.1/cinelerra/canvas.C<br>
index 17d5a42..8bfa594 100644<br>
--- a/cinelerra-5.1/cinelerra/canvas.C<br>
+++ b/cinelerra-5.1/cinelerra/canvas.C<br>
@@ -368,9 +368,12 @@ int Canvas::get_scrollbars(EDL *edl)<br>
        h_needed = h_visible = edl ? edl->session->output_h : view_h;<br>
<br>
        int need_xscroll = 0, need_yscroll = 0;<br>
+       printf("Canvas::get_scrollbars\n");<br>
        if( edl && use_scrollbars ) {<br>
                float zoom_x, zoom_y, conformed_w, conformed_h;<br>
+               printf("before get_zoom\n");<br>
                get_zooms(edl, 0, zoom_x, zoom_y, conformed_w, conformed_h);<br>
+               printf("after get_zoom\n");<br>
                w_visible = canvas_w / zoom_x;<br>
                h_visible = canvas_h / zoom_y;<br>
                float output_x = 0, output_y = 0;<br>
@@ -381,6 +384,7 @@ int Canvas::get_scrollbars(EDL *edl)<br>
                output_to_canvas(edl, 0, output_x, output_y);<br>
                if( output_x > canvas_w ) need_xscroll = 1;<br>
                if( output_y > canvas_h ) need_yscroll = 1;<br>
+               printf("Need xscrool, %i , need_yscroll %i \n", need_xscroll, need_yscroll);<br>
                if( need_xscroll ) {<br>
                        canvas_h -= BC_ScrollBar::get_span(SCROLL_HORIZ);<br>
                        h_visible = canvas_h / zoom_y;<br>
@@ -438,6 +442,7 @@ int Canvas::get_scrollbars(EDL *edl)<br>
<br>
 void Canvas::update_geometry(EDL *edl, int x, int y, int w, int h)<br>
 {<br>
+       printf("Canvas::update_geometry\n");<br>
        int redraw = 0;<br>
        if( this->x != x || this->y != y ||<br>
            this->w != w || this->h != h )<br>
@@ -452,9 +457,9 @@ void Canvas::reposition_window(EDL *edl, int x, int y, int w, int h)<br>
 {<br>
        this->x = view_x = x;  this->y = view_y = y;<br>
        this->w = view_w = w;  this->h = view_h = h;<br>
-//printf("Canvas::reposition_window 1\n");<br>
+printf("Canvas::reposition_window 1\n");<br>
        get_scrollbars(edl);<br>
-//printf("Canvas::reposition_window %d %d %d %d\n", view_x, view_y, view_w, view_h);<br>
+printf("Canvas::reposition_window %d %d %d %d\n", view_x, view_y, view_w, view_h);<br>
        if( canvas_subwindow ) {<br>
                canvas_subwindow->reposition_window(view_x, view_y, view_w, view_h);<br>
<br>
---<br>
<br>
and it runs up to:<br>
<br>
BC_WindowBase::dispatch_event 956 Cinelerra: Составитель 0xe0445600 4 (ButtonPress)<br>
CTimeBar:pixel_to_Position<br>
CTimeBar: pixel, 83<br>
CTimebar:pix_to_pos: Got EDL!<br>
CTimebar:pix_to_pos: prev_start 0.000000, prev_end -1.000000<br>
CTimeBar:pixel_to_pos start, 0, end 0<br>
BC_WindowBase::dispatch_event this=0xd36fcc8 1360<br>
Canvas::update_geometry<br>
Canvas::get_scrollbars<br>
before get_zoom<br>
after get_zoom<br>
Need xscrool, 1 , need_yscroll 1<br>
Canvas::reposition_window 1<br>
Canvas::get_scrollbars<br>
before get_zoom<br>
after get_zoom<br>
Need xscrool, 1 , need_yscroll 1<br>
Canvas::reposition_window 23 0 959 552<br>
BC_WindowBase::dispatch_event this=0xe2f10450 1360<br>
BC_WindowBase::dispatch_event this=0xd6373a0 1360<br>
BC_WindowBase::dispatch_event this=0xd70da30 1360<br>
BC_WindowBase::dispatch_event this=0xd36fcc8 1360<br>
BC_WindowBase::dispatch_event this=0xd43ca60 1360<br>
BC_WindowBase::dispatch_event this=0xd36fcc8 1360<br>
<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div>