View Issue Details

IDProjectCategoryView StatusLast Update
0000501ardourbugspublic2004-06-16 08:58
Reportervandongen Assigned Topaul  
PriorityurgentSeveritymajorReproducibilityrandom
Status closedResolutionfixed 
Summary0000501: in a long session, some regions always "snap" to zero when moving
DescriptionIn a long (1h+) session on some tracks, the regions after a certain point snap to zero when I try to move them.
This does not happen on all the tracks, and the point after which this occurs varies but is always after about 25 minutes into the session.
This is a big session with 14 mono track, 6 stereo track and lots of small regions. There is no obvious relation to track content and this behaviour.
I will try to create a minimal session that shows this in a couple of days. Or if you give me a breakpoint, I can try to run this under gdb.
TagsNo tags attached.

Activities

vandongen

2004-06-02 13:52

updater   ~0000949

This goes away if I select "remove syncpoint" from the context menu.
However I never added syncpoints to these regions, that I am aware off.
And in only some of the cases the litte marker is present.
I will grep around the xml to see what is there, but this may allready give an indication.

vandongen

2004-06-04 11:15

updater   ~0000968

I did some "functional debugging".
The misbehaving regions all have some large sync_offset: 0xffd027fa f.i. (that is very large and way past the end off the session/ or the length of the region)
Strangely though, in the session.xml the sync_offset is set to "0" and I never did set any sync points.
When I remove the sync point, I can drag it.
But then if I trim the front too make the region bigger, a sync point appears and then dragging it segfaults ardour.
This is the gdb output:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 17332)]
0x40667c73 in strlen () at strlen:-1
-1 strlen: No such file or directory.
        in strlen
Current language: auto; currently c
(gdb) thread apply all bt

Thread 7 (Thread 5126 (LWP 17342)):
#0 0x406c0ad3 in __poll (fds=0xbefffa7c, nfds=1, timeout=10000) at ../sysdeps/unix/sysv/linux/poll.c:52
0000001 0x085d9613 in ARDOUR::Session::midi_thread_work() (this=0x89f9dd8) at session_midi.cc:841
#2 0x085d957b in ARDOUR::Session::_midi_thread_work(void*) (arg=0x89f9dd8) at session_midi.cc:815
#3 0x403b02ac in pthread_start_thread () from /lib/libpthread.so.0
0000004 0x403b02f9 in pthread_start_thread_event () from /lib/libpthread.so.0

Thread 6 (Thread 4101 (LWP 17341)):
#0 0x4061b859 in __sigsuspend (set=0xbf1ff914) at ../sysdeps/unix/sysv/linux/sigsuspend.c:54
0000001 0x403b2acf in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
#2 0x403af272 in pthread_cond_wait () from /lib/libpthread.so.0
#3 0x085b5129 in ARDOUR::Session::butler_thread_work() (this=0x89f9dd8) at session_butler.cc:292
0000004 0x085b4945 in ARDOUR::Session::_butler_thread_work(void*) (arg=0x89f9dd8) at session_butler.cc:148
0000005 0x403b02ac in pthread_start_thread () from /lib/libpthread.so.0
#6 0x403b02f9 in pthread_start_thread_event () from /lib/libpthread.so.0

Thread 5 (Thread 3076 (LWP 17340)):
#0 0x406c0ad3 in __poll (fds=0x87fa5d8, nfds=2, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:52
0000001 0x402a8390 in jack_client_thread (arg=0x87f9588) at client.c:993
#2 0x403b02ac in pthread_start_thread () from /lib/libpthread.so.0
#3 0x403b02f9 in pthread_start_thread_event () from /lib/libpthread.so.0

Thread 4 (Thread 2051 (LWP 17339)):
#0 0x4061b859 in __sigsuspend (set=0xbf5ff9c4) at ../sysdeps/unix/sysv/linux/sigsuspend.c:54
0000001 0x403b2acf in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
#2 0x403af272 in pthread_cond_wait () from /lib/libpthread.so.0
#3 0x085fe70e in ARDOUR::Source::peak_thread_work(void*) (arg=0x0) at source.cc:149
0000004 0x403b02ac in pthread_start_thread () from /lib/libpthread.so.0
0000005 0x403b02f9 in pthread_start_thread_event () from /lib/libpthread.so.0

