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

Fix issue in model without faces #1494

Merged
merged 2 commits into from
Apr 10, 2024
Merged

Fix issue in model without faces #1494

merged 2 commits into from
Apr 10, 2024

Conversation

rafacanton
Copy link
Contributor

@rafacanton rafacanton commented Apr 10, 2024

A bug was reported server side pointing to a crash if faces are requested in a mesh that doesn't have them:

from ansys.dpf import core as dpf
from ansys.dpf.core import examples
filename = examples.download_pontoon()
model = dpf.Model(filename)
mesh = model.metadata.meshed_region
mesh.faces.face_by_id(1) # server crashes since there are no faces

We now handle the situation here. A test is added to ensure that the raise is expected.

@rafacanton rafacanton added the bug Something isn't working label Apr 10, 2024
@rafacanton rafacanton self-assigned this Apr 10, 2024
@PProfizi
Copy link
Contributor

@rafacanton agreed to put this in place, yet shouldn't it be the server's job to return something empty instead of throwing? Food for thoughts

@PProfizi
Copy link
Contributor

@rafacanton agreed to put this in place, yet shouldn't it be the server's job to return something empty instead of throwing? Food for thoughts

ah sorry, i just realized the issue here is that the client does not check the input it gives to the request.

@rafacanton
Copy link
Contributor Author

@rafacanton agreed to put this in place, yet shouldn't it be the server's job to return something empty instead of throwing? Food for thoughts

ah sorry, i just realized the issue here is that the client does not check the input it gives to the request.

Correct, the server returns emty PropFields/Scoping

@rafacanton rafacanton merged commit ecf0fa3 into master Apr 10, 2024
37 checks passed
@rafacanton rafacanton deleted the rcanton/bug_faces branch April 10, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants