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

core dump when execute lv2_file_generator on arch linux #208

Closed
xunil-cloud opened this issue Sep 9, 2020 · 13 comments
Closed

core dump when execute lv2_file_generator on arch linux #208

xunil-cloud opened this issue Sep 9, 2020 · 13 comments

Comments

@xunil-cloud
Copy link

Describe your environment
Arch linux 64bit

Describe the problem or the feature request
Since I want to create package(AUR) on arch linux, I try to compile the source. I get core dump when lv2_file_generator is executed via camomile shell script. The strange thing is that I don't get such error using the release version 1.0.7. Can anyone help me?

error messages:

Camomile - Plugin Generator
./builds/AlmondOrgan.vst3
generating ttl AlmondOrgan in ./builds/AlmondOrgan.lv2/AlmondOrgan.so
./camomile: line 243:  3791 Segmentation fault      (core dumped) LD_LIBRARY_PATH=$PWD "$ThisPath/lv2_file_generator" "$plugin_output_dir/$plugin_name.lv2/$plugin_name.$LinuxLV2Extension" $plugin_name
mv: cannot stat '/home/billson/src/Camomile/Plugins/manifest.ttl': No such file or directory
mv: cannot stat '/home/billson/src/Camomile/Plugins/AlmondOrgan.ttl': No such file or directory
./builds/AlmondOrgan.lv2

gdb output (run lv2_file_generator directly):

(gdb) run builds/AlmondOrgan.lv2/AlmondOrgan.so AlmondOrgan
Starting program: /home/billson/src/Camomile/Plugins/lv2_file_generator builds/AlmondOrgan.lv2/AlmondOrgan.so AlmondOrgan
generating ttl AlmondOrgan in builds/AlmondOrgan.lv2/AlmondOrgan.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff724957a in std::ostream::sentry::sentry (this=0x7fffffffd470,
    __os=...)
    at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:46
46	/build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc: No such file or directory.
(gdb) bt
#0  0x00007ffff724957a in std::ostream::sentry::sentry (
    this=0x7fffffffd470, __os=...)
    at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:46
#1  0x00007ffff7249c8d in std::__ostream_insert<char, std::char_traits<char> > (__out=..., __s=__s@entry=0x555555579140 "Camomile: AlmondOrgan",
    __n=21)
    at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream_insert.h:76
#2  0x00007ffff724a15e in std::operator<< <std::char_traits<char> > (
    __out=..., __s=0x555555579140 "Camomile: AlmondOrgan")
    at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/char_traits.h:357
#3  0x00007ffff75ac1cc in juce::operator<< <std::char_traits<char> > (
    stream=..., stringToWrite=...)
    at ../../../Juce/modules/juce_core/text/juce_String.h:1570
#4  0x00007ffff76661e6 in juce::Logger::outputDebugString (text=...)
    at ../../../Juce/modules/juce_core/native/juce_linux_SystemStats.cpp:32
#5  0x00007ffff75299f5 in CamomileEnvironment::CamomileEnvironment (
    this=0x7ffff7db4fa0 <CamomileEnvironment::get()::env>)
    at ../../../Source/PluginEnvironment.cpp:222
--Type <RET> for more, q to quit, c to continue without paging--
#6  0x00007ffff7528a92 in CamomileEnvironment::get ()
    at ../../../Source/PluginEnvironment.cpp:22
#7  0x00007ffff7528afb in CamomileEnvironment::getPluginNameUTF8 ()
    at ../../../Source/PluginEnvironment.cpp:32
#8  0x00007ffff74f6e36 in __static_initialization_and_destruction_0 (
    __initialize_p=1, __priority=65535)
    at ../../JuceLibraryCode/../JuceLibraryCode/../../Source/PluginConfig.h:24
#9  0x00007ffff74f7813 in _GLOBAL__sub_I_PluginProcessor.cpp(void) ()
    at ../../../Source/PluginProcessor.cpp:652
#10 0x00007ffff7fe12de in call_init.part ()
   from /lib64/ld-linux-x86-64.so.2
#11 0x00007ffff7fe13c8 in _dl_init () from /lib64/ld-linux-x86-64.so.2
#12 0x00007ffff7f020e5 in _dl_catch_exception () from /usr/lib/libc.so.6
#13 0x00007ffff7fe5705 in dl_open_worker ()
   from /lib64/ld-linux-x86-64.so.2
#14 0x00007ffff7f02088 in _dl_catch_exception () from /usr/lib/libc.so.6
#15 0x00007ffff7fe4f3e in _dl_open () from /lib64/ld-linux-x86-64.so.2
#16 0x00007ffff7f9134c in ?? () from /usr/lib/libdl.so.2
#17 0x00007ffff7f02088 in _dl_catch_exception () from /usr/lib/libc.so.6
#18 0x00007ffff7f02153 in _dl_catch_error () from /usr/lib/libc.so.6
#19 0x00007ffff7f91b89 in ?? () from /usr/lib/libdl.so.2
--Type <RET> for more, q to quit, c to continue without paging--
#20 0x00007ffff7f913d8 in dlopen () from /usr/lib/libdl.so.2
#21 0x00005555555551f6 in main ()
@pierreguillot
Copy link
Owner

How did you compile the plugins and the lv2_file_generator?

@xunil-cloud
Copy link
Author

I mainly followed the instructions from the README.md file.

cd Dependencies/LibPdBuild/LinuxMakefile && cmake .. -DCMAKE_BUILD_TYPE=Release && cd ../../..
make

terminal output when I run make command

Then I go into Plugins directory and run ./camomile -f ./Examples/AlmondOrgan/. I got above error messages.

Thanks in advance.

@pierreguillot
Copy link
Owner

Can you try to build in release mode make CONFIG=Release?

@xunil-cloud
Copy link
Author

Yep, I try that and now I can generate lv2 plugins successfully!

@pierreguillot
Copy link
Owner

I would like to fix the debug problem but I can't reproduce it. Could you change the line 222 of PluginEnvironment.cpp:
DBG("Camomile: " + plugin_name);?
Perhaps if you use DBG("Camomile: " << plugin_name); instead, it will fix the problem. Could you let me know if you find a solution?

@xunil-cloud
Copy link
Author

Could you let me know if you find a solution?

Ok.

Could you change the line 222 of PluginEnvironment.cpp:
DBG("Camomile: " + plugin_name);?
Perhaps if you use DBG("Camomile: " << plugin_name); instead, it will fix the problem.

I will try this as soon as possible, maybe tomorrow.

@xunil-cloud
Copy link
Author

No, it still have the same error. However, this line does matter. I try to comment out this line, and I don't get such error.

@xunil-cloud
Copy link
Author

It seems that we can't print anything here. I also try to use std::cout to print messages. If I do that, using make CONFIG=Release instead of make won't get rid of core dump error.

@pierreguillot
Copy link
Owner

In fact, I guess the problem is related to that https://unix.stackexchange.com/questions/246143/gdb-throws-error-on-arch-linux. I'm not sure that related to Camomile. Can you test the solution suggested and confirm? Thank you!

@xunil-cloud
Copy link
Author

Not sure that really related to Camomile, since I also have error when runing lv2_file_generator without gdb. I try to strip the libstdc++ library, but it doesn't fix the problem.

@xunil-cloud
Copy link
Author

Since you said you couldn't reproduce it, I wander what distro or environment do you use to make a release on Linux?

@pierreguillot
Copy link
Owner

I use Travis CI to create the release, on can have the information on the build: https://travis-ci.org/github/pierreguillot/Camomile/jobs/726739582.

@pierreguillot
Copy link
Owner

This is fixed on dev/v1.0.8.

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

No branches or pull requests

2 participants