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

Sample application seg faults on macOS #129

Closed
jeffs opened this issue May 23, 2018 · 20 comments
Closed

Sample application seg faults on macOS #129

jeffs opened this issue May 23, 2018 · 20 comments

Comments

@jeffs
Copy link

jeffs commented May 23, 2018

The first sample application at https://www.bsframework.io/docs/build.html seg faults in Application::startUp. This occurs on both master (58a47c8) and release-v1.0.0 (40e0d08). I'm using the exact CMake and source code from the example. The fault occurs with prebuilt binaries as well as with a manually built bsf. No CrashReports are created. I'm running macOS High Sierra, and installed ossp-uuid using HomeBrew.

$ cat Main.cpp
#include "BsApplication.h"

int main()
{
    using namespace bs;
    VideoMode videoMode(1280, 720);
    Application::startUp(videoMode, "Example", false);
    Application::instance().runMainLoop();
    Application::shutDown();

    return 0;
}

$ cat CMakeLists.txt
# Minimum version of CMake as required by bsf
cmake_minimum_required (VERSION 3.9.0)

# Name of your project
project (myProject)

# Make sure to use the C++14 standard
set(CMAKE_CXX_STANDARD 14)

# Build an executable from the provided C++ files
add_executable(myApp "Main.cpp")

# Path to where you have installed bsf
set(bsf_INSTALL_DIR "/Users/jeff/opt/bsf")

# Let CMake know where to find the Findbsf.cmake file (at current folder)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")

# Find bsf libraries and headers
find_package(bsf REQUIRED)

# Link bsf library with your application
target_link_libraries(myApp PRIVATE bsf)

$ mkdir build

$ cd build

$ cmake .. -G Ninja
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for bsf installation...
-- ...bsf OK.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jeff/var/src/cpp/build

$ ninja
[2/2] Linking CXX executable myApp

$ ./myApp
Segmentation fault: 11
@BearishSun
Copy link
Member

Hi, thanks for the report. I cannot reproduce the problem on my machine.

