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

glslViewer segfaults on 3.1.1 #323

Open
ghost opened this issue Jan 20, 2023 · 5 comments
Open

glslViewer segfaults on 3.1.1 #323

ghost opened this issue Jan 20, 2023 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 20, 2023

I am in progress of updating your software on void linux (with the purpose to also clean up the build template).

Everything went well except for runtime.

To reproduce this you have to abuse the "help" command on the line and get the garbled output with the core dumped in the end.

log.txt

Thank you!

@ghost
Copy link
Author

ghost commented Jan 20, 2023

I wonder if this behavior is also related to #322.

@patriciogonzalezvivo
Copy link
Owner

@kruceter, I think it is! I just push a small diff that solves it on my side, do you mind pulling both glslViewer repo and deps/vera submodule, recompile and try recreating the issue?
patriciogonzalezvivo/vera@8492e0f...cba5d9c#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL7

@ghost
Copy link
Author

ghost commented Feb 8, 2023

@patriciogonzalezvivo, thank you for the response!

Unfortunately, I cannot compile glslViewer to reproduce the issue.

[1/87] Building CXX object CMakeFiles/glslViewer.dir/src/sceneRender.cpp.o
FAILED: CMakeFiles/glslViewer.dir/src/sceneRender.cpp.o 
/usr/bin/g++ -DDRIVER_GLFW -DGLSLVIEWER_VERSION_MAJOR=3 -DGLSLVIEWER_VERSION_MINOR=1 -DGLSLVIEWER_VERSION_PATCH=1 -DGL_OPENGL -DPLATFORM_LINUX -DSUPPORT_MULTITHREAD_RECORDING -DSUPPORT_NCURSES -DSUPPORT_OSC -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/glslViewer -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/PRIVATE -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/glm -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/stb -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/glob -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/skymodel -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/fontstash -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/miniaudio -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/phonedepth -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/tinygltf -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/tinyobjloader -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/tinyply -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/include -I/builddir/glslViewer-3.1.1/glslViewer-3.1.1/deps/vera/deps/glfw/include -DNDEBUG -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2    -ffile-prefix-map=/builddir/glslViewer-3.1.1/glslViewer-3.1.1/build=. -std=c++11 -MD -MT CMakeFiles/glslViewer.dir/src/sceneRender.cpp.o -MF CMakeFiles/glslViewer.dir/src/sceneRender.cpp.o.d -o CMakeFiles/glslViewer.dir/src/sceneRender.cpp.o -c /builddir/glslViewer-3.1.1/glslViewer-3.1.1/src/sceneRender.cpp
/builddir/glslViewer-3.1.1/glslViewer-3.1.1/src/sceneRender.cpp: In lambda function:
/builddir/glslViewer-3.1.1/glslViewer-3.1.1/src/sceneRender.cpp:83:41: error: request for member 'name' in 'it.std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, vera::Material*> >::operator->()->std::pair<const std::__cxx11::basic_string<char>, vera::Material*>::second', which is of pointer type 'vera::Material*' (maybe you meant to use '->' ?)
   83 |                 std::cout << it->second.name << std::endl;
      |                                         ^~~~
/builddir/glslViewer-3.1.1/glslViewer-3.1.1/src/sceneRender.cpp:90:36: error: request for member 'name' in 'it.std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, vera::Material*> >::operator->()->std::pair<const std::__cxx11::basic_string<char>, vera::Material*>::second', which is of pointer type 'vera::Material*' (maybe you meant to use '->' ?)
   90 |                     if (it->second.name == values[1]) {
      |                                    ^~~~
/builddir/glslViewer-3.1.1/glslViewer-3.1.1/src/sceneRender.cpp:91:36: error: request for member 'printDefines' in 'it.std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, vera::Material*> >::operator->()->std::pair<const std::__cxx11::basic_string<char>, vera::Material*>::second', which is of pointer type 'vera::Material*' (maybe you meant to use '->' ?)
   91 |                         it->second.printDefines();
      |                                    ^~~~~~~~~~~~
[2/87] Building CXX object CMakeFiles/glslViewer.dir/src/tools/console.cpp.o
[3/87] Building CXX object CMakeFiles/glslViewer.dir/src/main.cpp.o
[4/87] Building CXX object CMakeFiles/glslViewer.dir/src/sandbox.cpp.o
ninja: build stopped: subcommand failed.
�[1m�[31m=> ERROR: glslViewer-3.1.1_1: do_build: '${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}' exited with 1
�[m�[1m�[31m=> ERROR:   in do_build() at common/build-style/cmake.sh:94
�[m

EDIT: false alarm, I could manage to compile it.

@ghost
Copy link
Author

ghost commented Feb 9, 2023

The issue is still present. I do not think vera is to blame here.

gdb points at ncurses, so maybe something has to be done about it. Not sure myself.

backtrace.txt

@patriciogonzalezvivo
Copy link
Owner

Mmmm... weird. This fixed #322 present on MacOS, and in by Linux laptop (Ubuntu). I will keep digging

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

No branches or pull requests

1 participant