View Issue Details

IDProjectCategoryView StatusLast Update
0009560ardourbugspublic2023-12-25 00:58
ReporterM.F. Assigned Tox42  
PriorityhighSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformDebian GNUOSLinuxOS Version(any)
Summary0009560: Spectral analysis crashes Ardour
Descriptionwhen tryin Spectral Analys, Ardour just shutdown itself immediately.
Additional InformationAV Linux 21.2.1, 6.0.0-10.1-liquorix-amd64

Jack in use, Ardour-8.1.144-x86_64 and Ardour-8.1
TagsNo tags attached.

Activities

x42

2023-11-30 16:00

administrator   ~0028375

I cannot reproduce this. Spectral analysis works reliably here.

Does it happen with every session? Every time you try this?

Even with a new simple session (1 track, record a short region)? What Sample-rate do you use (not that it should make a difference).

Ideally a backtrace of the crash would be helpful: https://ardour.org/debugging_ardour

dspasic

2023-11-30 16:26

reporter   ~0028376

Hi, i managed to crash few times. Though Spectral Analysis works (it does not freeze or block Ardour.)
scenario:
1. open new project
2. import audio file (so i can analyze something)
3. do spectral analysis several times, and it will crash

MBPro M1 (Ventura)
please check logs. Thanks
ardour8 crash2 (119,022 bytes)   
Ardour8 crash1 (125,428 bytes)   

x42

2023-11-30 16:30

administrator   ~0028378

Sadly those crash reports are not useful. Ardour Debug symbols are missing.

It might even be unrelated different issue. The Crash Log shows a macOS specific crash in openGL/Metal abstraction (which can't be present on Linux).

dspasic

2023-11-30 16:35

reporter   ~0028379

Hi Robin,
I just downloaded debug version (again) and it seems that it is really not a debug version.
Can you help? Thanks

x42

2023-11-30 18:40

administrator   ~0028381

@dspasic that setting is unrelated, it pertains to Ardour itself producing a stack-trace, not a debugger doing so.

Do you use "Show frequency power range" display option? If so, that could explain the issue

x42

2023-12-03 15:23

administrator   ~0028385

Does this still happen with Ardour 8.1.145 or later?

avard

2023-12-07 10:38

reporter   ~0028390

Chiming in,

- spectral analysis on selected region = OK
- spectral analysis on region = crash

Fedora fc38 (kernel 6.6.3, if that's useful) - Ardour8.1.0 (built using 8.1 and GCC version 13.2.1 20231011 (Red Hat 13.2.1-4)) - downloaded tar-ball from git

First time gdb w. ardour, please also guide to good ways to debug and provide crash-reports.
gdb.core.dump_2023-12-07 (115,302 bytes)   

batinste

2023-12-07 13:40

reporter   ~0028391

- spectral analysis on selected region = ok
- spectral analysis on selected range = crash

Ardour 8.1.151-demo-dbg & linux mint 6.2.0-37-generic 00000380000047:0000022.04.1-Ubuntu SMP PREEMPT_DYNAMIC

batinste

2023-12-07 13:41

reporter   ~0028392

oops, forgot the log
crash.log (91,139 bytes)   

x42

2023-12-07 14:09

administrator   ~0028393

That is helpful. Thanks. Not what I'd expected.

@paul are those over-reads caused by a TimeDomain mismatch?

paul

2023-12-07 14:17

administrator   ~0028394

@batinste how easily reproducible is this error?

batinste

2023-12-07 14:52

reporter   ~0028395

@paul i tried about 10 times and every range spectral analysis crashed ardour. Region spectral analysis is always ok, though.

x42

2023-12-07 15:13

administrator   ~0028396

FWIW, I cannot reproduce this at all.

x42

2023-12-07 15:14

administrator   ~0028397

@batinste do you use Audio Time or Music (Beat) Time (Session > Properties >Misc)?

batinste

2023-12-07 15:39

reporter   ~0028398

Ha, good catch : I used Music Time.
Setting this to Audio Time and analyzing the same range (same magnet settings) does not produce the crash and the analysis works.
Then i can select another range and analyze it correctly.
If i switch back to Music Time, i can analyze the same -still selected- range correctly too. If i then select another range, the analysis crashes.

avard

2023-12-07 15:41

reporter   ~0028399

same cure here :-)

x42

2023-12-08 22:54

administrator   ~0028401

OK. it's not a cure, but it can explain this.

Bar/Beat/Tick is resolution is more coarse than audio-sample-time. (e.g. with 120BPM @48kHz, one tick equals to 12.5 audio-samples)
It seems possible that the GUI requests more data from an audio-region for analysis than there is actually present in the file. :(

paul

2023-12-12 00:48

administrator   ~0028406

Nominally fixed in commit 3c687bfa9fd

colinf

2023-12-12 13:19

updater   ~0028408

@paul: not pushed yet?

colinf@colinf-xps15:~/src/ardour/ardour$ git show 3c687bfa9fd
fatal: ambiguous argument '3c687bfa9fd': unknown revision or path not in the working tree.

paul

2023-12-12 14:27

administrator   ~0028409

It was pushed yesterday, about 15 hours ago.

colinf

2023-12-12 15:01

updater   ~0028410

@paul: do you mean f184acfb?

paul

2023-12-12 15:02

administrator   ~0028411

No, I mean this:

-----

commit 3c687bfa9fd7a11eaf466e9daca893e4c259dc66
Author: Paul Davis <paul@linuxaudiosystems.com>
Date: Mon Dec 11 16:51:16 2023 -0700

    prevent crash in AudioPlaylist::write() due to lossy time domain convert

diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index cfe011b0c9..d751152d4c 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -275,9 +275,15 @@ AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, ti
 
         samplepos_t read_pos (i->range.start().samples());
         samplecnt_t read_cnt (i->range.start().distance (i->range.end()).samples());
- assert (start.distance (i->range.start()).samples() < scnt);
- assert (start.distance (i->range.start()).samples() + read_cnt <= scnt);
- samplecnt_t nread = i->region->read_at (buf + start.distance (i->range.start()).samples(), mixdown_buffer, gain_buffer, read_pos, read_c
nt, chan_n);
+ samplecnt_t soffset = start.distance (i->range.start()).samples();
+
+ assert (soffset < scnt);
+
+ if (soffset + read_cnt > scnt) {
+ read_cnt = scnt - soffset;
+ }
+ assert (soffset + read_cnt <= scnt);
+ samplecnt_t nread = i->region->read_at (buf + soffset, mixdown_buffer, gain_buffer, read_pos, read_cnt, chan_n);
         if (nread != read_cnt) {
             std::cerr << name() << " tried to read " << read_cnt << " from " << nread << " in " << i->region->name() << " using range "
                       << i->range.start() << " .. " << i->range.end() << " len " << i->range.length() << std::endl;

paul

2023-12-12 15:03

administrator   ~0028412

hmm. same commit contents

not sure what's going on there and off to a doctor's appt now

colinf

2023-12-12 15:06

updater   ~0028413

Ah, weird, that's exactly the commit that's published as f184acfb. Anyway, thanks for fixing - I hit this a few times at the weekend.

paul

2023-12-12 18:19

administrator   ~0028414

i forgot that i had to rebase before pushing, hence the different commit hashes.

Issue History

Date Modified Username Field Change
2023-11-30 15:34 M.F. New Issue
2023-11-30 16:00 x42 Note Added: 0028375
2023-11-30 16:26 dspasic Note Added: 0028376
2023-11-30 16:26 dspasic File Added: ardour8 crash2
2023-11-30 16:26 dspasic File Added: Ardour8 crash1
2023-11-30 16:30 x42 Note Added: 0028378
2023-11-30 16:35 dspasic Note Added: 0028379
2023-11-30 16:35 dspasic File Added: Screenshot 2023-11-30 at 17.34.59.png
2023-11-30 16:35 dspasic File Added: Screenshot 2023-11-30 at 17.34.47.png
2023-11-30 18:40 x42 Note Added: 0028381
2023-12-03 15:23 x42 Assigned To => x42
2023-12-03 15:23 x42 Status new => feedback
2023-12-03 15:23 x42 Note Added: 0028385
2023-12-07 10:38 avard Note Added: 0028390
2023-12-07 10:38 avard File Added: gdb.core.dump_2023-12-07
2023-12-07 13:40 batinste Note Added: 0028391
2023-12-07 13:41 batinste Note Added: 0028392
2023-12-07 13:41 batinste File Added: crash.log
2023-12-07 14:09 x42 Note Added: 0028393
2023-12-07 14:17 paul Note Added: 0028394
2023-12-07 14:52 batinste Note Added: 0028395
2023-12-07 15:13 x42 Note Added: 0028396
2023-12-07 15:14 x42 Note Added: 0028397
2023-12-07 15:39 batinste Note Added: 0028398
2023-12-07 15:41 avard Note Added: 0028399
2023-12-08 22:54 x42 Note Added: 0028401
2023-12-12 00:48 paul Note Added: 0028406
2023-12-12 13:19 colinf Note Added: 0028408
2023-12-12 14:27 paul Note Added: 0028409
2023-12-12 15:01 colinf Note Added: 0028410
2023-12-12 15:02 paul Note Added: 0028411
2023-12-12 15:03 paul Note Added: 0028412
2023-12-12 15:06 colinf Note Added: 0028413
2023-12-12 18:19 paul Note Added: 0028414
2023-12-25 00:58 paul Status feedback => resolved
2023-12-25 00:58 paul Resolution open => fixed