knightcrawler25 / Optix-PathTracer

Simple physically based path tracer based on Nvidia's Optix Ray Tracing Engine
317 stars 36 forks source link

Segmentation fault at ilInit() #12

Open mahmoodn opened 4 years ago

mahmoodn commented 4 years ago

Couple of question: 1- Is it fine to load a render over ssh with X11 forwarding? 2- Should OpenGL driver be installed with the Nvidia driver?

Currently, I am sshing to a node with "ssh -Y". The segmentation fault I receive is at:

$ ./optixPathTracer -scene ../../src/data/bedroom.scene
material Boxes
material PlasticCable
material LampEmitter
material Blankets
material Bedsheets
material Window
material PictureBacking
material Picture
material Rocks1
material Rocks2
material Rocks3
material DecoPlant
material Painting1
material Painting2
material Painting3
material Carpet
material Matress
material WoodFloor
material Walls
material Walls2
material WoodFurniture
material Mirror
material Aluminium
material BookCover
material BookPages
material LampMetal
material Vase
material Glass
material PictureFrame
material CurtainRod
material Curtains
material StainlessSmooth
        material Curtains
        material Curtains
Segmentation fault (core dumped)

I built the Debug binary and with gdb, I see

material StainlessSmooth
        material Curtains
        material Curtains

Program received signal SIGSEGV, Segmentation fault.
0x000000000026737c in ?? ()
(gdb) bt
#0  0x000000000026737c in ?? ()
#1  0x0000555555588b3a in main (argc=3, argv=0x7fffffffe7a8)
    at /mnt/local/mnaderan/op/Optix-PathTracer/src/optixPathTracer/optixPathTracer.cpp:669

That line is here.

Is seems that IL (or DevIL) is needed here. I am not sure what may cause this error? DevIL, OpenGL, X11 forwarding, ...

Any feedback?

knightcrawler25 commented 4 years ago

DevIL is required as it is used to load textures. The library provided with the repo might have an issue on Linux. I changed the CMake file to not pick the library from this repo on Linux, as another person had a similar segfault issue as mentioned in this PR: #7 Could you try by installing the library (sudo apt install libdevil-dev)?

mahmoodn commented 4 years ago

I don't have root access. I have built it in this location

mn@fury0:/mnt/local/mn/op$ ls DevIL/DevIL_build/include/IL/
il.h  ilu.h  ilut.h
mn@fury0:/mnt/local/mn/op$ ls DevIL/DevIL_build/lib/
libIL.so  libIL.so.1  libILU.so  libILU.so.1  libILUT.so  libILUT.so.1  pkgconfig

Please let me know the env variable that I have to set.