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

Segfaulting with simple input #9

Closed
bmmeijers opened this issue Jan 30, 2014 · 2 comments
Closed

Segfaulting with simple input #9

bmmeijers opened this issue Jan 30, 2014 · 2 comments
Labels

Comments

@bmmeijers
Copy link
Contributor

With simple input file, val3dity on Linux segfaults (although I am not sure what is wrong, the input file is dealt with properly by tetgen 1.5.0).

./val3dity  /tmp/boekie.poly 
Reading 1 file(s).
Reading outer shell:    /tmp/boekie.poly

Validating surface in 2D with GEOS (their projection)
-----all valid

Triangulating outer shell
-----done

Validating shell #0
-----Planarity
    yes
-----Combinatorial consistency
Error 306: some vertices are not referenced by faces
    [shell: #0; face: #-1]
    yes
-----Geometrical consistency
    yes
-----Orientation of normals
Segmentation fault

And the input file contents:

# Generated by 'solids.py' at 2014-01-30 13:01:17.741013
# Delft University of Technology, GIS technology
# Martijn Meijers <b.m.meijers@tudelft.nl>

# part 1 - node list
6 3 0 0
1 0 0 0
2 0 1 0
3 1 0 0
4 0 1 1
5 0 0 1
6 1 0 1

# Part 2 - facet list
# facet count, no boundary marker
5 0

# facet 1
1
3    1 2 3

# facet 2
1
3    4 5 6

# facet 3
1
4    1 5 4 2

# facet 4
1
4    1 3 6 5

# facet 5
1
4    3 2 4 6

# Part 3 - hole list
0            # no hole

# Part 4 - region list
0            # no region
@bmmeijers
Copy link
Contributor Author

With zero based indexing and all comments removed, it segfaults even earlier:

6 3 0 0
0 0 0 0
1 0 1 0
2 1 0 0
3 0 1 1
4 0 0 1
5 1 0 1
5 0
1
3    0 1 2
1
3    3 4 5
1
4    0 4 3 1
1
4    0 2 5 4
1
4    2 1 3 5
0
0

Output:

$ ./val3dity /tmp/one.poly 
Reading 1 file(s).
Reading outer shell:    /tmp/one.poly

Validating surface in 2D with GEOS (their projection)
Segmentation fault

hugoledoux added a commit that referenced this issue Jan 31, 2014
@hugoledoux
Copy link
Member

Fixed. The # of holes is not mandatory, so you were right not to put it for your file. Now the code handles with or without, and should recover from spaces also between and after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants