Skip to content
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

It compiles somehow, but does not start #3

Open
thima2017 opened this issue Oct 1, 2017 · 27 comments
Open

It compiles somehow, but does not start #3

thima2017 opened this issue Oct 1, 2017 · 27 comments

Comments

@thima2017
Copy link

Here is my console log:
user@user:/tmp/tmp/auralization_engine_evertims-master/Builds/LinuxMakefile/build$ ./EvertSE
terminate called after throwing an instance of 'std::ios_base::failure[abi:cxx11]'
what(): Failed to open HRIR file: iostream error
Aborted
user@user:/tmp/tmp/auralization_engine_evertims-master/Builds/LinuxMakefile/build$

I've tried to put ClubFritz1_hrir.bin in the same dir with EvertSE file, but it did not help.
I've attached my last Makefile from JUCE:
Makefile.txt

@thima2017
Copy link
Author

And I am using Ubuntu 17.10. It has libmysofa-dev 0.6 package and libeigen3-dev 3.3.4 too. Also it has juce-modules-source 4.3.0 package, but it was not adapted well and I've used juce modules (5.1.2) from official juce site. For editing Makefile I used juce-tools 4.3.0 from ubuntu repo.
Before it I used Ubuntu 16.04 LTS with same result.

@PyrApple
Copy link
Member

PyrApple commented Oct 6, 2017

I finally got my hands on a functional Ubuntu install, will check that

@thima2017
Copy link
Author

I've ran 'make all test' in libmysofa's build dir and got this:

The following tests FAILED:
1 - CIPIC_subject_003_hrir_final (Failed)
2 - FHK_HRIR_L2354.sofa (Failed)
3 - LISTEN_1002_IRC_1002_C_HRIR.sofa (Failed)
4 - MIT_KEMAR_large_pinna.sofa (Failed)
5 - Pulse (Failed)
6 - Tester (Failed)
7 - TU-Berlin_QU_KEMAR_anechoic_radius_0.5_1_2_3_m.sofa (Failed)
8 - TU-Berlin_QU_KEMAR_anechoic_radius_0.5m.sofa (Failed)
Errors while running CTest

Maybe that is why the issue occurs. (I don't know how it all works, really)

@thima2017
Copy link
Author

What distro should I use?
Should I install Linuxbrew?

@thima2017
Copy link
Author

I've got how to use strace. EvertES tries to find files in root directory (/). But when I make links in /, the program shows many "Can not locate file" msgboxes anyway. But strace says nothing about it.

I've made following symlinks:
/ClubFritz1_hrir.bin
/hoa2bin_order2_IRC_1008_R_HRIR.bin
/omni.sofa

And I am attaching my last strace file.

strace6-EvertSE.txt

@meguia
Copy link

meguia commented Nov 27, 2017

Had exactly the same issue in Ubuntu 17.10 with JUCE 5.2.0 (built from sources) and libmysofa-dev from repo (added -lmysofa in the Makefile).

@thima2017
Copy link
Author

I could not compile GPL version of JUCE 5.2.0.
./libs/build_macos.sh with Linuxbrew builds libmysofa only

@thima2017
Copy link
Author

Readme file in libmysofa says that they tests libmysofa compilation on Ubuntu 14.04.
Nodejs package is needed to pass libmysofa tests.

@thima2017
Copy link
Author

I edited Source/Utils.h and it runs on the linux without errors, as far as I can see.
Utils.h.txt
(Rename it to Utils.h and place over original Utils.h in Source directory.)
Then I created ../data directory from the dir where EvertSE binary was placed. And then I putted all files from auralization_engine_evertims-master/data.
auralization_engine_evertims-master/Builds/LinuxMakefile/data$ ls
ClubFritz1_hrir.bin evertims_logo_512.png impulse.wav
directional.sofa hoa2bin_order2_IRC_1008_R_HRIR.bin omni.sofa
evertims_logo_256.png hoa2bin_order3_IRC_1008_R_HRIR.bin

@thima2017
Copy link
Author

EvertSE.jucer.txt
Makefile.txt
(It compiles Debug version by default.)

@thima2017
Copy link
Author

But seems it does not work. Just plays a sounds. And I don't know how to test it or tune. Blender shows nothing. There is no tracers or sound effects. What could be wrong?

@thima2017
Copy link
Author

thima2017 commented Dec 4, 2017

It works! And it's a wow program! Thank you very much for your huge work!
What did I use to compile:
Lubuntu 17.10
cmake-gui
https://packages.ubuntu.com/bionic/juce-modules-source
https://packages.ubuntu.com/bionic/juce-tools
galternatives (I added g++ group)
clang++ and clang (Version 4.0. For evertims and libevert. With g++-7 it segfaults on my system)
g++ for auralization_engine (EvertSE)

dev packages that I can remember:
libmysofa-dev
libpng-dev
libjpeg-dev
libeigen3-dev
libresample1-dev (linking to libresample.so gave bad quality. So I added libresample with eigen3 into pkg-config field in Makefile exporter in Projucer)

Also I added symlinks to libevert.so into /usr/lib and /usr/local/lib. Because I compiled and installed it in my userspace.

@thima2017
Copy link
Author

thima2017 commented Dec 4, 2017

Fixes: fix-files.7z.zip
EvertSE.jucer file and Makefile auralization_engine_evertims-master.7z.zip
64-bit binary with data dir: EvertSE.7z.zip

@meguia
Copy link

meguia commented Dec 5, 2017

Thanks @thima2017 for the tips. I was able to run the embedded Evertse in Blender, but when I try to start the Raytracing client it says:
...
EVERTimsRaytracingClient._raytracing_process = subprocess.Popen(client_cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, close_fds=ON_POSIX)
..
PermissionError: [Errno 13] Permission denied.
This happens also with sudo. I suspect that is something related to my evertims installation, but it compiled just fine.

@thima2017
Copy link
Author

Anyway, EvertSE segfaults in libc-2.26.so when I try to size up the room in blender. (dmesg message, for example: [ 2002.388871] Juce ALSA[3760]: segfault at 7f68451ebdf0 ip 00007f6879263536 sp 00007f68477fd578 error 4 in libc-2.26.so[7f68791b1000+1d6000])
It's not an evertims failure, definitely. It's something from Blender and/or EvertSE.
When I compile evertims, I do this steps (might be helpful):
I) I compile libevert:

  1. I create libevert/build/linux dir
  2. I open libevert/CMakeList.txt file by cmake-gui
  3. In cmake-gui:
    I point:
    source code dir (evertims-master/libevert)
    build dir (libevert/build/linux)
    Then I press Configure button and point CMAKE_INSTALL_PREFIX, the dir where I'd like make install to. This dir should be on executable file system. For example my home dir is not executable due fstab settings.
    Then I press Configure button again and then Generate.
  4. And then I do cd libevert/build/linux and make && make install
  5. And then I make symlinks in /usr/lib to CMAKE_INSTALL_PREFIX/lib/libevert.so (probably I should run sudo ldconfig then, but seems it's not needed)

II) I compile evertims:

  1. I create evertims/build/linux dir
  2. I open evertims/CMakeList.txt file by cmake-gui
  3. In cmake-gui:
    I point:
    source code dir (evertims-master/evertims)
    build dir (evertims/build/linux)
    Then I pressed Configure button and pointed CMAKE_INSTALL_PREFIX, the dir where I'd like make install to. This dir should be on executable file system too. And I point evert_DIR (libevert/build/linux).
    Then I press Configure button again and then Generate.
  4. And then I do cd evertims/build/linux and make && make install

And after all of this I compile EvertSE. But I already could compile EvertSE after libevert's make && make install.
And when I start evertims I point to ims binary in CMAKE_INSTALL_PREFIX dir, materials.dat in evertims-master/evertims/resources dir and EvertSE binary in auralization_engine_evertims-master/Builds/LinuxMakefile/build directory.

@thima2017
Copy link
Author

Did it help you?

@thima2017 thima2017 changed the title It compiles somehow, but does not starts It compiles somehow, but does not start Mar 23, 2018
@PyrApple
Copy link
Member

Thanks for all the work @thima2017. Struggling to find time to integrate your suggestions in the trunk atm, will sure do at some point.

@thima2017
Copy link
Author

I've told my mother your words and she said she is proud of me :D. Thank you. I hope someday someone will make a blender based 3d game for blinds to train echo-location ability for real life. It will be a real goodness. (There are many videos on youtube about that superpower ("blind echo"). For example http://www.youtube.com/watch?v=VMTLGvBudWI)

@edivic
Copy link

edivic commented May 18, 2018

Hi, I'm trying to install EverTIMS engine, and I followed you steps @thima2017 for the installation of EvertSE and it works. But now, I have problems with Blender. I integrate the EverSE ims and mat files, i start the templated scene, start EvertSE, i put some sound and I start the raytracing client and nothing happens. I just hear the sound that I started in EvertSE. Now, my question is have you installed successfully everything in Blender and does it work?
I am a student in Croatia and am writing a paper on EverTIMS and I would appreciate your help!

@thima2017
Copy link
Author

Does dmesg show any errors? And have you linked libevert.so to /usr/lib and /usr/local/lib? And do you have too restrict firewall rules for loopback connections? And if you use Ubuntu version <17.10 there should be a few addition steps to make it work.
And better to compile the sources instead of using the binaries, but you know it. I think the binaries will work on ubuntu 17.10 only.
And I think evertims and EvertSE should be started from blender gui.
And check if "draw rays in 3DView & BGE" and, probably, "Enable in BGE" in blender gui are enabled.
Check it all and write back, when you will have a time.
It worked on my ubuntu 17.10, but now I use 16.04, but it seems I plan to move to 18.04, but I don't know when.
And It worked, but evertims server crashed when I tried to resize the room in blender without pausing raytracing in blender. (sowwy for my english i hope you still able to understand)

@edivic
Copy link

edivic commented May 19, 2018

Thank you for the quick response.
It doesn't show any errors, and I am not sure how to link libvert.so to /usr/lib and /usr/local/lib?
I am using Lubuntu 18.04 because i saw that you wrote that it works in Lubuntu 17.10
I do start everttims and EvertSE form blender gui (I have some weird problems with EvertSE, I get a clear sound only 10th time that i play some sound, every other time I get some noise)
everything is enabled in blender as it is specified in the tutorial video on EverTIMS official site
Do you suggest that I try it in Ubuntu 17.10?

Thank you for your help, it really means alot

@thima2017
Copy link
Author

To make a symbolic link for any file I use "ln -s" command. So you need to go to the dir where your libevert.so file is and run "sudo ln -s ./libevert.so /usr/local/lib". I used this way for testing purposes, but it is not safe if someone is able to replace your libevert.so file and if the file has rw permissions for a non-root user.

