question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segmentation fault when calling `bin/PreprocessMesh`

See original GitHub issue

Hi,

after following the build instructions of https://github.com/facebookresearch/DeepSDF/issues/81#issuecomment-953495747 I get a segmentation fault when I try to run

bin/PreprocessMesh -m in.obj -o out.npz

Is this a known issue? Are there any current workarounds?

Thanks

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
danielegrattarolacommented, Apr 6, 2022

Here’s what I did to build the program and all dependencies. You need to be root for some of these commands to work. Also, this will not work if you’re running the program in a remote SSH session, you need to have a screen (I tried some workarounds but I couldn’t get it to work).

Anyway, I suggest you not spend too much time trying to make this code work. There’s a much better python library called mesh-to-sdf (https://pypi.org/project/mesh-to-sdf/) that does the same thing without any of the hassle. Just pip install mesh-to-sdf and you’re good to go. Still won’t work in a remote session unfortunately, but it’s also way faster than the code in this repo.

Here’s the full list of commands (disclaimer: don’t just copy-paste the whole thing, make sure that every command executes successfully):

apt install git cmake build-essential libglfw3-dev libgles2-mesa-dev libgtest-dev libeigen3-dev

# Install CLI11
git clone https://github.com/CLIUtils/CLI11.git
cd CLI11
mkdir build
cd build
git submodule update --init
cmake ..
cmake --build .
sudo cmake --install .
cd ../..

# Install Pangolin
git clone --recursive https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
./scripts/install_prerequisites.sh all
git checkout v0.6
mkdir build && cd build
cmake ..
cmake --build .
sudo cmake --install .
cd ../..

# Install nanoflann
git clone https://github.com/jlblancoc/nanoflann.git
cd nanoflann
mkdir build && cd build
cmake ..
make
sudo make install
mkdir /usr/local/include/nanoflann
cp /usr/local/include/nanoflann.hpp /usr/local/include/nanoflann
cd ../..

# DeepSDF
git clone https://github.com/facebookresearch/DeepSDF.git
cd DeepSDF

###### Comment out line 97 of src/ShaderProgram.cpp
sed -i "97 s/^/\/\//" src/ShaderProgram.cpp

git submodule update --init
mkdir build && cd build
cmake .. -DCMAKE_CXX_STANDARD=17
make


# Run
export MESA_GL_VERSION_OVERRIDE=3.3
export PANGOLIN_WINDOW_URI=headless://
0reactions
ChengChen2020commented, Apr 6, 2022

Thank you very much for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Segmentation Fault when calling member of a struct
The seg fault happens when I try to print the member name of the struct stacklist[NumberOfStacks] points to. What am I doing wrong...
Read more >
Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >
Segmentation fault when calling C function with special ...
when calling a C function with a special shape in Julia, it crashes. signal (11): Segmentation fault while loading /home/lizz/dev/dump/test.jl, ...
Read more >
Common Causes of Segmentation Faults (Segfaults)
A segmentation fault (often called a segfault) can occur if a program you are running attempts to access an invalid memory location.
Read more >
Segmentation fault - Wikipedia
In computing, a segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found