-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hydrogen crashes with "Can not reroute empty drumkit paths" #1852
Comments
AFAICS the error
is not doing any harm at all. (In version 1.2.0 Hydrogen introduced a replaced the element I can not reproduce the crash though. When does the crash occur? During startup or while running playback? Does it also occur when using a different audio driver (since the stacktrace suggests the crash might happen in the JACK server)?
Maybe. But Hydrogen must never crash regardless of what you enter in there. Could you try saving (as) the song (doing so with version 1.1.1 would be fine too)? This should smooth out erroneous parameters introduced during manual edit.
Attaching the Could you run jackd --version |
During playback. It always crashes at the same place when the song is played from the beginning. I tried to skip forward to just before where the crash happens and then it manages to play through it, but crashes a bit later.
Interesting -- PulseAudio seems to do better, though I hear a small pause where the crash usually happens. After some repeating at the problematic part I got a crash with PulseAudio too (at the same place in the song). Here is the log:
Tried that and it didn't change the file. Actually, the song file has never been manually edited, only the XMLs for the drumkits I pulled in when I first created it.
It prints: |
I've managed to isolate the problematic part. I attach a bundle with the entire With this shortened song, I sometimes have to repeat the patterns a couple of times before the crash happens. It usually happens at the end of the third pattern, but sometimes in other places as well. |
I noticed something else: It sounds a bit different in 1.2.2 compared to 1.1.1. You can hear the difference in the files in |
Hmm. Unfortunately not. Using your specific version of JACK didn't do it either. Did you by any chance try to compile Hydrogen from source on the 1.2.2 tag? Maybe it's the AppImage that is not working properly. But thanks a lot for all these resources!
That's quite interesting. I can hear this overlap as well. I'll check what is going on there. (I rewrote most parts of the audio engine for 1.2.0 to kill a number of long standing bugs. Maybe something went wrong) |
I was able to reproduce the issue using a Ubuntu 23.04 live system. It will need a couple of days as I need to setup an image, toolchain etc. but I will look into it. |
That's great, thanks for looking into it! |
Does this make use of Hydrogen's ADSR enveloping? The implementation of that changed (from an odd polynomial approximation, to a standardish logarithmic implementation) which would result in audible differences. It's a rarely-used feature so might be less well-tested than others, though having said that I'm not sure there's much scope for it to actually cause a SEGV. |
Aha, yep, it has maximum sustain. I've reproduced some bad behaviour on Mac which I'll look into if I have spoons (having a deliberate day off from regular work for the first time in aeons). I guess one side effect of the new implementation is that notes fade out longer so we're probably seeing a pile up of notes which is hitting some otherwise-unexercised conditions around max polyphony. Hmm. Although since you have auto note off on the instruments they shouldn't release longer than a single pattern anyway. Hmm. Thank you for an excellent test case! |
No, it doesn't look like it. I think the crash might be an Ubuntu-specific issue. It's the only distro I'm aware of that does not ship the The overlap around second 4,5, however, is probably an issue introduced while rewriting the audio engine (of which we had surprisingly little yet :D ) |
Yeah my theory about this was based on just trying it without thinking too much, PLUS forgetting that I had a bunch of debug tracing in my local build that messed things up :D I have however reproduced a crash on current master with macOS, letting this run over and over for a few minutes, it eventually crashes out in the sampler trying to access a It does seem to happen around the notes with explicit length set at the end of the third pattern. At a guess, maybe the |
That's indeed possible. Very long samples in combination with custom note lengths are an edge case we might not have tested yet. I'll still go down the Ubuntu route. At least for a little. It bothers me that the same AppImage runs flawless on my local Devuan but crashes immediately on the Ubuntu live image. |
I spent a little time on this on Tuesday and found that |
Ah, nice lead! The notes in both the sampler and the audio engine note queue do indeed "time travel" in case tempo or song size changes during playback. This meant to keep their rendering consistent whenever the playback position has to be adjusted internally while from the audio rendering point of view "nothing" changed. These offset calculations also depend on both sample rate and buffer size of the audio driver. If we are lucky the somewhat inconsistent occurrences of crashed is just due to different audio engine configurations. I'll have a look |
Alright. I was just able to reproduce the crash on my usual developing machine by setting my sample rate to 44100. (And I learned that we can change audio driver, sample rate, and buffer size while playback is rolling. Wow) |
@emilaxelsson could you check whether this version fixes your issues? (both the crash and the audible glitch should be gone) |
It works!! Thanks a lot for the quick fix -- now I can finally switch to the new UI. |
Glad to hear! |
Hey @emilaxelsson. We found some rendering issue that caused audible artifacts when defining the length note in the aftermath of your issue. This version of Hydrogen should fix them |
Sorry, for the delay. The linked version is no longer available, but I don't think it matters because everything sounds fine in the version I'm using (from Oct 6). |
Hydrogen version * : 1.2.2
Operating system + version : Ubuntu 23.04
Audio driver + version : Jack
Error message:
My song plays fine on Hydrogen 1.1.1. The problem has been for all versions after that (though I'm not sure whether the error message has been the same).
I attach my song attack.txt (changed to
.txt
so that GitHub would accept it). I've done manual edits to the drumkit XML, and it's possible that I've screwed something up.Unfortunately, I can't include the samples. They add up to 147 MB and contain copyrighted samples.
The text was updated successfully, but these errors were encountered: