View Issue Details

IDProjectCategoryView StatusLast Update
0003093ardourbugspublic2020-04-19 20:14
Reporternolaiz Assigned Topaul  
PrioritynormalSeveritycrashReproducibilitysometimes
Status closedResolutionfixed 
Product VersionSVN/2.0-ongoing 
Summary0003093: Ardour crashes when changing zoom
DescriptionWhen changing the zoom, ardour crashes with this message:

ardour-2.8.8: gtk2_ardour/tempo_lines.cc:218: void TempoLines::draw(std::vector<ARDOUR::TempoMap::BBTPoint, std::allocator<ARDOUR::TempoMap::BBTPoint> >&, double): Assertion `_lines.find(xpos) == _lines.end()' failed.
The session could not be loaded anymore, until deleting the local instant.xml, and replacing the zoom value in the ~/.ardour2/instant.xml.
Additional InformationBacktrace, ~/.ardour2/instant.xml and crashing session attached
TagsNo tags attached.

Activities

2010-04-26 10:05

 

instant.xml (1,014 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<instant>
  <ExportDialog sample_rate="48kHz" src_quality="best" dither_type="None" channel_count="stereo" header_format="WAV" bitdepth_format="16 bit" endian_format="Little-endian (Intel)" filename="/home/nael/test_sine/export/export.wav" cue_file_type="None">
    <Tracks>
      <Track channel1="off" channel2="off"/>
      <Track channel1="off" channel2="off"/>
    </Tracks>
  </ExportDialog>
  <Mixer narrow-strips="no" show-mixer="no"/>
  <Editor id="12" mixer-width="Wide" zoom-focus="5" zoom="64079.001154" snap-to="13" snap-mode="2" edit-point="EditAtSelectedMarker" playhead="2040831" show-waveforms="yes" show-waveforms-rectified="no" show-waveforms-recording="yes" show-measures="yes" follow-playhead="no" stationary-playhead="no" xfades-visible="yes" region-list-sort-type="ByName" mouse-mode="MouseObject" show-editor-mixer="yes">
    <geometry x_size="1680" y_size="988" x_pos="-2" y_pos="21" x_off="0" y_off="37" edit_pane_pos="1476"/>
  </Editor>
</instant>
instant.xml (1,014 bytes)   

2010-04-26 10:05

 

backtrace_ardour (11,248 bytes)   
ardour-2.8.8: gtk2_ardour/tempo_lines.cc:218: void TempoLines::draw(std::vector<ARDOUR::TempoMap::BBTPoint, std::allocator<ARDOUR::TempoMap::BBTPoint> >&, double): Assertion `_lines.find(xpos) == _lines.end()' failed.                                                                                                                                                       

Program received signal SIGABRT, Aborted.
0x00007fffefbb24b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.                                
        in ../nptl/sysdeps/unix/sysv/linux/raise.c                                                         
(gdb) thread apply all bt

