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

canno recognize libc error #14

Closed
nortikin opened this issue Apr 26, 2018 · 21 comments
Closed

canno recognize libc error #14

nortikin opened this issue Apr 26, 2018 · 21 comments

Comments

@nortikin
Copy link

# Blender 2.79 (sub 0), Commit date: 2017-09-11 10:43, Hash 5bd8ac9abfa
bpy.data.window_managers["WinMan"].addon_filter = 'Node'  # Property

# backtrace
blender(BLI_system_backtrace+0x20) [0x1a6c8e0]
blender() [0x107a525]
/lib/x86_64-linux-gnu/libc.so.6(+0x33060) [0x7f604fe24060]
blender(_ZNSo6sentryC1ERSo+0x12) [0x60884e2]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x29) [0x7f604f661439]
/home/ololo/.config/blender/2.79/scripts/addons/Audionodes/libnative.so(initialize+0xb3) [0x7f600b2d7e93]
/home/ololo/Downloads/INSTALL/blender-2.79-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(+0x1aecc) [0x7f6023ecdecc]
/home/ololo/Downloads/INSTALL/blender-2.79-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(+0x19cdb) [0x7f6023ecccdb]
/home/ololo/Downloads/INSTALL/blender-2.79-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(+0x116ff) [0x7f6023ec46ff]
/home/ololo/Downloads/INSTALL/blender-2.79-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(+0x8949) [0x7f6023ebb949]
blender(PyObject_Call+0x5c) [0x2e40ebc]
blender(PyEval_EvalFrameEx+0x3812) [0x2f041f2]
blender(PyEval_EvalFrameEx+0x74eb) [0x2f07ecb]
blender(PyEval_EvalFrameEx+0x74eb) [0x2f07ecb]
blender() [0x2f0a4ee]
blender(PyEval_EvalFrameEx+0x6c8a) [0x2f0766a]
blender() [0x2f0a4ee]
blender(PyEval_EvalCodeEx+0x23) [0x2f0a5c3]
blender() [0x2e6b4c4]
blender(PyObject_Call+0x5c) [0x2e40ebc]
blender() [0x1474574]
blender() [0x19f3b26]
blender() [0x1081e4a]
blender() [0x1082232]
blender() [0x125ec2b]
blender() [0x126f269]
blender() [0x108373c]
blender() [0x1083ba8]
blender(wm_event_do_handlers+0x1d4) [0x1083eb4]
blender(WM_main+0x18) [0x107b108]
blender(main+0x3f8) [0x1018bd8]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f604fe112e1]
blender() [0x107747e]
@nortikin
Copy link
Author

wm handlers do something cruel

@ollpu
Copy link
Collaborator

ollpu commented Apr 29, 2018

I'm guessing that isn't to do with the wm handlers specifically, but with our initialize-function in general. I'm not seeing this behaviour locally. How did you obtain the addon zip? From the Downloads-page or did you compile it yourself?

Looking at our initialize-function, it might have something to do with printing SDL_GetError() even though no error was ever set. (it would then return null, which could cause a crash when printed through iostream)

@nortikin
Copy link
Author

nortikin commented May 5, 2018

compiled by myself
no errors while compilation process
ok, later will try
thanks

@ollpu
Copy link
Collaborator

ollpu commented May 5, 2018

Okay. Could you try compiling in debug-mode (cmake . -DCMAKE_BUILD_TYPE=Debug && make ...), and then running blender through GDB (gdb blender)? Maybe we could locate the crash more specifically.

@nortikin
Copy link
Author

nortikin commented May 5, 2018

russinig . cmake

@nortikin
Copy link
Author

nortikin commented May 5, 2018

still cannot activate addon. and no gdb output can see

@nortikin
Copy link
Author

nortikin commented May 5, 2018

now it not even make zip file

@ollpu
Copy link
Collaborator

ollpu commented May 5, 2018

So you need to activate the addon in the blender-process opened through GDB. Do something like this:

gdb blender
run
# try to load the addon, crash, back to the GDB-prompt
backtrace

And provide the output.

@nortikin
Copy link
Author

nortikin commented May 5, 2018

