Jump to content
Sign in to follow this  
ivr

Big array segmentation fault

Recommended Posts

Posted (edited)

Hello, everyone!

 

I'm trying to calculate some internal forces of some particles using information from 125 neighbouring voxels around each particle. For accessing those voxels, I'm using this array as a shifting index: 

 

vector sha[] = array ({ −2 , −2, −2}, {−2, −2, −1}, {−2, −2, 0} , {−2, −2, 1} ,
{−2, −2, 2} , {−2, −1, −2}, {−2, −1, −1}, {−2, −1, 0} , {−2, −1, 1} , {−2,
−1, 2} , {−2, 0 , −2}, {−2, 0 , −1}, {−2, 0 , 0} , {−2, 0 , 1} , {−2, 0 , 2} , {−2,
1 , −2}, {−2, 1 , −1}, {−2, 1 , 0} , {−2, 1 , 1} , {−2, 1 , 2} , {−2, 2 , −2},
{−2, 2 , −1}, {−2, 2 , 0} , {−2, 2 , 1} , {−2, 2 , 2} , {−1, −2, −2}, {−1, −2,
−1}, {−1, −2, 0} , {−1, −2, 1} , {−1, −2, 2} , {−1, −1, −2}, {−1, −1, −1},
{−1, −1, 0} , {−1, −1, 1} , {−1, −1, 2} , {−1, 0 , −2}, {−1, 0 , −1}, {−1, 0 ,
0} , {−1, 0 , 1} , {−1, 0 , 2} , {−1, 1 , −2}, {−1, 1 , −1}, {−1, 1 , 0} , {−1, 1 ,
1} , {−1, 1 , 2} , {−1, 2 , −2}, {−1, 2 , −1}, {−1, 2 , 0} , {−1, 2 , 1} , {−1, 2 ,
2} , {0 , −2, −2}, {0 , −2, −1}, {0 , −2, 0} , {0 , −2, 1} , {0 , −2, 2} , {0 , −1,
−2}, {0 , −1, −1}, {0 , −1, 0} , {0 , −1, 1} , {0 , −1, 2} , {0 , 0 , −2}, {0 , 0 ,
−1}, {0 , 0 , 0} , {0 , 0 , 1} , {0 , 0 , 2} , {0 , 1 , −2}, {0 , 1 , −1}, {0 , 1 , 0} ,
{0 , 1 , 1} , {0 , 1 , 2} , {0 , 2 , −2}, {0 , 2 , −1}, {0 , 2 , 0} , {0 , 2 , 1} , {0 , 2 ,
2} , {1 , −2, −2}, {1 , −2, −1}, {1 , −2, 0} , {1 , −2, 1} , {1 , −2, 2} , {1 , −1,
−2}, {1 , −1, −1}, {1 , −1, 0} , {1 , −1, 1} , {1 , −1, 2} , {1 , 0 , −2}, {1 , 0 ,
−1}, {1 , 0 , 0} , {1 , 0 , 1} , {1 , 0 , 2} , {1 , 1 , −2}, {1 , 1 , −1}, {1 , 1 , 0} ,
{1 , 1 , 1} , {1 , 1 , 2} , {1 , 2 , −2}, {1 , 2 , −1}, {1 , 2 , 0} , {1 , 2 , 1} , {1 , 2 ,
2} , {2 , −2, −2}, {2 , −2, −1}, {2 , −2, 0} , {2 , −2, 1} , {2 , −2, 2} , {2 , −1,
−2}, {2 , −1, −1}, {2 , −1, 0} , {2 , −1, 1} , {2 , −1, 2} , {2 , 0 , −2}, {2 , 0 ,
−1}, {2 , 0 , 0} , {2 , 0 , 1} , {2 , 0 , 2} , {2 , 1 , −2}, {2 , 1 , −1}, {2 , 1 , 0} ,
{2 , 1 , 1} , {2 , 1 , 2} , {2 , 2 , −2}, {2 , 2 , −1}, {2 , 2 , 0} , {2 , 2 , 1} , {2 , 2 ,
2});

 

I isolated it in a separate attribute wrangle and this was indeed what was causing the Houdini crash. Does anyone have any advice on why Houdini crashes because of this array?

 

[SOLVED] the minus signs were dashes instead, the array was fine otherwise

Edited by ivr
SOLVED

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×