First things first, did you copy the data files next to the binary? (You probably did, otherwise you'd get a lot of warnings, but just want to make sure).

If that's not the issue, could you try compiling the framework in debug mode and running it under debugger? Following the guide for linking with source and generating an XCode project is probably the easiest way to do it. I'd like to get a call-stack of the crash.

I'm still exploring why no crash log is generated.

@jeffs
Copy link
Author

jeffs commented May 23, 2018

Thanks for the quick response, and for not laughing me out of the room since this seems like something that should be obvious. Yes, the Data files are in place; sorry for missing that in the original post. For the record though, even without the files I do not see any warnings; see the run below, which was done against the release binaries. I'll try a Link with Source build as soon as possible, and update this ticket with any interesting results.

src $ ls
CMakeLists.txt Findbsf.cmake  main.cpp

src $ cmake -H. -Bbuild -G Xcode
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for bsf installation...
-- ...bsf OK.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jeff/var/src/cpp/src/build

src $ cmake --build build
=== BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT myProject WITH CONFIGURATION Debug ===

Check dependencies

Write auxiliary files
write-file /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/ZERO_CHECK.build/Script-DFF7DB901BBA4D5C8C2B5C00.sh
chmod 0755 /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/ZERO_CHECK.build/Script-DFF7DB901BBA4D5C8C2B5C00.sh

PhaseScriptExecution CMake\ Rules build/myProject.build/Debug/ZERO_CHECK.build/Script-DFF7DB901BBA4D5C8C2B5C00.sh
    cd /Users/jeff/var/src/cpp/src
    /bin/sh -c /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/ZERO_CHECK.build/Script-DFF7DB901BBA4D5C8C2B5C00.sh
echo ""

make -f /Users/jeff/var/src/cpp/src/build/CMakeScripts/ReRunCMake.make
make[1]: `/Users/jeff/var/src/cpp/src/build/CMakeFiles/cmake.check_cache' is up to date.

=== BUILD TARGET myApp OF PROJECT myProject WITH CONFIGURATION Debug ===

Check dependencies

Write auxiliary files
/bin/mkdir -p /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64
write-file /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/myApp.LinkFileList

CompileC build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/main.o main.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/jeff/var/src/cpp/src
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=160 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DCMAKE_INTDIR=\"Debug\" -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.13 -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -I/Users/jeff/var/src/cpp/src/build/Debug/include -isystem /Users/jeff/opt/bsf_v1.0.0b_osx/include/bsfUtility -isystem /Users/jeff/opt/bsf_v1.0.0b_osx/include/bsfCore -isystem /Users/jeff/opt/bsf_v1.0.0b_osx/include/bsfEngine -I/Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/DerivedSources/x86_64 -I/Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/jeff/var/src/cpp/src/build/Debug -std=gnu++14 -MMD -MT dependencies -MF /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/main.d --serialize-diagnostics /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/main.dia -c /Users/jeff/var/src/cpp/src/main.cpp -o /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/main.o

Ld build/Debug/myApp normal x86_64
    cd /Users/jeff/var/src/cpp/src
    export MACOSX_DEPLOYMENT_TARGET=10.13
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/jeff/var/src/cpp/src/build/Debug -F/Users/jeff/var/src/cpp/src/build/Debug -filelist /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/myApp.LinkFileList -Xlinker -rpath -Xlinker /Users/jeff/opt/bsf_v1.0.0b_osx/lib -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/myApp_lto.o -Xlinker -no_deduplicate -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/jeff/opt/bsf_v1.0.0b_osx/lib/libbsf.dylib -Xlinker -dependency_info -Xlinker /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/myApp.build/Objects-normal/x86_64/myApp_dependency_info.dat -o /Users/jeff/var/src/cpp/src/build/Debug/myApp

=== BUILD AGGREGATE TARGET ALL_BUILD OF PROJECT myProject WITH CONFIGURATION Debug ===

Check dependencies

Write auxiliary files
write-file /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/ALL_BUILD.build/Script-A4B3DB79AFD4443E807BC0B8.sh
chmod 0755 /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/ALL_BUILD.build/Script-A4B3DB79AFD4443E807BC0B8.sh

PhaseScriptExecution CMake\ Rules build/myProject.build/Debug/ALL_BUILD.build/Script-A4B3DB79AFD4443E807BC0B8.sh
    cd /Users/jeff/var/src/cpp/src
    /bin/sh -c /Users/jeff/var/src/cpp/src/build/myProject.build/Debug/ALL_BUILD.build/Script-A4B3DB79AFD4443E807BC0B8.sh
echo ""

echo Build\ all\ projects
Build all projects

** BUILD SUCCEEDED **


src $ cp -r ~/opt/bsf_v1.0.0b_osx/bin/Data build/Debug

src $ ls build/Debug build/Debug/Data
build/Debug:
Data  myApp

build/Debug/Data:
Cursors                     Meshes                      Skin                        Timestamp.asset
GUISkin.asset               ShaderDependencies.json     SplashScreen.png.asset      arial.ttf.asset
Icons                       Shaders                     Textures                    arial.ttf_8_texpage_0.asset

src $ ./build/Debug/myApp
Segmentation fault: 11

src $ rm -rf build/Debug/Data

src $ ./build/Debug/myApp
Segmentation fault: 11

src $

@jeffs
Copy link
Author

jeffs commented May 23, 2018

Quick and dirty trace using manually built debug binaries:

src $ PATH=/usr/bin /usr/bin/lldb ./build/Debug/myApp
(lldb) target create "./build/Debug/myApp"
Current executable set to './build/Debug/myApp' (x86_64).
(lldb) run
Process 54694 launched: './build/Debug/myApp' (x86_64)
Process 54694 stopped
* thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00007fff5230c232 libsystem_c.dylib`strlen + 18
libsystem_c.dylib`strlen:
->  0x7fff5230c232 <+18>: pcmpeqb (%rdi), %xmm0
    0x7fff5230c236 <+22>: pmovmskb %xmm0, %esi
    0x7fff5230c23a <+26>: andq   $0xf, %rcx
    0x7fff5230c23e <+30>: orq    $-0x1, %rax
Target 0: (myApp) stopped.
(lldb)

@BearishSun
Copy link
Member

Thanks. Could you do thread backtrace or even thread backtrace all after the program has stopped? Should hopefully give us a more complete stack trace.

@jeffs
Copy link
Author

jeffs commented May 23, 2018

src $ PATH=/usr/bin /usr/bin/lldb ./build/Debug/myApp
(lldb) target create "./build/Debug/myApp"
Current executable set to './build/Debug/myApp' (x86_64).
(lldb) run
Process 55191 launched: './build/Debug/myApp' (x86_64)
Process 55191 stopped
* thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00007fff5230c232 libsystem_c.dylib`strlen + 18
libsystem_c.dylib`strlen:
->  0x7fff5230c232 <+18>: pcmpeqb (%rdi), %xmm0
    0x7fff5230c236 <+22>: pmovmskb %xmm0, %esi
    0x7fff5230c23a <+26>: andq   $0xf, %rcx
    0x7fff5230c23e <+30>: orq    $-0x1, %rax
Target 0: (myApp) stopped.
(lldb) thread backtrace all
  thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff5240ca1e libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff525d5589 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x00007fff5021dcb0 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001004a7565 libbsf.dylib`bs::CoreThread::blockUntilCommandCompleted(this=0x0000000103612490, commandId=0) at BsCoreThread.cpp:285
    frame #4: 0x00000001004a79a6 libbsf.dylib`bs::CoreThread::queueCommand(this=0x0000000103612490, commandCallback=0x00007ffeefbfee90, flags=(mBits = 3))>, bs::Flags<bs::CoreThreadQueueFlag, unsigned int>) at BsCoreThread.cpp:245
    frame #5: 0x0000000100b773fa libbsf.dylib`bs::ct::RenderAPI::initialize(this=0x0000000103546fb0, primaryWindowDesc=0x0000000103529178) at BsRenderAPI.cpp:164
    frame #6: 0x0000000100641b18 libbsf.dylib`bs::RenderAPIManager::initialize(this=0x000000010360f060, pluginFilename=0x00000001035290f8, primaryWindowDesc=0x0000000103529178) at BsRenderAPIManager.cpp:46
    frame #7: 0x0000000100253ddc libbsf.dylib`bs::CoreApplication::onStartUp(this=0x00000001035290e0) at BsCoreApplication.cpp:157
    frame #8: 0x000000010107c6e2 libbsf.dylib`bs::Application::onStartUp(this=0x00000001035290e0) at BsApplication.cpp:51
    frame #9: 0x0000000100004131 myApp`void bs::Module<bs::CoreApplication>::startUp<bs::Application, bs::START_UP_DESC&>(args=0x00007ffeefbff5d8) at BsModule.h:92
    frame #10: 0x000000010000262d myApp`void bs::Application::startUp<bs::Application>(videoMode=(mWidth = 1280, mHeight = 720, mRefreshRate = 60, mOutputIdx = 0, mIsCustom = true), title=0x00007ffeefbff758, fullscreen=false) at BsApplication.h:33
    frame #11: 0x00000001000024de myApp`main at main.cpp:7
    frame #12: 0x00007fff522bc015 libdyld.dylib`start + 1
    frame #13: 0x00007fff522bc015 libdyld.dylib`start + 1
  thread #2
    frame #0: 0x00007fff5240d292 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff525d4009 libsystem_pthread.dylib`_pthread_wqthread + 1035
    frame #2: 0x00007fff525d3be9 libsystem_pthread.dylib`start_wqthread + 13
  thread #3
    frame #0: 0x00007fff5240d292 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff525d4009 libsystem_pthread.dylib`_pthread_wqthread + 1035
    frame #2: 0x00007fff525d3be9 libsystem_pthread.dylib`start_wqthread + 13
  thread #4
    frame #0: 0x00007fff5240d292 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff525d4009 libsystem_pthread.dylib`_pthread_wqthread + 1035
    frame #2: 0x00007fff525d3be9 libsystem_pthread.dylib`start_wqthread + 13
  thread #5
    frame #0: 0x00007fff5240ca1e libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff525d5589 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x00007fff5021dcb0 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001015c6927 libbsf.dylib`bs::TaskScheduler::runMain(this=0x0000000103612980) at BsTaskScheduler.cpp:120
    frame #4: 0x00000001015ccdc1 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&>(std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&&&) [inlined] decltype(__f=0x0000700006008c88, __a0=0x0000700006008c98)).*fp(std::__1::forward<>(fp1))) std::__1::__invoke<void (bs::TaskScheduler::*&)(), bs::TaskScheduler*&, void>(void (bs::TaskScheduler::*&&&)(), bs::TaskScheduler*&&&) at type_traits:4264
    frame #5: 0x00000001015ccd42 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&>(std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&&&) [inlined] std::__1::__bind_return<void (bs::TaskScheduler::*)(), std::__1::tuple<bs::TaskScheduler*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::TaskScheduler::*)(), std::__1::tuple<bs::TaskScheduler*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x0000700006008c88, __bound_args=0x0000700006008c98, __args=0x0000700006008a50)(), std::__1::tuple<bs::TaskScheduler*>, 0ul, std::__1::tuple<> >(void (bs::TaskScheduler::*&)(), std::__1::tuple<bs::TaskScheduler*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2224
    frame #6: 0x00000001015ccd12 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&>(std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&&&) [inlined] std::__1::__bind_return<void (bs::TaskScheduler::*)(), std::__1::tuple<bs::TaskScheduler*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::TaskScheduler::*)(), std::__1::tuple<bs::TaskScheduler*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x0000700006008c88)(), bs::TaskScheduler*>::operator()<>() at functional:2257
    frame #7: 0x00000001015cccef libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&>(std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&&&) [inlined] decltype(__f=0x0000700006008c88)(), bs::TaskScheduler*>&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&>(std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&&&) at type_traits:4323
    frame #8: 0x00000001015cccdb libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (__args=0x0000700006008c88)(), bs::TaskScheduler*>&>(std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>&&&) at __functional_base:349
    frame #9: 0x00000001015ccc89 libbsf.dylib`std::__1::__function::__func<std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*>, std::__1::allocator<std::__1::__bind<void (bs::TaskScheduler::*)(), bs::TaskScheduler*> >, void ()>::operator(this=0x0000700006008c80)() at functional:1562
    frame #10: 0x0000000100273e35 libbsf.dylib`std::__1::function<void ()>::operator(this=0x0000700006008c80)() const at functional:1921
    frame #11: 0x00000001015d1475 libbsf.dylib`bs::PooledThread::run(this=0x0000000103612b00) at BsThreadPool.cpp:119
    frame #12: 0x00000001015d6034 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] decltype(__f=0x000000010360dd98, __a0=0x000000010360dda8)).*fp(std::__1::forward<>(fp1))) std::__1::__invoke<void (bs::PooledThread::*&)(), bs::PooledThread*&, void>(void (bs::PooledThread::*&&&)(), bs::PooledThread*&&&) at type_traits:4264
    frame #13: 0x00000001015d5fb5 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] std::__1::__bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x000000010360dd98, __bound_args=0x000000010360dda8, __args=0x0000700006008e30)(), std::__1::tuple<bs::PooledThread*>, 0ul, std::__1::tuple<> >(void (bs::PooledThread::*&)(), std::__1::tuple<bs::PooledThread*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2224
    frame #14: 0x00000001015d5f76 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] std::__1::__bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x000000010360dd98)(), bs::PooledThread*>::operator()<>() at functional:2257
    frame #15: 0x00000001015d5f3e libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] decltype(__f=0x000000010360dd98)(), bs::PooledThread*> >(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> >(std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*>&&) at type_traits:4323
    frame #16: 0x00000001015d5f1b libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> >(__t=0x000000010360dd90)(), bs::PooledThread*> >&, std::__1::__tuple_indices<>) at thread:342
    frame #17: 0x00000001015d5ee5 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(__vp=0x000000010360dd90) at thread:352
    frame #18: 0x00007fff525d4661 libsystem_pthread.dylib`_pthread_body + 340
    frame #19: 0x00007fff525d450d libsystem_pthread.dylib`_pthread_start + 377
    frame #20: 0x00007fff525d3bf9 libsystem_pthread.dylib`thread_start + 13
* thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fff5230c232 libsystem_c.dylib`strlen + 18
    frame #1: 0x0000000100003a15 myApp`std::__1::char_traits<char>::length(__s=0x0000000000000000) at __string:217
    frame #2: 0x0000000100628c5c libbsf.dylib`std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> >::assign(this=0x000000010352ed08, __s=0x0000000000000000) at string:2165
    frame #3: 0x000000010ac8f352 libbsfGLRenderAPI.dylib`bs::ct::MacOSVideoOutputInfo::MacOSVideoOutputInfo(unsigned int, unsigned int) [inlined] std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> >::operator=(this=0x000000010352ed08, __s=0x0000000000000000) at string:832
    frame #4: 0x000000010ac8f346 libbsfGLRenderAPI.dylib`bs::ct::MacOSVideoOutputInfo::MacOSVideoOutputInfo(this=0x000000010352ed00, displayID=2077752445, outputIdx=0) at BsMacOSVideoModeInfo.cpp:57
    frame #5: 0x000000010ac8f811 libbsfGLRenderAPI.dylib`bs::ct::MacOSVideoOutputInfo::MacOSVideoOutputInfo(this=0x000000010352ed00, displayID=2077752445, outputIdx=0) at BsMacOSVideoModeInfo.cpp:40
    frame #6: 0x000000010ac8e49d libbsfGLRenderAPI.dylib`bs::ct::MacOSVideoOutputInfo* bs::bs_new<bs::ct::MacOSVideoOutputInfo, unsigned int&, unsigned int&>(args=0x000000010aabb024, args=0x000070000608a9f4) at BsMemoryAllocator.h:338
    frame #7: 0x000000010ac8e094 libbsfGLRenderAPI.dylib`bs::ct::MacOSVideoModeInfo::MacOSVideoModeInfo(this=0x000000010352e6f8) at BsMacOSVideoModeInfo.cpp:27
    frame #8: 0x000000010ac8f1c5 libbsfGLRenderAPI.dylib`bs::ct::MacOSVideoModeInfo::MacOSVideoModeInfo(this=0x000000010352e6f8) at BsMacOSVideoModeInfo.cpp:9
    frame #9: 0x000000010ac7d42a libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo>::allocate_shared<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> const&) [inlined] std::__1::__compressed_pair_elem<bs::ct::MacOSVideoModeInfo, 1, false>::__compressed_pair_elem(this=0x000000010352e6f8) at memory:2043
    frame #10: 0x000000010ac7d425 libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo>::allocate_shared<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> const&) [inlined] std::__1::__compressed_pair<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc>, bs::ct::MacOSVideoModeInfo>::__compressed_pair<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc>, true>(this=0x000000010352e6f8, __t=0x000070000608ae10) at memory:2141
    frame #11: 0x000000010ac7d3fe libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo>::allocate_shared<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> const&) [inlined] std::__1::__compressed_pair<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc>, bs::ct::MacOSVideoModeInfo>::__compressed_pair<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc>, true>(this=0x000000010352e6f8, __t=0x000070000608ae10) at memory:2141
    frame #12: 0x000000010ac7d3ee libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo>::allocate_shared<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> const&) [inlined] std::__1::__shared_ptr_emplace<bs::ct::MacOSVideoModeInfo, bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >::__shared_ptr_emplace(this=0x000000010352e6e0, __a=StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> @ 0x000070000608ae10) at memory:3567
    frame #13: 0x000000010ac7d38e libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo>::allocate_shared<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> const&) [inlined] std::__1::__shared_ptr_emplace<bs::ct::MacOSVideoModeInfo, bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >::__shared_ptr_emplace(this=0x000000010352e6e0) at memory:3567
    frame #14: 0x000000010ac7d38e libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo>::allocate_shared<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(__a=0x000070000608aec0) at memory:4249
    frame #15: 0x000000010ac7bdb0 libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> bs::bs_shared_ptr_new<bs::ct::MacOSVideoModeInfo, bs::GenAlloc>() [inlined] std::__1::enable_if<!(is_array<bs::ct::MacOSVideoModeInfo>::value), std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> >::type std::__1::allocate_shared<bs::ct::MacOSVideoModeInfo, bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(__a=0x000070000608aec0) at memory:4612
    frame #16: 0x000000010ac7bda3 libbsfGLRenderAPI.dylib`std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> bs::bs_shared_ptr_new<bs::ct::MacOSVideoModeInfo, bs::GenAlloc>() at BsStdHeaders.h:185
    frame #17: 0x000000010ac7bd03 libbsfGLRenderAPI.dylib`bs::ct::MacOSGLSupport::getVideoModeInfo(this=0x000000010352e9f0) const at BsMacOSGLSupport.cpp:60
    frame #18: 0x000000010abea8ca libbsfGLRenderAPI.dylib`bs::ct::GLRenderAPI::initialize(this=0x0000000103546fb0) at BsGLRenderAPI.cpp:133
    frame #19: 0x0000000100b96481 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&>(std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&&&) [inlined] decltype(__f=0x000000010403a618, __a0=0x000000010403a628)).*fp(std::__1::forward<>(fp1))) std::__1::__invoke<void (bs::ct::RenderAPI::*&)(), bs::ct::RenderAPI*&, void>(void (bs::ct::RenderAPI::*&&&)(), bs::ct::RenderAPI*&&&) at type_traits:4264
    frame #20: 0x0000000100b96402 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&>(std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&&&) [inlined] std::__1::__bind_return<void (bs::ct::RenderAPI::*)(), std::__1::tuple<bs::ct::RenderAPI*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::ct::RenderAPI::*)(), std::__1::tuple<bs::ct::RenderAPI*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x000000010403a618, __bound_args=0x000000010403a628, __args=0x000070000608b090)(), std::__1::tuple<bs::ct::RenderAPI*>, 0ul, std::__1::tuple<> >(void (bs::ct::RenderAPI::*&)(), std::__1::tuple<bs::ct::RenderAPI*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2224
    frame #21: 0x0000000100b963d2 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&>(std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&&&) [inlined] std::__1::__bind_return<void (bs::ct::RenderAPI::*)(), std::__1::tuple<bs::ct::RenderAPI*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::ct::RenderAPI::*)(), std::__1::tuple<bs::ct::RenderAPI*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x000000010403a618)(), bs::ct::RenderAPI*>::operator()<>() at functional:2257
    frame #22: 0x0000000100b963af libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&>(std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&&&) [inlined] decltype(__f=0x000000010403a618)(), bs::ct::RenderAPI*>&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&>(std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&&&) at type_traits:4323
    frame #23: 0x0000000100b9639b libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (__args=0x000000010403a618)(), bs::ct::RenderAPI*>&>(std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&&&) at __functional_base:349
    frame #24: 0x0000000100b96349 libbsf.dylib`std::__1::__function::__func<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>, std::__1::allocator<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*> >, void ()>::operator(this=0x000000010403a610)() at functional:1562
    frame #25: 0x0000000100273e35 libbsf.dylib`std::__1::function<void ()>::operator(this=0x000000010403a610)() const at functional:1921
    frame #26: 0x000000010046a757 libbsf.dylib`bs::CommandQueueBase::playbackWithNotify(this=0x000000010360cde0, commands=0x0000000103607b80, notifyCallback=0x000070000608b9c0)>) at BsCommandQueue.cpp:124
    frame #27: 0x00000001004a5023 libbsf.dylib`bs::CoreThread::runCoreThread(this=0x0000000103612490) at BsCoreThread.cpp:117
    frame #28: 0x00000001004a9cf1 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&>(std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&&&) [inlined] decltype(__f=0x000070000608bc88, __a0=0x000070000608bc98)).*fp(std::__1::forward<>(fp1))) std::__1::__invoke<void (bs::CoreThread::*&)(), bs::CoreThread*&, void>(void (bs::CoreThread::*&&&)(), bs::CoreThread*&&&) at type_traits:4264
    frame #29: 0x00000001004a9c72 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&>(std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&&&) [inlined] std::__1::__bind_return<void (bs::CoreThread::*)(), std::__1::tuple<bs::CoreThread*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::CoreThread::*)(), std::__1::tuple<bs::CoreThread*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x000070000608bc88, __bound_args=0x000070000608bc98, __args=0x000070000608ba50)(), std::__1::tuple<bs::CoreThread*>, 0ul, std::__1::tuple<> >(void (bs::CoreThread::*&)(), std::__1::tuple<bs::CoreThread*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2224
    frame #30: 0x00000001004a9c42 libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&>(std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&&&) [inlined] std::__1::__bind_return<void (bs::CoreThread::*)(), std::__1::tuple<bs::CoreThread*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::CoreThread::*)(), std::__1::tuple<bs::CoreThread*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x000070000608bc88)(), bs::CoreThread*>::operator()<>() at functional:2257
    frame #31: 0x00000001004a9c1f libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&>(std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&&&) [inlined] decltype(__f=0x000070000608bc88)(), bs::CoreThread*>&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&>(std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&&&) at type_traits:4323
    frame #32: 0x00000001004a9c0b libbsf.dylib`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (__args=0x000070000608bc88)(), bs::CoreThread*>&>(std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&&&) at __functional_base:349
    frame #33: 0x00000001004a9bb9 libbsf.dylib`std::__1::__function::__func<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>, std::__1::allocator<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*> >, void ()>::operator(this=0x000070000608bc80)() at functional:1562
    frame #34: 0x0000000100273e35 libbsf.dylib`std::__1::function<void ()>::operator(this=0x000070000608bc80)() const at functional:1921
    frame #35: 0x00000001015d1475 libbsf.dylib`bs::PooledThread::run(this=0x00000001036126b0) at BsThreadPool.cpp:119
    frame #36: 0x00000001015d6034 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] decltype(__f=0x000000010360a5d8, __a0=0x000000010360a5e8)).*fp(std::__1::forward<>(fp1))) std::__1::__invoke<void (bs::PooledThread::*&)(), bs::PooledThread*&, void>(void (bs::PooledThread::*&&&)(), bs::PooledThread*&&&) at type_traits:4264
    frame #37: 0x00000001015d5fb5 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] std::__1::__bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x000000010360a5d8, __bound_args=0x000000010360a5e8, __args=0x000070000608be30)(), std::__1::tuple<bs::PooledThread*>, 0ul, std::__1::tuple<> >(void (bs::PooledThread::*&)(), std::__1::tuple<bs::PooledThread*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at functional:2224
    frame #38: 0x00000001015d5f76 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] std::__1::__bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<>, __is_valid_bind_return<void (bs::PooledThread::*)(), std::__1::tuple<bs::PooledThread*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x000000010360a5d8)(), bs::PooledThread*>::operator()<>() at functional:2257
    frame #39: 0x00000001015d5f3e libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] decltype(__f=0x000000010360a5d8)(), bs::PooledThread*> >(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> >(std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*>&&) at type_traits:4323
    frame #40: 0x00000001015d5f1b libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> >(__t=0x000000010360a5d0)(), bs::PooledThread*> >&, std::__1::__tuple_indices<>) at thread:342
    frame #41: 0x00000001015d5ee5 libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(__vp=0x000000010360a5d0) at thread:352
    frame #42: 0x00007fff525d4661 libsystem_pthread.dylib`_pthread_body + 340
    frame #43: 0x00007fff525d450d libsystem_pthread.dylib`_pthread_start + 377
    frame #44: 0x00007fff525d3bf9 libsystem_pthread.dylib`thread_start + 13
(lldb)

@BearishSun
Copy link
Member

Nice, thanks helping track it down. Seems to crash when enumerating your displays, failing to retrieve a name of a display. Might be due to OS differences (I'm still on Sierra), or just different monitors. I'll let you know when I have a fix - hopefully tomorrow.

@jeffs
Copy link
Author

jeffs commented May 23, 2018

Nice, thanks! If I have a moment, I'll take a deeper look as well.

@BearishSun
Copy link
Member

I submitted a couple of fixes on master. One to resolve the problem with the crash information not printing when a segmentation fault happens. The other should resolve your particular problem.

When you get a chance please verify this resolves the problem, since I cannot reproduce it myself.

@jeffs
Copy link
Author

jeffs commented May 24, 2018

Thanks Marko, but I'm not seeing any difference. I'm up for a screen share if that seems helpful.

@BearishSun
Copy link
Member

Could you post the stack trace with the updated version. I'm guessing its crashing at some different location right now.

@jeffs
Copy link
Author

jeffs commented May 24, 2018

src $ PATH=/usr/bin /usr/bin/lldb ./build/Debug/myApp
(lldb) target create "./build/Debug/myApp"
Current executable set to './build/Debug/myApp' (x86_64).
(lldb) run
Process 83893 launched: './build/Debug/myApp' (x86_64)
Process 83893 stopped
* thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00007fff5230c232 libsystem_c.dylib`strlen + 18
libsystem_c.dylib`strlen:
->  0x7fff5230c232 <+18>: pcmpeqb (%rdi), %xmm0
    0x7fff5230c236 <+22>: pmovmskb %xmm0, %esi
    0x7fff5230c23a <+26>: andq   $0xf, %rcx
    0x7fff5230c23e <+30>: orq    $-0x1, %rax
Target 0: (myApp) stopped.
(lldb) thread backtrace all
  thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff5240ca1e libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff525d5589 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x00007fff5021dcb0 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001001c88ab libbsf.dylib`___lldb_unnamed_symbol1935$$libbsf.dylib + 635
    frame #4: 0x000000010045e804 libbsf.dylib`___lldb_unnamed_symbol9430$$libbsf.dylib + 116
    frame #5: 0x000000010054a883 libbsf.dylib`___lldb_unnamed_symbol12387$$libbsf.dylib + 483
    frame #6: 0x0000000100481e14 libbsf.dylib`___lldb_unnamed_symbol9906$$libbsf.dylib + 244
    frame #7: 0x0000000100680c13 libbsf.dylib`___lldb_unnamed_symbol15671$$libbsf.dylib + 19
    frame #8: 0x000000010000412c myApp`void bs::Module<bs::CoreApplication>::startUp<bs::Application, bs::START_UP_DESC&>(args=0x00007ffeefbff5a8) at BsModule.h:92
    frame #9: 0x000000010000264d myApp`void bs::Application::startUp<bs::Application>(videoMode=(mWidth = 1280, mHeight = 720, mRefreshRate = 60, mOutputIdx = 0, mIsCustom = true), title=0x00007ffeefbff728, fullscreen=false) at BsApplication.h:33
    frame #10: 0x00000001000024fe myApp`main at main.cpp:7
    frame #11: 0x00007fff522bc015 libdyld.dylib`start + 1
    frame #12: 0x00007fff522bc015 libdyld.dylib`start + 1
  thread #2
    frame #0: 0x00007fff5240d292 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff525d4009 libsystem_pthread.dylib`_pthread_wqthread + 1035
    frame #2: 0x00007fff525d3be9 libsystem_pthread.dylib`start_wqthread + 13
  thread #3
    frame #0: 0x00007fff5240d292 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff525d4009 libsystem_pthread.dylib`_pthread_wqthread + 1035
    frame #2: 0x00007fff525d3be9 libsystem_pthread.dylib`start_wqthread + 13
  thread #4
    frame #0: 0x00007fff5240d292 libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff525d4009 libsystem_pthread.dylib`_pthread_wqthread + 1035
    frame #2: 0x00007fff525d3be9 libsystem_pthread.dylib`start_wqthread + 13
  thread #5
    frame #0: 0x00007fff5240ca1e libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff525d5589 libsystem_pthread.dylib`_pthread_cond_wait + 732
    frame #2: 0x00007fff5021dcb0 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001001488cb libbsf.dylib`___lldb_unnamed_symbol586$$libbsf.dylib + 219
    frame #4: 0x0000000100149f2d libbsf.dylib`___lldb_unnamed_symbol624$$libbsf.dylib + 349
    frame #5: 0x000000010014b54b libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) + 59
    frame #6: 0x00007fff525d4661 libsystem_pthread.dylib`_pthread_body + 340
    frame #7: 0x00007fff525d450d libsystem_pthread.dylib`_pthread_start + 377
    frame #8: 0x00007fff525d3bf9 libsystem_pthread.dylib`thread_start + 13
* thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fff5230c232 libsystem_c.dylib`strlen + 18
    frame #1: 0x0000000107b53d08 libbsfGLRenderAPI.dylib`___lldb_unnamed_symbol758$$libbsfGLRenderAPI.dylib + 264
    frame #2: 0x0000000107b53b59 libbsfGLRenderAPI.dylib`___lldb_unnamed_symbol756$$libbsfGLRenderAPI.dylib + 233
    frame #3: 0x0000000107b4d753 libbsfGLRenderAPI.dylib`___lldb_unnamed_symbol694$$libbsfGLRenderAPI.dylib + 83
    frame #4: 0x0000000107b3adfc libbsfGLRenderAPI.dylib`___lldb_unnamed_symbol427$$libbsfGLRenderAPI.dylib + 44
    frame #5: 0x00000001001bed94 libbsf.dylib`___lldb_unnamed_symbol1797$$libbsf.dylib + 724
    frame #6: 0x00000001001c759b libbsf.dylib`___lldb_unnamed_symbol1924$$libbsf.dylib + 379
    frame #7: 0x0000000100149f2d libbsf.dylib`___lldb_unnamed_symbol624$$libbsf.dylib + 349
    frame #8: 0x000000010014b54b libbsf.dylib`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) + 59
    frame #9: 0x00007fff525d4661 libsystem_pthread.dylib`_pthread_body + 340
    frame #10: 0x00007fff525d450d libsystem_pthread.dylib`_pthread_start + 377
    frame #11: 0x00007fff525d3bf9 libsystem_pthread.dylib`thread_start + 13
(lldb)

@BearishSun
Copy link
Member

The call-stack doesn't appear to have symbol information. Any chance you are linking with the release-compiled bsf? Could you compile it under debug mode and then re-do the stack trace? So we get one like yesterday.

@jeffs
Copy link
Author

jeffs commented May 24, 2018

I hadn't merged your new commits; sorry about that. The sample app still segfaults, but now logs a crash report. Here's the standard output:

A fatal error occurred and the program has to terminate!
  - Error: Segmentation fault: 11
  - Description: Received fatal signal
  - In function: 
  - In file: :0

Stack trace: 
0) 0   libbsf.dylib                        0x000000010ea0d67b _ZN2bs12CrashHandler13getStackTraceEv + 1211: bs::CrashHandler::getStackTrace() + 1211
1) 1   libbsf.dylib                        0x000000010e9c2c7a _ZNK2bs12CrashHandler21logErrorAndStackTraceERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS_8StdAllocIcNS_8GenAllocEEEEESA_SA_SA_j + 1514: bs::CrashHandler::logErrorAndStackTrace(std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, unsigned int) const + 1514
2) 2   libbsf.dylib                        0x000000010ea0ccff _ZNK2bs12CrashHandler11reportCrashERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS_8StdAllocIcNS_8GenAllocEEEEESA_SA_SA_j + 79: bs::CrashHandler::reportCrash(std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, unsigned int) const + 79
3) 3   libbsf.dylib                        0x000000010ea0cc65 _ZN2bs13signalHandlerEiP9__siginfoPv + 2325: bs::signalHandler(int, __siginfo*, void*) + 2325
4) 4   libsystem_platform.dylib            0x00007fff525caf5a _sigtramp + 26: _sigtramp + 26
5) 5   ???                                 0x00007fa38cf04a20 0x0 + 1403404209546565   ???                                 0x00007fa38cf04a20 0x0 + 140340420954656
6) 6   myApp                               0x000000010aa73a15 _ZNSt3__111char_traitsIcE6lengthEPKc + 21: std::__1::char_traits<char>::length(char const*) + 21
7) 7   libbsf.dylib                        0x000000010dc4cabc _ZNSt3__112basic_stringIcNS_11char_traitsIcEEN2bs8StdAllocIcNS3_8GenAllocEEEE6assignEPKc + 44: std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> >::assign(char const*) + 44
8) 8   libbsfGLRenderAPI.dylib             0x000000011174a310 _ZN2bs2ct20MacOSVideoOutputInfoC2Ejj + 400: bs::ct::MacOSVideoOutputInfo::MacOSVideoOutputInfo(unsigned int, unsigned int) + 400
9) 9   libbsfGLRenderAPI.dylib             0x000000011174a811 _ZN2bs2ct20MacOSVideoOutputInfoC1Ejj + 33: bs::ct::MacOSVideoOutputInfo::MacOSVideoOutputInfo(unsigned int, unsigned int) + 33
10) 10  libbsfGLRenderAPI.dylib             0x000000011174944d _ZN2bs6bs_newINS_2ct20MacOSVideoOutputInfoEJRjS3_EEEPT_DpOT0_ + 61: bs::ct::MacOSVideoOutputInfo* bs::bs_new<bs::ct::MacOSVideoOutputInfo, unsigned int&, unsigned int&>(unsigned int&&&, unsigned int&&&) + 61
11) 11  libbsfGLRenderAPI.dylib             0x0000000111749044 _ZN2bs2ct18MacOSVideoModeInfoC2Ev + 308: bs::ct::MacOSVideoModeInfo::MacOSVideoModeInfo() + 308
12) 12  libbsfGLRenderAPI.dylib             0x000000011174a175 _ZN2bs2ct18MacOSVideoModeInfoC1Ev + 21: bs::ct::MacOSVideoModeInfo::MacOSVideoModeInfo() + 21
13) 13  libbsfGLRenderAPI.dylib             0x000000011173840a _ZNSt3__110shared_ptrIN2bs2ct18MacOSVideoModeInfoEE15allocate_sharedINS1_8StdAllocIS3_NS1_8GenAllocEEEJEEES4_RKT_DpOT0_ + 794: std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo>::allocate_shared<bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >(bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> const&) + 794
14) 14  libbsfGLRenderAPI.dylib             0x0000000111736d90 _ZN2bs17bs_shared_ptr_newINS_2ct18MacOSVideoModeInfoENS_8GenAllocEJEEENSt3__110shared_ptrIT_EEDpOT1_ + 32: std::__1::shared_ptr<bs::ct::MacOSVideoModeInfo> bs::bs_shared_ptr_new<bs::ct::MacOSVideoModeInfo, bs::GenAlloc>() + 32
15) 15  libbsfGLRenderAPI.dylib             0x0000000111736ce3 _ZNK2bs2ct14MacOSGLSupport16getVideoModeInfoEv + 35: bs::ct::MacOSGLSupport::getVideoModeInfo() const + 35
16) 16  libbsfGLRenderAPI.dylib             0x00000001116a58da _ZN2bs2ct11GLRenderAPI10initializeEv + 90: bs::ct::GLRenderAPI::initialize() + 90
17) 17  libbsf.dylib                        0x000000010e1ba3e1 _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRNS_6__bindIMN2bs2ct9RenderAPIEFvvEJPS6_EEEEEEvDpOT_ + 273: void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&>(std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>&&&) + 273
18) 18  libbsf.dylib                        0x000000010e1ba2a9 _ZNSt3__110__function6__funcINS_6__bindIMN2bs2ct9RenderAPIEFvvEJPS5_EEENS_9allocatorIS9_EEFvvEEclEv + 41: std::__1::__function::__func<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*>, std::__1::allocator<std::__1::__bind<void (bs::ct::RenderAPI::*)(), bs::ct::RenderAPI*> >, void ()>::operator()() + 41
19) 19  libbsf.dylib                        0x000000010d898205 _ZNKSt3__18functionIFvvEEclEv + 53: std::__1::function<void ()>::operator()() const + 53
20) 20  libbsf.dylib                        0x000000010da8e6d7 _ZN2bs16CommandQueueBase18playbackWithNotifyEPNSt3__15queueINS_13QueuedCommandENS1_5dequeIS3_NS_8StdAllocIS3_NS_8GenAllocEEEEEEENS1_8functionIFvjEEE + 3287: bs::CommandQueueBase::playbackWithNotify(std::__1::queue<bs::QueuedCommand, std::__1::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*, std::__1::function<void (unsigned int)>) + 3287
21) 21  libbsf.dylib                        0x000000010dac8fa3 _ZN2bs10CoreThread13runCoreThreadEv + 1443: bs::CoreThread::runCoreThread() + 1443
22) 22  libbsf.dylib                        0x000000010dacdc71 _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRNS_6__bindIMN2bs10CoreThreadEFvvEJPS5_EEEEEEvDpOT_ + 273: void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&>(std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>&&&) + 273
23) 23  libbsf.dylib                        0x000000010dacdb39 _ZNSt3__110__function6__funcINS_6__bindIMN2bs10CoreThreadEFvvEJPS4_EEENS_9allocatorIS8_EEFvvEEclEv + 41: std::__1::__function::__func<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*>, std::__1::allocator<std::__1::__bind<void (bs::CoreThread::*)(), bs::CoreThread*> >, void ()>::operator()() + 41
24) 24  libbsf.dylib                        0x000000010d898205 _ZNKSt3__18functionIFvvEEclEv + 53: std::__1::function<void ()>::operator()() const + 53
25) 25  libbsf.dylib                        0x000000010ec01b55 _ZN2bs12PooledThread3runEv + 725: bs::PooledThread::run() + 725
26) 26  libbsf.dylib                        0x000000010ec06714 _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEENS_6__bindIMN2bs12PooledThreadEFvvEJPS9_EEEEEEEEPvSF_ + 740: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, std::__1::__bind<void (bs::PooledThread::*)(), bs::PooledThread*> > >(void*) + 740
27) 27  libsystem_pthread.dylib             0x00007fff525d4661 _pthread_body + 340: _pthread_body + 340
28) 28  libsystem_pthread.dylib             0x00007fff525d450d _pthread_body + 0: _pthread_body + 0
29) 29  libsystem_pthread.dylib             0x00007fff525d3bf9 thread_start + 13: thread_start + 13

GitHub issues apparently don't support HTML attachments, but here's the full Crash Report with a .txt extension: log.html.txt

@BearishSun
Copy link
Member

Thanks. I think I misjudged what the original issue was. Can you please try editing the Source/Plugins/bsfGLRenderAPI/MacOS/BsMacOSVideoModeInfo.cpp, at line 58:

			if(value)
				mName = CFStringGetCStringPtr(value, kCFStringEncodingUTF8);
			else
				mName = "Unknown";

Replace those four lines with:

			if(value)
			{
				const char* chars = CFStringGetCStringPtr(value, kCFStringEncodingUTF8);
				if(chars)
					mName = chars;
				else
				{
					CFIndex stringLength = CFStringGetLength(value) + 1;
					auto buffer = bs_stack_alloc<char>((UINT32)stringLength);

					CFStringGetCString(value, buffer, stringLength, kCFStringEncodingUTF8);

					mName = buffer;
					bs_stack_free(buffer);
				}
			}
			else
				mName = "Unknown";

(Note that I haven't tried compiling the code, there might be a minor typo to correct).

I believe that should resolve your issue. Thanks for cooperating with me about this.

@jeffs
Copy link
Author

jeffs commented May 24, 2018

Hey, I see a window! Thanks Marko; want that code in a PR?

@BearishSun
Copy link
Member

Happy to see it resolved! Sure, go ahead.

@jeffs
Copy link
Author

jeffs commented May 24, 2018

FYI, I still get a crash on quitting the app. Unrelated?

src $ ./build/Debug/myApp
A fatal error occurred and the program has to terminate!
  - Error: Segmentation fault: 11
  - Description: Received fatal signal
  - In function:
  - In file: :0

Stack trace:
0) 0   libbsf.dylib                        0x0000000103ed867b _ZN2bs12CrashHandler13getStackTraceEv + 1211: bs::CrashHandler::getStackTrace() + 1211
1) 1   libbsf.dylib                        0x0000000103e8dc7a _ZNK2bs12CrashHandler21logErrorAndStackTraceERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS_8StdAllocIcNS_8GenAllocEEEEESA_SA_SA_j + 1514: bs::CrashHandler::logErrorAndStackTrace(std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, unsigned int) const + 1514
2) 2   libbsf.dylib                        0x0000000103ed7cff _ZNK2bs12CrashHandler11reportCrashERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS_8StdAllocIcNS_8GenAllocEEEEESA_SA_SA_j + 79: bs::CrashHandler::reportCrash(std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, bs::StdAlloc<char, bs::GenAlloc> > const&, unsigned int) const + 79
3) 3   libbsf.dylib                        0x0000000103ed7c65 _ZN2bs13signalHandlerEiP9__siginfoPv + 2325: bs::signalHandler(int, __siginfo*, void*) + 2325
4) 4   libsystem_platform.dylib            0x00007fff70a81f5a _sigtramp + 26: _sigtramp + 26
5) 5   ???                                 0x000000010716b5c8 0x0 + 44138961365   ???                                 0x000000010716b5c8 0x0 + 4413896136
6) 6   libobjc.A.dylib                     0x00007fff6fb4f914 _objc_msgSend_uncached + 68: _objc_msgSend_uncached + 68
7) 7   libbsfGLRenderAPI.dylib             0x000000010979d9f8 _ZN2bs2ct14MacOSVideoModeD2Ev + 72: bs::ct::MacOSVideoMode::~MacOSVideoMode() + 72
8) 8   libbsfGLRenderAPI.dylib             0x000000010979da25 _ZN2bs2ct14MacOSVideoModeD1Ev + 21: bs::ct::MacOSVideoMode::~MacOSVideoMode() + 21
9) 9   libbsf.dylib                        0x00000001036d8ab5 _ZN2bs9bs_deleteINS_9VideoModeENS_8GenAllocEEEvPT_ + 21: void bs::bs_delete<bs::VideoMode, bs::GenAlloc>(bs::VideoMode*) + 21
10) 10  libbsf.dylib                        0x00000001036d8a26 _ZN2bs15VideoOutputInfoD2Ev + 422: bs::VideoOutputInfo::~VideoOutputInfo() + 422
11) 11  libbsfGLRenderAPI.dylib             0x00000001097a0495 _ZN2bs2ct20MacOSVideoOutputInfoD2Ev + 21: bs::ct::MacOSVideoOutputInfo::~MacOSVideoOutputInfo() + 21
12) 12  libbsfGLRenderAPI.dylib             0x000000010979dac5 _ZN2bs2ct20MacOSVideoOutputInfoD1Ev + 21: bs::ct::MacOSVideoOutputInfo::~MacOSVideoOutputInfo() + 21
13) 13  libbsf.dylib                        0x00000001036d8d35 _ZN2bs9bs_deleteINS_15VideoOutputInfoENS_8GenAllocEEEvPT_ + 21: void bs::bs_delete<bs::VideoOutputInfo, bs::GenAlloc>(bs::VideoOutputInfo*) + 21
14) 14  libbsf.dylib                        0x00000001036d8ce6 _ZN2bs13VideoModeInfoD2Ev + 422: bs::VideoModeInfo::~VideoModeInfo() + 422
15) 15  libbsfGLRenderAPI.dylib             0x000000010978b845 _ZN2bs2ct18MacOSVideoModeInfoD2Ev + 21: bs::ct::MacOSVideoModeInfo::~MacOSVideoModeInfo() + 21
16) 16  libbsfGLRenderAPI.dylib             0x000000010978b825 _ZN2bs2ct18MacOSVideoModeInfoD1Ev + 21: bs::ct::MacOSVideoModeInfo::~MacOSVideoModeInfo() + 21
17) 17  libbsfGLRenderAPI.dylib             0x000000010978b6d9 _ZNSt3__120__shared_ptr_emplaceIN2bs2ct18MacOSVideoModeInfoENS1_8StdAllocIS3_NS1_8GenAllocEEEE16__on_zero_sharedEv + 41: std::__1::__shared_ptr_emplace<bs::ct::MacOSVideoModeInfo, bs::StdAlloc<bs::ct::MacOSVideoModeInfo, bs::GenAlloc> >::__on_zero_shared() + 41
18) 18  libbsf.dylib                        0x0000000103684291 _ZNSt3__110shared_ptrIN2bs13VideoModeInfoEED2Ev + 129: std::__1::shared_ptr<bs::VideoModeInfo>::~shared_ptr() + 129
19) 19  libbsf.dylib                        0x0000000103666095 _ZNSt3__110shared_ptrIN2bs13VideoModeInfoEED1Ev + 21: std::__1::shared_ptr<bs::VideoModeInfo>::~shared_ptr() + 21
20) 20  libbsf.dylib                        0x0000000103665ffb _ZN2bs2ct9RenderAPID2Ev + 75: bs::ct::RenderAPI::~RenderAPI() + 75
21) 21  libbsfGLRenderAPI.dylib             0x00000001096f8623 _ZN2bs2ct11GLRenderAPID2Ev + 243: bs::ct::GLRenderAPI::~GLRenderAPI() + 243
22) 22  libbsfGLRenderAPI.dylib             0x00000001096f86a5 _ZN2bs2ct11GLRenderAPID1Ev + 21: bs::ct::GLRenderAPI::~GLRenderAPI() + 21
23) 23  libbsf.dylib                        0x0000000103130f75 _ZN2bs9bs_deleteINS_2ct9RenderAPIENS_8GenAllocEEEvPT_ + 21: void bs::bs_delete<bs::ct::RenderAPI, bs::GenAlloc>(bs::ct::RenderAPI*) + 21
24) 24  libbsf.dylib                        0x00000001031304f0 _ZN2bs6ModuleINS_2ct9RenderAPIEE8shutDownEv + 1600: bs::Module<bs::ct::RenderAPI>::shutDown() + 1600
25) 25  libbsf.dylib                        0x000000010312fe8e _ZN2bs16RenderAPIManagerD2Ev + 62: bs::RenderAPIManager::~RenderAPIManager() + 62
26) 26  libbsf.dylib                        0x0000000103130555 _ZN2bs16RenderAPIManagerD1Ev + 21: bs::RenderAPIManager::~RenderAPIManager() + 21
27) 27  libbsf.dylib                        0x0000000102d554e5 _ZN2bs9bs_deleteINS_16RenderAPIManagerENS_8GenAllocEEEvPT_ + 21: void bs::bs_delete<bs::RenderAPIManager, bs::GenAlloc>(bs::RenderAPIManager*) + 21
28) 28  libbsf.dylib                        0x0000000102d3d310 _ZN2bs6ModuleINS_16RenderAPIManagerEE8shutDownEv + 1600: bs::Module<bs::RenderAPIManager>::shutDown() + 1600
29) 29  libbsf.dylib                        0x0000000102d35e6f _ZN2bs15CoreApplicationD2Ev + 639: bs::CoreApplication::~CoreApplication() + 639
30) 30  libbsf.dylib                        0x0000000103b68188 _ZN2bs11ApplicationD2Ev + 120: bs::Application::~Application() + 120
31) 31  libbsf.dylib                        0x0000000103b6a7e5 _ZN2bs11ApplicationD1Ev + 21: bs::Application::~Application() + 21
32) 32  myApp                               0x0000000102b8d7e5 _ZN2bs9bs_deleteINS_15CoreApplicationENS_8GenAllocEEEvPT_ + 21: void bs::bs_delete<bs::CoreApplication, bs::GenAlloc>(bs::CoreApplication*) + 21
33) 33  myApp                               0x0000000102b8c65e _ZN2bs6ModuleINS_15CoreApplicationEE8shutDownEv + 1966: bs::Module<bs::CoreApplication>::shutDown() + 1966
34) 34  myApp                               0x0000000102b8b53f main + 303: main + 303
35) 35  libdyld.dylib                       0x00007fff70773015 start + 1: start + 1
36) 36  ???                                 0x0000000000000001 0x0 + 136  ???                                 0x0000000000000001 0x0 + 1

@BearishSun
Copy link
Member

Seems to be a separate issue. Not as obvious what is causing it though, need to explore further.

@BearishSun
Copy link
Member

I have submitted a potential fix for the crash on exit issue. I've also integrated the fix for the first issue. Let me know if everything looks fine now.

@jeffs
Copy link
Author

jeffs commented May 25, 2018

Confirmed: Everything looks fine now.

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