Thread 27 (Thread 0x7fffb7856910 (LWP 25223)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220
#1  0x00007ffff613f602 in ?? () from /usr/lib/libgthread-2.0.so.0                                                
#2  0x00007ffff5c850bf in ?? () from /lib/libglib-2.0.so.0                                                       
#3  0x00007ffff5c851cf in g_async_queue_timed_pop () from /lib/libglib-2.0.so.0                                  
#4  0x00007ffff5cd40b0 in ?? () from /lib/libglib-2.0.so.0                                                       
#5  0x00007ffff5cd2b44 in ?? () from /lib/libglib-2.0.so.0                                                       
#6  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300                       
#7  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112                              
#8  0x0000000000000000 in ?? ()                                                                                  

Thread 25 (Thread 0x7fffb9058a30 (LWP 25221)):
#0  0x00007fffefc523c3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffff7b204ae in ARDOUR::Session::midi_thread_work() () from libs/ardour/libardour.so                                                    
#2  0x00007ffff7b20bd1 in ARDOUR::Session::_midi_thread_work(void*) () from libs/ardour/libardour.so                                              
#3  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300                                                        
#4  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112                                                               
#5  0x0000000000000000 in ?? ()                                                                                                                   
Current language:  auto                                                                                                                           
The current source language is "auto; currently asm".                                                                                             

Thread 24 (Thread 0x7fffb92f1a30 (LWP 25220)):
#0  0x00007fffefc523c3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffff7ad8c74 in ARDOUR::Session::butler_thread_work() () from libs/ardour/libardour.so                                                  
---Type <return> to continue, or q <return> to quit---                                                                                            
#2  0x00007ffff7ad9c9b in ARDOUR::Session::_butler_thread_work(void*) () from libs/ardour/libardour.so                                            
#3  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300                                                        
#4  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112                                                               
#5  0x0000000000000000 in ?? ()                                                                                                                   
Current language:  auto                                                                                                                           
The current source language is "auto; currently c".                                                                                               

Thread 23 (Thread 0x7fffb93eea30 (LWP 25219)):
#0  0x00007ffff32f88f1 in nanosleep () from /lib/libpthread.so.0
#1  0x00007ffff5cd4e88 in g_usleep () from /lib/libglib-2.0.so.0
#2  0x00007ffff79d8b8f in ARDOUR::AudioEngine::meter_thread() () from libs/ardour/libardour.so
#3  0x00007ffff5a4cdd2 in call_thread_entry_slot () from libs/glibmm2/libglibmm2.so           
#4  0x00007ffff5cd2b44 in ?? () from /lib/libglib-2.0.so.0                                    
#5  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300    
#6  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112           
#7  0x0000000000000000 in ?? ()                                                               

Thread 22 (Thread 0x7fffd2467910 (LWP 25218)):
#0  0x00007fffefc523c3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffff350d8c6 in ?? () from /usr/lib/libjack.so.0                                                                                          
#2  0x00007ffff350dd40 in jack_thread_wait () from /usr/lib/libjack.so.0                                                                            
#3  0x00007ffff350de4a in ?? () from /usr/lib/libjack.so.0                                                                                          
#4  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300                                                          
#5  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112                                                                 
#6  0x0000000000000000 in ?? ()                                                                                                                     
---Type <return> to continue, or q <return> to quit---                                                                                              

Thread 21 (Thread 0x7fffb8057910 (LWP 25215)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffff350f8eb in ?? () from /usr/lib/libjack.so.0                                             
#2  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300             
#3  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112                    
#4  0x0000000000000000 in ?? ()                                                                        

Thread 4 (Thread 0x7fffe497c910 (LWP 25196)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffff79c3a3b in ARDOUR::Analyser::work() () from libs/ardour/libardour.so                    
#2  0x00007ffff5a4cdd2 in call_thread_entry_slot () from libs/glibmm2/libglibmm2.so                    
#3  0x00007ffff5cd2b44 in ?? () from /lib/libglib-2.0.so.0                                             
#4  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300             
#5  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112                    
#6  0x0000000000000000 in ?? ()                                                                        
Current language:  auto                                                                                
The current source language is "auto; currently asm".                                                  

Thread 3 (Thread 0x7fffe517d910 (LWP 25195)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffff7b4f2f3 in peak_thread_work() () from libs/ardour/libardour.so                          
#2  0x00007ffff5a4cdd2 in call_thread_entry_slot () from libs/glibmm2/libglibmm2.so                    
#3  0x00007ffff5cd2b44 in ?? () from /lib/libglib-2.0.so.0                                             
#4  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300             
---Type <return> to continue, or q <return> to quit---
#5  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()                                                    

Thread 2 (Thread 0x7fffe597e910 (LWP 25194)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007ffff7b4f2f3 in peak_thread_work() () from libs/ardour/libardour.so                          
#2  0x00007ffff5a4cdd2 in call_thread_entry_slot () from libs/glibmm2/libglibmm2.so                    
#3  0x00007ffff5cd2b44 in ?? () from /lib/libglib-2.0.so.0                                             
#4  0x00007ffff32f0a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300             
#5  0x00007fffefc5e80d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112                    
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffff7f9d7d0 (LWP 25189)):
#0  0x00007fffefbb24b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fffefbb5f50 in *__GI_abort () at abort.c:92
#2  0x00007fffefbab481 in *__GI___assert_fail (assertion=0x903370 "_lines.find(xpos) == _lines.end()", file=<value optimized out>, line=218,
    function=0x9033a0 "void TempoLines::draw(std::vector<ARDOUR::TempoMap::BBTPoint, std::allocator<ARDOUR::TempoMap::BBTPoint> >&, double)") at assert.c:81
#3  0x000000000084416f in TempoLines::draw(std::vector<ARDOUR::TempoMap::BBTPoint, std::allocator<ARDOUR::TempoMap::BBTPoint> >&, double) ()
#4  0x00000000006bfcca in Editor::redraw_measures() ()
#5  0x00007ffff5a518c2 in (anonymous namespace)::glibmm_source_callback(void*) () from libs/glibmm2/libglibmm2.so
#6  0x00007ffff5ca9bce in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#7  0x00007ffff5cad598 in ?? () from /lib/libglib-2.0.so.0
#8  0x00007ffff5cad6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#9  0x00007ffff5551021 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#10 0x00007ffff3789495 in Gtkmm2ext::UI::flush_pending() () from libs/gtkmm2ext/libgtkmm2ext.so
#11 0x0000000000549ad5 in ARDOUR_UI::goto_editor_window() ()
#12 0x000000000052acf1 in ARDOUR_UI::load_session(Glib::ustring const&, Glib::ustring const&, Glib::ustring) ()
#13 0x00000000005307fe in ARDOUR_UI::get_session_parameters(bool, bool) ()
#14 0x0000000000530dec in ARDOUR_UI::startup() ()
#15 0x00007ffff378a0ea in Gtkmm2ext::UI::run(Receiver&) () from libs/gtkmm2ext/libgtkmm2ext.so
#16 0x0000000000748e21 in main ()
Current language:  auto
The current source language is "auto; currently c".
(gdb)

backtrace_ardour (11,248 bytes)   

2010-04-26 10:06

 

komodo_final.ardour.bz2 (70,688 bytes)

cth103

2010-04-26 19:44

administrator   ~0007585

I can't reproduce this, unfortunately. What is the bad zoom value in instant.xml that causes problems?

If you want to debug it yourself, it looks like some faulty logic in the caching done in TempoLines::draw()...

parumi

2010-04-27 07:16

reporter   ~0007624

I've been able to reproduce it in a couple of machines (Ubuntu 9.10 with last ardour2 svn revision).
cth103: have you tried to copy the attached instant.xml into $HOME/.ardour2/ ? After this open the attached session and zoom out a lot. It should crash.

Thanks for the debugging tip.

2010-04-27 10:45

 

dont_draw_beat_lines.patch (461 bytes)   
Index: gtk2_ardour/tempo_lines.cc
===================================================================
--- gtk2_ardour/tempo_lines.cc	(revision 6993)
+++ gtk2_ardour/tempo_lines.cc	(working copy)
@@ -136,6 +136,9 @@
 			break;
 
 		case ARDOUR::TempoMap::Beat:
+//// HACK BM. Don't draw tempo lines. Workaround for zoom assert
+			break; 
+//// End Hack BM
 			if ((*i).beat == 1) {
 				color = ARDOUR_UI::config()->canvasvar_MeasureLineBar.get();
 			} else {
dont_draw_beat_lines.patch (461 bytes)   

nolaiz

2010-04-27 10:55

reporter   ~0007625

I uploaded a workaround patch: just don't draw the beat lines....

Making some tests (uncommenting the debug messages and adding some others), it appears to ONLY enter in the conditional case of "CREATING LINE", and crashed after the third time.
The first time _lines is empty, and it search for xpos=0
the second time _lines have a value with key 0 and it search for xpos=1
the third time _lines have keys 0 and 1, and it search for xpos=1, that makes the assert

2012-04-29 11:34

 

novadeviator

2012-04-29 11:38

reporter   ~0013212

i have attached an ardour file (SadSamLucky...) that was giving me the crash while zooming or horizontaly scrolling in 2.8.11 with the following error on the console:

(ardour-2.8.11:5075): Gtk-WARNING **: EnableTranslation: missing action EnableTranslation
Session writable based on /home/random/PROJECTS/120418_sadsamlucky/sad_sam_lucky_session3/lucky session3/
ardour-2.8.11: gtk2_ardour/tempo_lines.cc:218: void TempoLines::draw(std::vector<ARDOUR::TempoMap::BBTPoint, std::allocator<ARDOUR::TempoMap::BBTPoint> >&, double): Assertion `_lines.find(xpos) == _lines.end()' failed.
Aborted

disabling Show Measures works as a workaround.

deva

2013-01-24 19:14

reporter   ~0014596

The problem also exists in Ardour 3 (svn 13991).
The crash appears if the value of the zoom attribute in the Editor tag exceeds 30000 in instant.xml

This line works:
  <Editor id="11" mixer-width="Wide" zoom-focus="ZoomFocusMouse" zoom="30000.000000" ...

This line crashes:
  <Editor id="11" mixer-width="Wide" zoom-focus="ZoomFocusMouse" zoom="30001.000000" ...

It seems to me that somebody made the decision "30000 units is enough for everybody." ;-)

deva

2013-01-28 07:24

reporter   ~0014610

As of rev14015 it seem fixed in Ardour3.

paul

2013-01-28 13:42

administrator   ~0014613

ah, great, i wondered if that change would fix this issue. thanks for the prompt follow up.

paul

2013-01-28 13:42

administrator   ~0014614

see notes.

deva

2013-01-28 13:49

reporter   ~0014615

Just a note: Since this issue was originally a 2.0 issue, a backport should be considered...

system

2020-04-19 20:14

developer   ~0022045

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2010-04-26 10:05 nolaiz New Issue
2010-04-26 10:05 nolaiz File Added: instant.xml
2010-04-26 10:05 nolaiz File Added: backtrace_ardour
2010-04-26 10:06 nolaiz File Added: komodo_final.ardour.bz2
2010-04-26 19:44 cth103 Note Added: 0007585
2010-04-26 19:44 cth103 Status new => feedback
2010-04-27 07:16 parumi Note Added: 0007624
2010-04-27 10:45 nolaiz File Added: dont_draw_beat_lines.patch
2010-04-27 10:55 nolaiz Note Added: 0007625
2012-04-29 11:34 novadeviator File Added: SadSamLuckyOuttakes_v2.ardour.gz
2012-04-29 11:38 novadeviator Note Added: 0013212
2013-01-24 19:14 deva Note Added: 0014596
2013-01-28 07:24 deva Note Added: 0014610
2013-01-28 13:42 paul Note Added: 0014613
2013-01-28 13:42 paul cost => 0.00
2013-01-28 13:42 paul Note Added: 0014614
2013-01-28 13:42 paul Status feedback => resolved
2013-01-28 13:42 paul Resolution open => fixed
2013-01-28 13:42 paul Assigned To => paul
2013-01-28 13:49 deva Note Added: 0014615
2020-04-19 20:14 system Note Added: 0022045
2020-04-19 20:14 system Status resolved => closed