fake_module: addon missing 'bl_info' gives bad performance!: '/home/ololo/.config/blender/2.79/scripts/addons/vtkblender.py'
[Thread 0x7fffcc811700 (LWP 4117) exited]
[New Thread 0x7fffe6eee700 (LWP 4122)]
[New Thread 0x7fffe6ead700 (LWP 4123)]

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
0x00000000060884e2 in std::ostream::sentry::sentry(std::ostream&) ()
(gdb) 

@nortikin
Copy link
Author

nortikin commented May 5, 2018

or it was not replaced zip file while make process with debug flag?

@ollpu
Copy link
Collaborator

ollpu commented May 5, 2018

You can install it with make blender_install if you're unable to do it manually.

Anyways, in that GDB prompt you sent, type in backtrace to see more information.

@nortikin
Copy link
Author

nortikin commented May 5, 2018

the same with gdb blender run activate:

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
0x00000000060884e2 in std::ostream::sentry::sentry(std::ostream&) ()
(gdb) backtrace
#0  0x00000000060884e2 in std::ostream::sentry::sentry(std::ostream&) ()
#1  0x0000000006088af8 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) ()
#2  0x00007ffff5c3d897 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007fffb159ad7a in initialize ()
    at /home/ololo/git/Audionodes/native/audionodes.cpp:147
#4  0x00007fffc99ececc in ffi_call_unix64 ()
    at /home/sources/packages/Python-3.5.3/Modules/_ctypes/libffi/src/x86/unix64.S:76
#5  0x00007fffc99ebcdb in ffi_call (cif=<optimized out>, fn=<optimized out>, 
    rvalue=0x7fffffffd2e0, avalue=<optimized out>)
    at /home/sources/packages/Python-3.5.3/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#6  0x00007fffc99e36ff in _call_function_pointer (argcount=0, 
    resmem=0x7fffffffd2e0, restype=<optimized out>, atypes=<optimized out>, 
    avalues=0x7fffffffd2d0, pProc=0x7fffb159ac9b <initialize()>, flags=4353)
    at /home/sources/packages/Python-3.5.3/Modules/_ctypes/callproc.c:813
#7  _ctypes_callproc (pProc=pProc@entry=0x7fffb159ac9b <initialize()>, 
    argtuple=argtuple@entry=0x7fffec40a048, flags=4353, 
    argtypes=argtypes@entry=0x7fffec40a048, 

@nortikin
Copy link
Author

nortikin commented May 5, 2018

backtrace. sorry

@ollpu
Copy link
Collaborator

ollpu commented May 5, 2018

Alright. So the crash happens when printing a line of static text in our initialize-function, so it has nothing to do with SDL.

I was able to replicate the crash by installing Blender locally instead of using a version installed through a package manager. I will investigate further and report when I get it fixed.

@nortikin
Copy link
Author

nortikin commented May 7, 2018

Lol.
I never use packet manager.

Thank you.
I will use your addon from sverchok ASAP.

@ollpu
Copy link
Collaborator

ollpu commented May 23, 2018

The problem had to do with us using dlopen with RTLD_DEEPBIND, and that not playing well with the statically linked libstdc++ in Blender. It was originally needed with older versions of Blender that packaged SDL1 instead of SDL2, which would then break our use of SDL2.

I have disabled the flag, meaning that we will not support versions of blender before a certain point (yours is fine!). You can now pull from git and recompile and see if it works.

@nortikin
Copy link
Author

ok, will do it on weekend

@nortikin
Copy link
Author

nortikin commented Jun 2, 2018

https://vk.com/sverchok_b3d?w=wall-35076122_9652
remote control from sverchok to audionodes makes sound of icosphere and Suzanna
Check files.
audio ogg from my microphone.
audionodes_example

@nortikin nortikin closed this as completed Jun 2, 2018
@nortikin
Copy link
Author

nortikin commented Jun 2, 2018

hope there will be many sink outputs supported for many channels

@ollpu
Copy link
Collaborator

ollpu commented Jun 3, 2018

Interesting demo!

About multiple sinks ­— we could do stereo fairly easily, but having multiple sinks would be hard to implement timing-wise. Maybe there would be one "dominant" sink, through which timing is handled, and the rest are buffered. Or do you mean different node trees having different output streams?

@nortikin
Copy link
Author

nortikin commented Jun 9, 2018

better to have one tree with many outputs and also possibli separate some to trees.
Geneerally i do in sverchok, so it can be in different trees also... yes. it can be easily

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

2 participants