dagargo / elektroid

Sample and MIDI device manager
https://dagargo.github.io/elektroid/
GNU General Public License v3.0
245 stars 32 forks source link

Elektroid does not start #44

Closed marco-polo-github closed 3 years ago

marco-polo-github commented 3 years ago

When I open the program as below I'll get the error. In the past it was working well, so I pulled the latest git commit, but it is still there. Switching on-off the Digitakt and connecting to another USB port did not help.

> elektroid
ALSA lib rawmidi_hw.c:100:(snd_rawmidi_hw_params) SNDRV_RAWMIDI_IOCTL_PARAMS failed: Invalid argument
elektroid: rawmidi.c:256: snd_rawmidi_open_conf: Assertion `err >= 0' failed.
Aborted (core dumped)

Here some other tries:

> elektroid-cli ld
2 Elektron Digitakt MIDI 1

> elektroid-cli info 0
ALSA lib rawmidi_hw.c:235:(snd_rawmidi_hw_open) open /dev/snd/midiC0D0 failed: No such file or directory
ERROR:connector.c:1987:(connector_init): Error while opening MIDI port: Unknown error -2

> elektroid-cli info 2
ALSA lib rawmidi_hw.c:100:(snd_rawmidi_hw_params) SNDRV_RAWMIDI_IOCTL_PARAMS failed: Invalid argument
elektroid-cli: rawmidi.c:256: snd_rawmidi_open_conf: Assertion `err >= 0' failed.
Aborted (core dumped)

Do you have an idea what to try?

linux distro: opensuse:tumbleweed:20211005 Digitakt: V1.30

dagargo commented 3 years ago

I think this is not related to Elektroid but to the 5.14 kernel and alsa-lib. I've checked that the version you're using is 5.14.1 so this might be the issue here.

The same error was reported in #41. Take a look there and in alsa-project/alsa-lib#178, an alsa-lib issue that asserts that this was a kernel bug and was addressed in verison 5.14.10 only 6 days ago..

