Open hcw70 opened 11 years ago
I cannot directly reproduce the error, but similar errors happen to me from time to time.
Just to be sure, did you check that no instances of jackd
or ecasound
are running anymore?
Sometimes this helps:
killall -9 ecasound
killall -9 jackd
I have no clue why it should work in gdb and not outside of it ... strange ...
Do other JACK applications run smoothly?
I have running it with jackd and see the crash every time (if running without gdb). No ecasound is running. Of course i first start jack then SoundScape (with 2-4 live jack inputs).
This looks to me like a race condition regarding threading since in GDB startup / thread creation time is much longer.
My other jack stuff runs quite well.
Hmmm ... a race condition would be quite bad, because I don't know where to start looking ... especially as I'm not able to reproduce the error ...
Any suggestions?
@mgeier Maybe some infos regarding the machine: Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz with 8 virtual cores (4 real ones with hypertreading i thing) Running on Ubuntu 12.10 64-bit with low latency kernel.
Maybe you should check the messages: JackPosixSemaphore::TimedWait err = Unterbrechung während des Betriebssystemaufrufs Cannot read socket fd = 8 err = Unterbrechung während des Betriebssystemaufrufs CheckRes error JackSocketClientChannel read fail
since they dont appear when running under gdb. "Interruption while os call = Unterbrechung während des Betriebssystemaufrufs" typically occur if an os call is interrupted by an os signal (kill / term et al). Normally they should be restarted. See http://infohost.nmt.edu/~eweiss/222_book/222_book/0201433079/ch10lev1sec5.html for infos on this.
I have neither knowledge nor experience regarding these kinds of issues ... so I'm kinda stuck!
It still could have something to do with ecasound, because when the SSR is playing a sound file, it starts an instance of ecasound for that.
Could you please try to run the SSR with the scene data/scenes/live_input.asd
to see if the error still happens?
In fact i use live_input.asd and get the crash.
Maybe you could set up this repo and fill with the version, so it will be easier for others (and me) to look at.
I will put up the repository here on github soon (in the next few weeks/months), but before that I have to move around some stuff and clean up before starting a new repository (the old one is a mess).
In the meantime I'll try to regularly upload "preview" versions there: http://spatialaudio.net/ssr/download/ (I uploaded "pre5" yesterday).
Regarding your problem, you should try to compile and run the examples from this repo: https://github.com/AudioProcessingFramework/apf
The relevant files are examples/jack_*
. These examples use the same JACK-client code and the same multi-threading stuff as the SSR.
If you experience the same problems there, the error might be easier to track down.
I could finally reproduce the problem with a laptop of mine.
Sadly, I still have no idea how to solve this but at least I know more exactly where the error happens.
It's related to the Qt-GUI, so if compiled without it (./configure --disable-gui
) the SSR runs fine.
The actual crash happens when the ssr::QGUI
-object is constructed (see src/gui/qgui.cpp
).
Maybe upgrading Qt helps?
Here, the error happens with Qt version 4.8.2.
Hmm. Had a look at the source. Maybe this is because you use boost::threads in conjunction with Qt which has its own threading environment. How do you sync the gui with the threads?
Hmm. Had a look at the source. Maybe this is because you use boost::threads in conjunction with Qt which has its own threading environment.
The boost::threads
are only used in the network interface. If you compile with ./configure --disable-ip-interface
no Boost library will be used at all. You don't even have to have Boost installed.
I tried it on my laptop and it still crashes, even with disabled IP interface.
How do you sync the gui with the threads?
It uses an admittedly quite clumsy publish/subscribe mechanism (see e.g. src/publisher.h
) which I would like to replace anyway in the future.
But I still don't know how that crashes JACK. In the end, the commands are passed to the JACK-thread with a lock-free ringbuffer (in apf/apf/lockfreefifo.h
). This may well have bugs in it, but the error may also be at a completely different place ...
Hmm. If you use QT anyway, i would recommend looking at the QT Signals/Slots for publish/subscriber. They have nice OS abstractions (QThread, QFile) and oo patterns for multithreaded apps (QFuture)
Thanks for the hint, but we're using Qt only for the GUI and we will probably make a completely new GUI (probably without Qt) sometime in the future.
The rest of the code is Qt-free, i.e. if you don't have Qt, you can still compile the SSR without GUI (./configure --disable-gui
). I don't really like Qt for its corporate background and for it not being standard C++.
On my Laptop with Qt 4.8.5 it is working again (where is wasn't working with Qt 4.8.2). Can you please check if it also works on your system?
BTW, I recently uploaded a new 'preview' version (see http://spatialaudio.net/ssr/download/) and I pushed the repository to Github.
I'm closing this due to lack of response. I hope it works with newer versions of Qt!
Broken with qt 4.8.6 on ubuntu (utopic). libqtcore4 4:4.8.6+git49-gbc62005+dfsg-1ubuntu1 soundscaperenderer 0.4.1~dfsg-2
I'm reopening this, but I still have no clue what's causing the crash.
Does anybody still experience this problem?
Hi. While trying 0.4.0pre4 i ran into following:
However, when i ran it using gdb it works:
Kind regards
Hauke