Segmentation fault when running BasicApp sample on Mac OS X


#1

Hi all,

I just compiled Cinder from the master branch in Debug mode on Mac OS X using the clang compiler, following the CMake instructions at https://libcinder.org/docs/branch/master/guides/cmake/cmake.html.

When I compile and run the BasicApp sample, I get a segmentation fault. The output from the lldb debugger is as follows:

dedmunds ~/postdoc/libraries/Cinder_build/Debug/BasicApp/BasicApp.app/Contents/MacOS $ lldb BasicApp
(lldb) target create "BasicApp"
Current executable set to ‘BasicApp’ (x86_64).
(lldb) run
Process 25083 launched: ‘/Users/dedmunds/postdoc/libraries/Cinder_build/Debug/BasicApp/BasicApp.app/Contents/MacOS/BasicApp’ (x86_64)
error: libcinder.a(Platform.cpp.o) failed to load objfile for /Users/dedmunds/postdoc/libraries/Cinder/lib/macosx/Debug/libcinder.a
error: libcinder.a(PlatformCocoa.cpp.o) failed to load objfile for /Users/dedmunds/postdoc/libraries/Cinder/lib/macosx/Debug/libcinder.a
Process 25083 stopped

  • thread #1: tid = 0x117176, 0x000000010000e0bb BasicAppboost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*) + 27, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x000000010000e0bb BasicAppboost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*) + 27
    BasicApp`boost::filesystem::detail::status:
    -> 0x10000e0bb <+27>: testb $0x1, (%r15)
    0x10000e0bf <+31>: jne 0x10000e0c7 ; <+39>
    0x10000e0c1 <+33>: leaq 0x1(%r15), %rdi
    0x10000e0c5 <+37>: jmp 0x10000e0cb ; <+43>

It looks like boost::filesystem::path is making a bad memory access. Is this a known issue?

Kind regards,

Dave


#2

Mostly likely you didn’t do a recursive clone that your boost submodule is not downloaded? It should reside in include/boost folder.


#3

Hi seph,

Thanks, you’re right, a full recursive clone fixed it!

Dave