[solved] SplitAlongPlane ??

[solved] SplitAlongPlane ??

Postby ikam » Wednesday, 20.June 2012, 12:26

Hi

There is something strange with SplitAlongPlane. It crash randomly or it break the mesh.

Behavior is different between several wz4 executions (memory space allocating). Sometime it works fine, sometimes it crash or sometime it break the mesh. In addition it seems to be different depending on the machine where it was compiled...

For example :
- with the original wz4 exe (fr_public\altona_wz4\wz4\bin) - The mesh is always correct but sometimes wz crash (splitalongplane don't deform the mesh)
- with my compiled version - Mesh is always broken and sometimes it crash. (I used the original lastest gihub version)
- with the erbsen compiled version (on this forum) - Mesh is correct but it crash sometimes. (same code source version of mine)

For example, I 've made a simple example with only a cube and splitalongplane, here the screenshot of the result with my compiled version : (we can see an incorrect vertex position which deform the cube).

there seems to be a problem with SplitEdgeAlongPlane function at line 6427.

I would like to have the result of your debug test and your config, to help me please.

Code: Select all
6427  Wz4MeshVertex *v = Vertices.AddMany(1);  <= set a breakpoint on this line
6428  v->Pos.Fade(t,a.Pos,b.Pos);


at breakpoint if you examine a.Pos and b.Pos values you will see correct data like (0.5, 0.5, 0.5), press F10 to run the line and examine again a and b. (normally values should not change)
For me values become incorrect => a.Pos {x=-1.5883997e+038 y=-1.5883997e+038 z=-1.5883997e+038 }

My config is :

- windows xp sp3
- visual studio 2010

Thanks.
You do not have the required permissions to view the files attached to this post.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: SplitAlongPlane ??

Postby Skinnytorus » Wednesday, 20.June 2012, 18:17

hi. ikam.
It looks like your example starts to crash wz4 with tesselation along y axis set to any odd value starting from 27.
My config:
Win7 64
VS 2010 Express
I tried to track this issue in VS using your break points but I can not find such values as a.Pos and b.Pos.
I'm totally new to VS and I think I will need a step by step instruction to get these values for you :))
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: SplitAlongPlane ??

Postby Skinnytorus » Wednesday, 20.June 2012, 18:31

No, that's not it... It crashes also when changing x or z tesselation. Wrong thesis.
I'm going to experiment more... There must be some dependency anyway...
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: SplitAlongPlane ??

Postby Skinnytorus » Wednesday, 20.June 2012, 18:48

total mess here. unperdictable results. by the way, the first example in the test file works OK for me (latest version compiled on my config)... it's really strange...
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: SplitAlongPlane ??

Postby erbsen » Thursday, 21.June 2012, 07:53

Hi ikam,

Mesh broken? No.
The first and third example crashes.
The second example works and the last example crashes at tesselaation 19-19-19. But when i increase the tesselation seperate for every axis i can get over 19-19-19.

Skinnytorus wrote:I'm totally new to VS and I think I will need a step by step instruction to get these values for you :))
Me too.

My config:
Win 7 64 bit
VS 2010 Express


erbsen
erbsen
Operator
Operator
 
Posts: 873
Joined: Thursday, 15.July 2004, 23:00
Location: Os

Re: SplitAlongPlane ??

Postby ikam » Thursday, 21.June 2012, 11:50

ok thanks, it's confirm my fix. I thought the problem was only on my compilation.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: SplitAlongPlane ??

Postby Skinnytorus » Saturday, 23.June 2012, 13:32

ikam,
Many thanks for the pull request. It works like a charm now! :)
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46


Return to Development and contribution



Who is online

Users browsing this forum: No registered users and 16 guests