Limitation on filesystem calls in QLC+ ?

Generic issues not specifically related to a QLC+ area.
Post here only if you can't really find the reason of an issue
Post Reply
shivahoj
Posts: 27
Joined: Mon Sep 23, 2019 5:26 am
Location: Hildesheim, Germany
Real Name: Dirk Engelmann

Hello, i am using QLC+ 4.12.3 on Linux pc
the OS is

Code: Select all

Linux debian 4.19.0-17-amd64 #1 SMP Debian 4.19.194-1 (2021-06-10) x86_64 GNU/Linux
I need to control a laser pattern generator(the Neon Captain radiator, https://www.neoncaptain.com/#/) via MIDI commands, that cannot be generated in/from QLC.
So i decided to call little shell scripts, that output midi commands via sendmidi(https://github.com/gbevin/SendMIDI).
here is an example of a such script:

Code: Select all

#!/bin/bash
workdir="/Users/dirk/Documents/Hardware_Bastel/Laser_Dmx_Party/radiator/"
sendmidi=$workdir"sendmidi"          # sendmidi path

# output device: put YOUR device here
dev="USB2.0-MIDI Anschluss 1"

$sendmidi dev $dev cc 32 25
$sendmidi dev $dev PC 28    # use sendmidi variable to execute $sendmidi

If I fire this script from the command line , for example via the watch command, it works for hours and countless repetitions.
but when I trigger it with QLC (as a system command in script editor, deleting the "args:" , and repeating it via a cue list), it runs close to 200 times and then silently stops, without giving any error.
Pausing it does not help, switching between Design Mode and Operate Mode also does not help, I have to completely exit and restart QLC+ to re-establish this functionality.

this is how i tested it:
I made another bash script, test.sh, that just creates an empty file with the tile as a filename:

Code: Select all

#!/bin/bash
#touch ./midiout-test/acab-$(date +'%H-%M-%S-%N')
#touch ./midiout-test/bcab-$(date +'%H-%M-%S-%N')
#touch ./midiout-test/ccab-$(date +'%H-%M-%S-%N')
touch ./midiout-test/dcab-$(date +'%H-%M-%S-%N')
This is what the directory midiout-test looks like, when I have a cue list running with an event every second:

Code: Select all

dirks% ls -l
total 195
-rwxrwxrwx  1 dirk  staff      0 19 Jul 09:58 dcab-11-58-31-486358089
-rwxrwxrwx  1 dirk  staff      0 19 Jul 09:58 dcab-11-58-32-485303985
etc...
-rwxrwxrwx  1 dirk  staff      0 19 Jul 10:01 dcab-12-01-44-493793369
-rwxrwxrwx  1 dirk  staff      0 19 Jul 10:01 dcab-12-01-45-492089051
dirks%
I tried it several times, there are always close to 192 ( 192=128+64? ) files generated, then QLC just silently stops calling the function.

Code: Select all

    ls -la ~/Schreibtisch/QLC+/midiout-test/ac* >acab.txt
    ls -la ~/Schreibtisch/QLC+/midiout-test/bc* >bcab.txt
    ls -la ~/Schreibtisch/QLC+/midiout-test/cc* >ccab.txt
    ls -la ~/Schreibtisch/QLC+/midiout-test/dc* >dcab.txt
   wc -l acab.txt
     193 acab.txt
   wc -l bcab.txt
     193 bcab.txt
   wc -l ccab.txt
     195 ccab.txt
   wc -l dcab.txt
     195 dcab.txt
is there another way to reliably call Shell functions or craft arbitrary MIDI commands from within QLC?

BTW: When I try to do this same setup on the Mac(OSX Mojave, QLC+4.12.3), it won't even let me create the script. The syntax parser(green check mark) complains with:
Syntaxfehler bei Zeile 1:
systemcommand:/Users/dirk/Documents/Hardware_Bastel/Laser_Dmx_Party/QLC+/test.sh arg:

I tried this with and without the "args:" addition.
So I cannot compare the linux QLC with the Mac QLC...
Fixture: GLP Impression Spot one w/ Artnet/DMX (2x)
Macbook pro, OSX 10.13.4, QLC+ 4.12.2
Generic touch screen PC, with debian 10 linux, QLC+ 4.12.2
MIDI: AKAI APC40, Doepfer pocket fader, Radium 49 Keyboard
DMX: enttec USB pro
shivahoj
Posts: 27
Joined: Mon Sep 23, 2019 5:26 am
Location: Hildesheim, Germany
Real Name: Dirk Engelmann

I found a working syntax for calling scripts in OSX. The script line has to be:

Code: Select all

systemcommand:/usr/bin/open arg:"file:///Users/dirk/Documents/Hardware_Bastel/Laser_Dmx_Party/QLC+/test.sh"
Unfortunately, this opens a terminal window every time the script is executed(said window in turn captures all user input to the Mac, making the Mac unusable), the computer fans are spinning up, and QLC finally CRASHES after 391 script calls.

Is there a better way to execute system commands on OSX?
Fixture: GLP Impression Spot one w/ Artnet/DMX (2x)
Macbook pro, OSX 10.13.4, QLC+ 4.12.2
Generic touch screen PC, with debian 10 linux, QLC+ 4.12.2
MIDI: AKAI APC40, Doepfer pocket fader, Radium 49 Keyboard
DMX: enttec USB pro
thierry
Posts: 11
Joined: Thu Sep 05, 2019 10:07 pm
Location: Namur - Belgium
Real Name: Thierry Demonty
Contact:

With qlplus 4.12.5, there is actually a limit on the total number of systemcommands that can be launched, as systemcommand is consuming file descriptors (on Linux, Windows & macOS).

This issue will be fixed by the next qlcplus release with the fix #1358.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

This is fixed with version 4.12.6
Post Reply