Tracks skipped in Auto DJ mode and eventually Mixxx crashes

Dear experts, I’m quite impressed with the new features in Mixxx V2.3 and it works - most of the time - flawlessly!

The only thing I stumbled upon is a weird behavior while using the “Auto DJ” mode. It seems to happen randomly so very hard to reproduce. I’ve noticed that in some occasions a track from the list is simply skipped. This seems to happen once every 10 to 15 tracks, but no pattern to deduct. When re-queuing the skipped tracks, they play just fine, so I doubt there’s an issue with the track itself. Digging deeper I found the following messages repeatedly when Mixxx started from the CLI:

Warning [Main]: CachingReader - Loading a new track while loading a track may lead to inconsistent states


Warning [Main]: Skip track with 0 Duration “[…]”

Eventually, when running for a few hours, Mixxx crashes with

terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc
Aborted (core dumped)

Strange enough, running Mixxx with the loglevel “Debug” doesn’t seem to exhibit that behavior.

As I’m using the “Auto DJ” feature quite extensively, any hint or fix would be highly appreciated!

Some details on my environment:

  • Linux x86_64
  • Ubuntu 20.04.3
  • Mixxx 2.3.0

Thanks a lot in advance!

Thanks for the detailed report. std::bad_alloc() signals out of memory and could be a hint for a memory leak.

  • Broadcasting enabled?
  • What else is running on the system?
  • Are you able to monitor memory consumption of all applications periodically during such a session?

The arbitrary skipping of non-empty tracks seems to be a different issue in AutoDJ. Probably caused by a race condition, e.g. unexpected deck/player signals that are not handled correctly by the underlying state model.

The logging level should not affect the observed behavior, that’s strange.

Hi @tapir, thanks for taking this up so quickly! You’re very welcome, I’m trying to make it as easy as possible for you to pinpoint the root cause, that’s the least I can do for this great project!

Regarding your questions:

  • No Broadcasting or Recording enabled, just playing the tracks
  • When trying to reproduce the issue I’m only running some lightweight stuff alongside Mixxx, as this is a quite recent laptop, I’d doubt that this is related to a performance issue
  • Mixxx is running on a 16GB RAM machine, so I doubt a memory constraint, but I’ll try to monitor the memory consumption and if there’s anything suspicious I’ll let you know

It sounds very plausible that skipping tracks and out-of-memory are two separate issues, I just wanted to give the full context, should the issues be intertwined.

If I read the bug report you’re linking to correctly, you’re able to reproduce the issue at will, any input or further testing on the skipping of tracks using Auto DJ from my side required for now?

Do you still have the log file from that session? This file always contains the full debug logs, the log level only affects the console output. You could send it via private message if it contains information you don’t want to reveal.

Your AutoDJ settings like fade mode and time would be helpful for investigating the skipping bug.

I guess a backtrace wouldn’t help with the out of memory issue. It is still worth a try in case the bad allocation itself is caused by a signed/unsigned conversion bug. But this is very unlikely.

Hi @tapir, I’ve tried to reproduce the crash, it seems to be related to the time Mixxx is running in Auto DJ mode. After about 10 hours (rough estimate) in Auto DJ mode Mixx crashes with the same messages as before, i.e. a lot of warnings on “CachingReader…” and “Skip track…”, and finally the “bad_alloc”.

The Auto DJ settings were “Skip Silence” fade, “3s” fade time, and re-queue tracks.

If a more detailed log would help, let me know how to produce that and I will try again.

The tail of the log file might contain some hints where to look for.

A quick update on my testing, running Mixxx in debug mode with

mixxxx --logLevel debug

is still exhibiting the weird behavior of skipping tracks randomly, but it doesn’t crash, (at least when running for up to 12 hours), this is consistent to what I’ve experienced when reporting the issue in the first place.

Any other input I can provide to help to pinpoint the issue?

Please provide the tail of your log file as requested and attach it to the bug report.