benikabocha / saba

OpenGL Viewer (OBJ PMD PMX)
MIT License
442 stars 60 forks source link

Crash in latest MacOS such as Mojave #11

Closed goopymoon closed 5 years ago

goopymoon commented 5 years ago

I'm impressed by your awesome code. I found Bullet which is installed by brew has crash problem in high Sierra and Mojave. This is the solution from googling. I hope this can be a help for updating your installation document.

  1. Comment out SIMD related definition in btScalar.h https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=9443
  2. Build Bullet without double precision. For this modify build_cmake_pybuild_double.sh as following. cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=ON -DUSE_DOUBLE_PRECISION=OFF -DBT_USE_EGL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="your installation path" ..
  3. After build, run "make install" in the build_cmake folder.
  4. Link built Bullet with Saba viwer.
benikabocha commented 5 years ago

Thank you for the report. This is a problem caused by different build types of Bullet Physics. Try adding the following option to Saba's cmake argument. cmake -D CMAKE_BUILD_TYPE=RELEASE ..

goopymoon commented 5 years ago

Sorry for the late response. I just tested and It works well. What I did was running Saba viewer in debug mode with Xcode. I learned a lot. Thank you.

benikabocha commented 5 years ago

Sorry, this is problem of alignment. In the macOS environment, the inside of "getOpenGLMatrix" assumes a variable aligned to 16 bytes. I will fix problem.