Let me know if upgrading or downgrading the kernel (downgrading is what other users did in #41) solves your issue.

Please, consider starring or watching Elektroid to keep up to date on the project issues and changes.

dagargo commented 3 years ago

Have you tried another kernel to see if that fixes your issue?

marco-polo-github commented 3 years ago

I've upgraded to Kernel:

> uname -r
5.14.11-2-default

and it worked once starting Elektroid, selecting the Digitakt and browse the files on the Digitakt. Then I've closed Elektroid, and reopened and I get the same error again:

ALSA lib rawmidi_hw.c:100:(snd_rawmidi_hw_params) SNDRV_RAWMIDI_IOCTL_PARAMS failed: Invalid argument
elektroid: rawmidi.c:256: snd_rawmidi_open_conf: Assertion `err >= 0' failed.
Aborted (core dumped)

Does not matter if I switch off/on the Digitakt or restart Elektroid. When the Digitakt is connected Elektroid does not start. When it is not connected I can of course start Elektroid, but it crashes as soon as I refresh the device list. I tried the last few installed Kernels that were shown in grub, but that also did not help.

dagargo commented 3 years ago

That's the same error so I suspect that kernel has the bug too. If the kernel is the issue here, other applications like amidi will fail with the same error.

If this fails, could you try with an older kernel?

dagargo commented 3 years ago

Probably, totally unrelated but I've just merged lot of commits from another branch and this might help you.

marco-polo-github commented 3 years ago

Sorry for my late answer, I tried the two installed Kernel versions:

marco-polo-github commented 3 years ago

ok, the latest version (commit 326a3b693ed8284c7b780574f0338fea96636013) works well. I got an error at the step "make install", but I managed copying the binaries myself.

> sudo make install
Making install in src
make[1]: Verzeichnis „/home/elektron/programs/elektroid/src“ wird betreten
make[2]: Verzeichnis „/home/elektron/programs/elektroid/src“ wird betreten
 /usr/bin/mkdir -p '/usr/local/bin'
  /bin/sh ../libtool   --mode=install /usr/bin/install -c elektroid elektroid-cli '/usr/local/bin'
libtool: install: /usr/bin/install -c elektroid /usr/local/bin/elektroid
libtool: install: /usr/bin/install -c elektroid-cli /usr/local/bin/elektroid-cli
make[2]: Für das Ziel „install-data-am“ ist nichts zu tun.
make[2]: Verzeichnis „/home/elektron/programs/elektroid/src“ wird verlassen
make[1]: Verzeichnis „/home/elektron/programs/elektroid/src“ wird verlassen
Making install in res
make[1]: Verzeichnis „/home/elektron/programs/elektroid/res“ wird betreten
make[2]: Verzeichnis „/home/elektron/programs/elektroid/res“ wird betreten
make[2]: Für das Ziel „install-exec-am“ ist nichts zu tun.
 /usr/bin/mkdir -p '/usr/local/share/applications'
 /usr/bin/install -c -m 644 elektroid.desktop '/usr/local/share/applications'
 /usr/bin/mkdir -p '/usr/local/share/metainfo'
 /usr/bin/install -c -m 644 elektroid.appdata.xml '/usr/local/share/metainfo'
 /usr/bin/mkdir -p '/usr/local/share/elektroid/res'
 /usr/bin/install -c -m 644 gui.glade gui.css '/usr/local/share/elektroid/res'
 /usr/bin/mkdir -p '/usr/local/share/icons/hicolor/scalable/apps'
 /usr/bin/install -c -m 644 elektroid.svg elektroid-symbolic.svg elektroid-wave-symbolic.svg elektroid-data-symbolic.svg elektroid-project-symbolic.svg elektroid-sound-symbolic.svg '/usr/local/share/icons/hicolor/scalable/apps'
make  install-data-hook
make[3]: Verzeichnis „/home/elektron/programs/elektroid/res“ wird betreten
Updating Gtk icon cache.
gtk-update-icon-cache: Cache file created successfully.
make[3]: Verzeichnis „/home/elektron/programs/elektroid/res“ wird verlassen
make[2]: Verzeichnis „/home/elektron/programs/elektroid/res“ wird verlassen
make[1]: Verzeichnis „/home/elektron/programs/elektroid/res“ wird verlassen
Making install in test
make[1]: Verzeichnis „/home/elektron/programs/elektroid/test“ wird betreten
make[2]: Verzeichnis „/home/elektron/programs/elektroid/test“ wird betreten
make[2]: Für das Ziel „install-exec-am“ ist nichts zu tun.
make[2]: Für das Ziel „install-data-am“ ist nichts zu tun.
make[2]: Verzeichnis „/home/elektron/programs/elektroid/test“ wird verlassen
make[1]: Verzeichnis „/home/elektron/programs/elektroid/test“ wird verlassen
Making install in po
make[1]: Verzeichnis „/home/elektron/programs/elektroid/po“ wird betreten
/bin/sh @MKINSTALLDIRS@ /usr/local/share
/bin/sh: @MKINSTALLDIRS@: No such file or directory
make[1]: *** [Makefile:233: install-data-yes] Fehler 127
make[1]: Verzeichnis „/home/elektron/programs/elektroid/po“ wird verlassen
make: *** [Makefile:436: install-recursive] Fehler 1

I am currently backing up projects and it works great.

lentferj commented 3 years ago

I did have that problem with @MKINSTALLDIRS@, too, at some point.

This helped me (handle with care). clean out the complete elektroid directory, check everything out again and build from scratch.

$ cd ~/git-repos/elektroid
$ rm -rf *
$ git checkout .
$ autoreconf --install
$ ./configure
$ make
$ sudo make install
dagargo commented 3 years ago

In case you're not following the project I recommend you to do it as there are gonna be lots of changes in the following weeks till the version 2.0 is ready.

marco-polo-github commented 3 years ago

Thanks a lot! I will close that issue.