I heard the noise too from time to time, I guess it somehow related to libresample. As I can remember, you can use libresample.so file from Lubuntu repo by adding the link to this library in Projucer editor (another type of link than the one before(external library or something, (write "resample" there instead of "libresample"))), or you can install libresample-dev package and point in linuxExtraPkgConfig field of Projucer (I don't remember the name in the Projucer gui) libresample, or you can make libresample by your own and "ln -s" it to "usr/local/lib". The results of this tree ways differed on my previous system (with or without noise) as I can remember today.

I am quite sure it should work on Lubuntu 18.04 in the same or even better way as on Lubuntu 17.10. So you don't need to downgrade.

@edivic
Copy link

edivic commented May 19, 2018

I tried it and it seems that I already have libvert.so in my /usr/local/lib, so it's not about that.

In comment that you added on Dec 4 2017 you said that you installed the EvertSE and I followed that steps and installed it myself and nowhere do you mention Projucer, so I do not have Projucer installed. Is it necessary? And what role does it have in EverTIMS because I thought it is used only to install the EverSE and now that I have installed it without the Projucer, what is the purpose of having Projucer installed?

@thima2017
Copy link
Author

I think Projucer is used to make a correct Makefiles only.
Try to disable and then enable the "bpy mode" to restart some magic inside. It helps me to get EvertSE transforming the sound.

I've compiled it on bionic by g++ 4.8 and gcc 4.8.
It's looks like it's more stable now, but EvertSE still segfaults if the room becomes too big. I don't know why.

To compile evertims with g++ 4.8 and gcc 4.8 the "#include <stdio.h>" in socket.h is still needed.
The current EvertSE doesn't need any changes in sources for successful compiling.

I used galternatives to switch the compilers from default 7.3 on bionic.
And seems clang is not needed actually.

In the files I've attached you may find the EvertSE.jucer file I used, AudioIOComponent.h which adds mp3 support, socket.h file for compiling with g++ 4.8 and gcc 4.8 and two screenshots about galternatives.
files270618.7z.zip

@thima2017
Copy link
Author

And yes, now you need to place the data dir in the dir where the EvertSE executable is, not in a upper one as previously.

@ronnystandtke
Copy link

I just tested with Ubuntu 21.04 and, unfortunately, EvertSE segfaults here directly after starting "on the fly auralization" in Blender 2.79 (not in the repos, downloaded the binary from blender website).

@hectorC
Copy link

hectorC commented Jun 14, 2022

I just tested with Ubuntu 21.04 and, unfortunately, EvertSE segfaults here directly after starting "on the fly auralization" in Blender 2.79 (not in the repos, downloaded the binary from blender website).

I'm getting the same problem. Running it through gdb gives this clue:

Thread 1 "EvertSE" received signal SIGSEGV, Segmentation fault.
0x00007ffff7d35429 in copyFromFloat () from /usr/local/lib/libmysofa.so.1

(gdb) bt
#0  0x00007ffff7d35429 in copyFromFloat () from /usr/local/lib/libmysofa.so.1
#1  0x00007ffff7d3691d in mysofa_interpolate () from /usr/local/lib/libmysofa.so.1
#2  0x00007ffff7d38d8d in mysofa_getfilter_float_advanced () from /usr/local/lib/libmysofa.so.1
#3  0x00007ffff7d38ead in mysofa_getfilter_float () from /usr/local/lib/libmysofa.so.1
#4  0x000055555560f300 in DirectivityHandler::getGains (this=0x55555608aa60, azim=0, elev=-0) at ../../Source/DirectivityHandler.h:104
#5  0x0000555555610eaf in SourceImagesHandler::updateFromOscHandler (this=0x555556089030, oscHandler=...) at ../../Source/SourceImagesHandler.h:376
#6  0x00005555555fe5d5 in MainContentComponent::updateOnOscReceive (this=0x555556083390) at ../../Source/MainComponent.cpp:487
#7  0x00005555555fee2d in MainContentComponent::changeListenerCallback (this=0x555556083390, broadcaster=0x555556084680) at ../../Source/MainComponent.cpp:575
#8  0x00005555558dbd97 in juce::ChangeBroadcaster::<lambda(juce::ChangeListener&)>::operator()(juce::ChangeListener &) const (__closure=0x7fffffffda10, l=...)
    at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp:87
#9  0x00005555558e070e in juce::ListenerList<juce::ChangeListener, juce::Array<juce::ChangeListener*, juce::DummyCriticalSection, 0> >::call<juce::ChangeBroadcaster::callListeners()::<lambda(juce::ChangeListener&)> >(juce::ChangeBroadcaster::<lambda(juce::ChangeListener&)> &&) (this=0x5555560846a8, callback=...)
    at ../../../juce-6.1.6-linux/JUCE/modules/juce_core/containers/juce_ListenerList.h:124
#10 0x00005555558dbdd8 in juce::ChangeBroadcaster::callListeners (this=0x555556084680) at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp:87
#11 0x00005555558dbe80 in juce::ChangeBroadcaster::ChangeBroadcasterCallback::handleAsyncUpdate (this=0x555556084688)
    at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp:99
#12 0x00005555558e2b6b in juce::AsyncUpdater::AsyncUpdaterMessage::messageCallback (this=0x55555606a380)
    at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/broadcasters/juce_AsyncUpdater.cpp:34
#13 0x00005555558e51e6 in juce::InternalMessageQueue::InternalMessageQueue()::{lambda(int)#1}::operator()(int) const (__closure=0x55555604b298, fd=4)
    at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/native/juce_linux_Messaging.cpp:42
#14 0x00005555558ef5ab in std::_Function_handler<void (int), juce::InternalMessageQueue::InternalMessageQueue()::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&) (__functor=...,
    __args#0=@0x7fffffffdae4: 4) at /usr/include/c++/9/bits/std_function.h:300
#15 0x00005555558eb250 in std::function<void (int)>::operator()(int) const (this=0x55555604b298, __args#0=4) at /usr/include/c++/9/bits/std_function.h:688
#16 0x00005555558e5ef7 in juce::InternalRunLoop::dispatchPendingEvents (this=0x55555604b210) at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/native/juce_linux_Messaging.cpp:185
#17 0x00005555558e0524 in juce::dispatchNextMessageOnSystemQueue (returnIfNoPendingMessages=false) at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/native/juce_linux_Messaging.cpp:299
#18 0x00005555558da4a7 in juce::MessageManager::runDispatchLoop (this=0x55555604b1a0) at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/messages/juce_MessageManager.cpp:107
#19 0x00005555558d9970 in juce::JUCEApplicationBase::main () at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/messages/juce_ApplicationBase.cpp:262
#20 0x00005555558d982d in juce::JUCEApplicationBase::main (argc=1, argv=0x7fffffffdda8) at ../../../juce-6.1.6-linux/JUCE/modules/juce_events/messages/juce_ApplicationBase.cpp:240
#21 0x00005555555f8c3d in main (argc=1, argv=0x7fffffffdda8) at ../../Source/Main.cpp:105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants