InteractiveComputerGraphics / PositionBasedDynamics

PositionBasedDynamics is a library for the physically-based simulation of rigid bodies, deformable solids and fluids.
MIT License
1.9k stars 358 forks source link

Why are the demos crashing? #43

Closed brupelo closed 6 years ago

brupelo commented 6 years ago

Hi, in order to build the library and demos I've typed the next commands for Debug from root:

mkdir debug
cd debug
cmake -DCMAKE_BUILD_TYPE=Debug
cmake --build .

and for Release:

mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .

Almost all demos are crashing.

Release demos crashing here Debug demos crashing here

Could you advice about this?

Also, I've seen in your website some papers presentations including some really cool videos demos, where can i find the source code or executables to give it a shot?

Thanks in advance.

janbender commented 6 years ago

In at least one demo I have seen an error message of Eigen. Can you post this message? Did you use a 64bit or 32bit build?

brupelo commented 6 years ago

I've used the vs2015 32 bit command prompt. One note about my above post, as you can see i was using -DCMAKE_BUILD_TYPE without being aware this variable was not being used, in order to build with either a debug or release config i need to do cmake --build . --config Debug or cmake --build . --config Release. That said, the Eigen error you're asking for is this:

Scene: D:/test/PositionBasedDynamics/data/scenes/DeformableSolidCollisionScene.json
Loading D:/test/PositionBasedDynamics/data/models/cube.obj
Number of triangles: 12
Number of vertices: 8
Loading D:/test/PositionBasedDynamics/data/models/sphere.obj
Number of triangles: 2280
Number of vertices: 1146
Loading D:/test/PositionBasedDynamics/data/models/cylinder.obj
Number of triangles: 760
Number of vertices: 382
Loading D:/test/PositionBasedDynamics/data/models/torus.obj
Number of triangles: 1600
Number of vertices: 800
Loading D:/test/PositionBasedDynamics/data/models/armadillo.obj
Number of triangles: 30000
Number of vertices: 15002
Assertion failed: (internal::UIntPtr(array) & (15)) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****", file d:\test\positionbaseddynamics\extern\eigen\eigen\src/Core/DenseStorage.h, line 109

Btw, now i've built the release_x86 i can see some demos running because the generated code is much faster than the debug one, but still mostly of the demos still crashing, please take a look here.

Hopefully you can advice what's going on here. Btw, what's the minimum requirements to use the library succesfully, i'm using a laptop with a i7 and 8 cores but the few demos didn't crash are running quite slow (ie: the fluid demo one)

Thanks

janbender commented 6 years ago

I guess you have a 64bit operating system. If this is the case you should use a x64 build, otherwise it won't work.

brupelo commented 6 years ago

I see, yeah, I'm on win7 x64 bits. So, building the project on release x64 definitely helped a bit, now I'm able to run more demos, but still some of them are crashing (the ones which has collision in the exe name)... Also, why is the sceneloaderdemo.exe not showing anything? Here

janbender commented 6 years ago

Is there any error message? Maybe OpenGL crashes or the shader couldn't be executerd.