hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.06k stars 173 forks source link

Crash on initialisation #1769

Closed coreymwamba closed 1 year ago

coreymwamba commented 1 year ago

Hydrogen version * : hydrogen 1.2.0- Operating system + version : Arch Linux Audio driver + version : jack 1.9.22


On attempting to start Hydrogen, box pops up:

"Hydrogen exited abnormally. Fatal error in: Inistialising Hydrogen"

Log messages below.

Hydrogen 1.2.0- [Apr 17 2023]  [http://www.hydrogen-music.org]
Copyright 2002-2008 Alessandro Cominu
Copyright 2008-2023 The hydrogen development team
Hydrogen comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it under certain conditions. See the file COPYING for details.
(E) Effects::getPluginList Error loading the library. (/usr/lib/ladspa/DecentSampler.so)
hydrogen: /usr/src/debug/hydrogen/hydrogen-1.2.0/src/core/Basics/Sample.cpp:75: H2Core::Sample::Sample(const QString&, const H2Core::License&, int, int, float*, float*): Assertion `filepath.lastIndexOf( "/" ) >0' failed.
Fatal error in: Initialising Hydrogen
(E) ::void handleFatalSignal(int) Fatal signal 6
(E) ::void handleFatalSignal(int) /usr/bin/hydrogen(+0x1b47e3) [0x55b0678297e3]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(+0x38f50) [0x7f2af1251f50]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(+0x878ec) [0x7f2af12a08ec]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(gsignal+0x18) [0x7f2af1251ea8]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(abort+0xd7) [0x7f2af123b53d]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(+0x2245c) [0x7f2af123b45c]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(+0x319f6) [0x7f2af124a9f6]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core6SampleC1ERK7QStringRKNS_7LicenseEiiPfS7_+0x1b1) [0x7f2af30d1f71]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core15InstrumentLayer9load_fromEPNS_7XMLNodeERK7QStringRKNS_7LicenseEb+0x3cf) [0x7f2af30b765f]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core19InstrumentComponent9load_fromEPNS_7XMLNodeERK7QStringRKNS_7LicenseEb+0x248) [0x7f2af30b8868]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core10Instrument9load_fromEPNS_7XMLNodeERK7QStringS5_RKNS_7LicenseEb+0xd8c) [0x7f2af30aebdc]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core14InstrumentList9load_fromEPNS_7XMLNodeERK7QStringS5_RKNS_7LicenseEb+0x31f) [0x7f2af30b663f]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core7Drumkit9load_fromEPNS_7XMLNodeERK7QStringb+0x80e) [0x7f2af309c19e]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core7Drumkit4loadERK7QStringbb+0x380) [0x7f2af309cd10]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core20SoundLibraryDatabase14updateDrumkitsEb+0x41a) [0x7f2af31976aa]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core20SoundLibraryDatabase6updateEv+0x1b) [0x7f2af319ae0b]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core20SoundLibraryDatabaseC1Ev+0x68) [0x7f2af319ae98]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core8HydrogenC2Ev+0x242) [0x7f2af3113ad2]
(E) ::void handleFatalSignal(int) /usr/lib/libhydrogen-core-1.2.0.so(_ZN6H2Core8Hydrogen15create_instanceEv+0xd7) [0x7f2af3113e57]
(E) ::void handleFatalSignal(int) /usr/bin/hydrogen(main+0x20b3) [0x55b0676ee1d3]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(+0x23790) [0x7f2af123c790]
(E) ::void handleFatalSignal(int) /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f2af123c84a]
(E) ::void handleFatalSignal(int) /usr/bin/hydrogen(+0x7cd35) [0x55b0676f1d35]
theGreatWhiteShark commented 1 year ago

Hey @coreymwamba ,

Could you attach the Hydrogen song you attempt to load? Hopefully I can reproduce the crash.

You can determined its path like this

cat $HOME/.hydrogen/hydrogen.conf | grep lastSongFilename
coreymwamba commented 1 year ago

Hi @theGreatWhiteShark,

Unfortunately, I wasn't trying to open a song -- I was just starting the program.

cat $HOME/.hydrogen/hydrogen.conf | grep lastSongFilename
  <lastSongFilename></lastSongFilename>
theGreatWhiteShark commented 1 year ago

Hmm. That's even more odd than I thought.

Could you attach your ~/.hydrogen/hydrogen.conf file as well as the output of the following commands

tree $HOME/.hydrogen

and

tree /usr/share/hydrogen/

Also, could you start Hydrogen in a terminal using

hydrogen -VDebug

and report the output in here? Maybe this will shed some light on what is going on in your setup.

coreymwamba commented 1 year ago

Hello @theGreatWhiteShark,

Many thanks for your suggestion and help.

theGreatWhiteShark commented 1 year ago

Awesome! Thanks.

Seems like the kit gm drums with my sound is crashing Hydrogen.

Could you export it using

tar -cvf kit.h2drumkit $HOME/.hydrogen/data/drumkits/gm drums with my sound/

and attach it?

coreymwamba commented 1 year ago

Here's the kit.

coreymwamba commented 1 year ago

Yeah, it's definitely that kit. Just removed the offending sound -- for some reason (can't remember why) I'd tried adding an Ogg file to a kit?!?

I'm just going to remove the kit. Many thanks for your help on this!

theGreatWhiteShark commented 1 year ago

I don't know. First of all, Hydrogen should never crash. Especially not because of a single sample in your drumkit folder. Apart from that Hydrogen does not actually load all the samples of each drumkit during startup. It only loads their general structure and metadata. Having an ogg file, a bricked ogg file, or even an executable disguising as an ogg file should have no effect on Hydrogen's startup.

I'm just going to remove the kit.

You shouldn't have to. I think the problem here is Hydrogen itself. Not your kit. Or Hydrogen in your specific environment since I'm able to load your kit just fine on my local Linux.

For some reason I can't not fathom when looking at the code base Hydrogen is not able to determine an absolute path to at least one sample of your kit properly.

Could you compile and run the code in #1772 ? It both should not crash anymore and tell us about the specific sample (path) it choked on in the logs.

theGreatWhiteShark commented 1 year ago

I'll close this for now as the code won't crash anymore. In case you have further input concerning the strange behavior seen, please feel free to open it again.