Thread 3 (Thread 1026 (LWP 17334)):
#0 0x4061b859 in __sigsuspend (set=0xbf7ff990) at ../sysdeps/unix/sysv/linux/sigsuspend.c:54
0000001 0x403b349c in sigwait () from /lib/libpthread.so.0
#2 0x0839c0fc in signal_thread (arg=0x0) at main.cc:131
#3 0x403b02ac in pthread_start_thread () from /lib/libpthread.so.0
0000004 0x403b02f9 in pthread_start_thread_event () from /lib/libpthread.so.0

Thread 2 (Thread 2049 (LWP 17333)):
#0 0x406c0ad3 in __poll (fds=0x87896c8, nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:52
0000001 0x403aff60 in __pthread_manager () from /lib/libpthread.so.0
#2 0x403b01a0 in __pthread_manager_event () from /lib/libpthread.so.0

Thread 1 (Thread 1024 (LWP 17332)):
#0 0x40667c73 in strlen () at strlen:-1
0000001 0x40048625 in gtk_arg_get_info (object_type=67861, arg_info_hash_table=0x87a3c40, arg_name=0x1d05484 <Address 0x1d05484 out of bounds>, info_p=0xbfffed18) at gtkarg.c:161
#2 0x4004891a in gtk_args_collect (object_type=67861, arg_info_hash_table=0x87a3c40, arg_list_p=0xbfffed14, info_list_p=0xbfffed18, first_arg_name=0x863b2b1 "points", var_args=0xbfffed60 "") at gtkarg.c:267
#3 0x400db205 in gtk_object_args_collect (object_type=30430340, arg_list_p=0x1d05484, info_list_p=0x1d05484, first_arg_name=0x1d05484 <Address 0x1d05484 out of bounds>,
    var_args=0x1d05484 <Address 0x1d05484 out of bounds>) at gtkobject.c:981
0000004 0x084b39a7 in gtk_canvas_item_set_valist (item=0x45058010, first_arg_name=0x1d05484 <Address 0x1d05484 out of bounds>, args=0x1d05484 <Address 0x1d05484 out of bounds>) at gtk-canvas.c:590
0000005 0x084b38bf in gtk_canvas_item_set (item=0x1d05484, first_arg_name=0x1d05484 <Address 0x1d05484 out of bounds>) at gtk-canvas.c:563
#6 0x0841a9cc in AudioRegionView::region_sync_changed() (this=0x45077848) at regionview.cc:831
#7 0x08418b91 in AudioRegionView::region_changed(ARDOUR::Change) (this=0x45077848, what_changed=256) at regionview.cc:231
0000008 0x0841da87 in SigC::ObjectSlot1_<void, ARDOUR::Change, AudioRegionView>::callback(void*, ARDOUR::Change) (d=0x45057d44, p1=256) at /home/gerard/sources/CVS/ardour/libs/sigc++/sigc++/object_slot.h:153
0000009 0x0853a0e6 in SigC::Callback1<void, ARDOUR::Change>::call(ARDOUR::Change const&) (this=0x45057d44, p1=@0xbfffee74) at /home/gerard/sources/CVS/ardour/libs/sigc++/sigc++/slot.h:358
0000010 0x08539a70 in SigC::Signal1<void, ARDOUR::Change, SigC::Marshal<void> >::emit(ARDOUR::Change const&) (this=0x8d04748, p1=@0xbfffee74)
    at /home/gerard/sources/CVS/ardour/libs/sigc++/sigc++/basic_signal.h:332
0000011 0x08538d50 in SigC::Signal1<void, ARDOUR::Change, SigC::Marshal<void> >::operator()(ARDOUR::Change const&) (this=0x8d04748, p1=@0xbfffee74)
    at /home/gerard/sources/CVS/ardour/libs/sigc++/sigc++/basic_signal.h:310
0000012 0x0860332b in ARDOUR::StateManager::send_state_changed(ARDOUR::Change) (this=0x8d04744, what_changed=256) at state_manager.cc:50
0000013 0x085a56e8 in ARDOUR::Region::send_change(ARDOUR::Change) (this=0x8d04738, what_changed=256) at region.cc:886
0000014 0x085a3546 in ARDOUR::Region::set_position_on_top(unsigned, void*) (this=0x8d04738, pos=49176049, src=0x8966f28) at region.cc:350
#15 0x083142e7 in Editor::region_drag_finished_callback(_GtkCanvasItem*, _GdkEvent*) (this=0x8966f28, item=0x450779b8, event=0xbffff500) at editor_mouse.cc:2602
0000016 0x0830fd2d in Editor::end_grab(_GtkCanvasItem*, _GdkEvent*) (this=0x8966f28, item=0x450779b8, event=0xbffff500) at editor_mouse.cc:1383
#17 0x0830e0e7 in Editor::button_release_handler(_GtkCanvasItem*, _GdkEvent*, Editor::ItemType) (this=0x8966f28, item=0x450779b8, event=0xbffff500, item_type=RegionItem) at editor_mouse.cc:674
0000018 0x082f71e0 in Editor::canvas_region_view_event(_GtkCanvasItem*, _GdkEvent*, AudioRegionView*) (this=0x8966f28, item=0x450779b8, event=0xbffff500, rv=0x45077848) at editor_canvas_events.cc:343
0000019 0x082f6862 in Editor::_canvas_region_view_event(_GtkCanvasItem*, _GdkEvent*, void*) (this=0x8966f28, item=0x450779b8, event=0xbffff500, data=0x45077848) at editor_canvas_events.cc:80
0000020 0x084062b5 in PublicEditor::canvas_region_view_event(_GtkCanvasItem*, _GdkEvent*, void*) (item=0x450779b8, event=0xbffff500, data=0x45077848) at public_editor.cc:30
0000021 0x084b3896 in gtk_canvas_item_marshal_signal_1 (object=0x1d05484, func=0x8406284 <PublicEditor::canvas_region_view_event(_GtkCanvasItem*, _GdkEvent*, void*)>, func_data=0x1d05484, args=0x87a3c40)
    at gtk-canvas.c:542
0000022 0x400fc3d5 in gtk_handlers_run (handlers=0x4503c668, signal=0xbffff1c0, object=0x450779b8, params=0xbffff230, after=0) at gtksignal.c:1912
0000023 0x400fb52d in gtk_signal_real_emit (object=0x450779b8, signal_id=126, params=0xbffff230) at gtksignal.c:1477
#24 0x400f8e62 in gtk_signal_emit (object=0x450779b8, signal_id=126) at gtksignal.c:552
0000025 0x084b7a7c in emit_event (canvas=0x898b830, event=0xbffff4fc) at gtk-canvas.c:2819
0000026 0x084b80c7 in gtk_canvas_button (widget=0x898b830, event=0x881b788) at gtk-canvas.c:3037
0000027 0x084fdead in gtkmm_marshal_INT__POINTER(_GtkObject*, void (*)(), void*, _GtkArg*) (object=0x1d05484, func=0x84b7fa0 <gtk_canvas_button>, func_data=0x1d05484, args=0x87a3c40) at marshal.cc:240
0000028 0x400fb572 in gtk_signal_real_emit (object=0x881b788, signal_id=0, params=0xbffff690) at gtksignal.c:1492
0000029 0x400f8e62 in gtk_signal_emit (object=0x898b830, signal_id=22) at gtksignal.c:552
0000030 0x4013a548 in gtk_widget_event (widget=0x898b830, event=0x881b788) at gtkwidget.c:2864
0000031 0x400c3f5f in gtk_propagate_event (widget=0x881b788, event=0x881b788) at gtkmain.c:1385
0000032 0x400c2ce4 in gtk_main_do_event (event=0x881b788) at gtkmain.c:818
0000033 0x40182d15 in gdk_event_dispatch (source_data=0x0, current_time=0xbffffa90, user_data=0x0) at gdkevents.c:2139
0000034 0x401b7c2e in g_main_dispatch (dispatch_time=0xbffffa90) at gmain.c:656
0000035 0x401b8109 in g_main_iterate (block=0, dispatch=1) at gmain.c:877
0000036 0x401b83a4 in g_main_run (loop=0x89e0a40) at gmain.c:935
0000037 0x400c276f in gtk_main () at gtkmain.c:524
0000038 0x08237922 in Gtk::Main::run() () at /home/gerard/sources/CVS/ardour/libs/gtkmm/src/gtk--/main.h:168
0000039 0x0849a83d in Gtkmmext::UI::run(Receiver&) (this=0x878a1c8, old_receiver=@0x877cb60) at gtk_ui.cc:168
0000040 0x0839d5b6 in main (argc=1, argv=0xbffffc94) at main.cc:400
0000041 0x4060a571 in __libc_start_main (main=0x839cac0 <main>, argc=1, ubp_av=0xbffffc94, init=0x82274b8 <_init>, fini=0x86212d0 <_fini>, rtld_fini=0x4000aa24 <_dl_fini>, stack_end=0xbffffc8c)
    at ../sysdeps/generic/libc-start.c:129

paul

2004-06-04 14:49

administrator   ~0000969

i believe this is now fixed in my code. i have a commit coming up (814.1/514.1), would you mind checking it? see next commit msg to ardour-dev for more details.

vandongen

2004-06-05 10:33

updater   ~0000971

It is fixed. And the new fade controls work as well.
Very nice
thanks

vandongen

2004-06-05 12:18

updater   ~0000972

I closed this too soon.
The problem did go away for the regions that were present in the session,
however I just recorded to new regions into two new tracks. And they still have the behaviour.

vandongen

2004-06-06 12:03

updater   ~0000979

the problem is now that every time I trim the front the sync points get messed up.


If you add something like this to
Region::trim_to_internal (region.cc line 519)
after setting the new_start

    if (_sync_position < new_start) {
        //sync point at start or trimmed away
        _sync_position = new_start;
    }

That should fix it.
I would make a real patch but I don't understand all the Change what changed stuff. sorry

vandongen

2004-06-06 12:09

updater   ~0000980

or maybe that doesn't fix it. I get other problems now.

v2

2004-06-14 21:46

developer   ~0001018

This behaviour is still here. I have to say, it's one of the most annoying bugs ardour has at the moment.

Ardour/GTK 0.516.0 running with libardour 0.816.0

vandongen

2004-06-15 12:11

updater   ~0001022

I think this is a correct patch for this problem:

diff -c -L2 -r1.69 region.cc
*** 2
--- libs/ardour/region.cc 15 Jun 2004 12:08:13 -0000
***************
*** 522,528 ****
  {
        long start_shift;
        jack_nframes_t new_start;
!
        if (_flags & Locked) {
                return;
        }
--- 522,528 ----
  {
        long start_shift;
        jack_nframes_t new_start;
! jack_nframes_t new_sync_position;
        if (_flags & Locked) {
                return;
        }
***************
*** 553,558 ****
--- 553,570 ----
                new_start = _start;
        }
  
+
+ if (_sync_position <= new_start || _sync_position== _start) {
+
+ //sync point at start of region (==no sync point) or trimmed away
+
+ new_sync_position = new_start;
+ } else {
+ new_sync_position = _sync_position;
+ }
+
+
+
        if (!verify_start_and_length (new_start, length)) {
                return;
        }
***************
*** 571,576 ****
--- 583,595 ----
                _position = position;
                what_changed = Change (what_changed|PositionChanged);
        }
+
+ if (_sync_position != new_sync_position) {
+ _sync_position = new_sync_position;
+ what_changed = Change (what_changed|SyncOffsetChanged);
+ }
+
+
  
        _flags = Region::Flag (_flags & ~WholeFile);

paul

2004-06-15 20:49

administrator   ~0001024

ok gvdo, give this one a shot! :)

vandongen

2004-06-16 08:58

updater   ~0001034

This fixed, but there is now some other bug with the sync points if you define one and trim. I will open a new bug report for that

Issue History

Date Modified Username Field Change
2004-05-31 09:07 vandongen New Issue
2004-05-31 09:07 vandongen E-mail => gml@xs4all.nl
2004-06-02 13:52 vandongen Note Added: 0000949
2004-06-04 11:15 vandongen Note Added: 0000968
2004-06-04 14:49 paul Note Added: 0000969
2004-06-05 10:33 vandongen Status new => closed
2004-06-05 10:33 vandongen Note Added: 0000971
2004-06-05 12:18 vandongen Status closed => feedback
2004-06-05 12:18 vandongen Resolution open => reopened
2004-06-05 12:18 vandongen Note Added: 0000972
2004-06-06 12:03 vandongen Note Added: 0000979
2004-06-06 12:09 vandongen Note Added: 0000980
2004-06-14 21:46 v2 Note Added: 0001018
2004-06-15 12:11 vandongen Note Added: 0001022
2004-06-15 20:49 paul Status feedback => resolved
2004-06-15 20:49 paul Resolution reopened => fixed
2004-06-15 20:49 paul Assigned To => paul
2004-06-15 20:49 paul Note Added: 0001024
2004-06-16 08:58 vandongen Status resolved => closed
2004-06-16 08:58 vandongen Note Added: 0001034