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

[BugFix] blank line not handled by InitFileInfo #2191

Conversation

andrew-platt
Copy link
Collaborator

Ready to merge.

Feature or improvement description
When an AeroDyn input file is read by AeroDyn_Init, it is processed by ProcessComFile. This routine can account for blank lines.

However, if a file is passed as a c_null terminated string through the c-bindings interface, it is handled by the InitFileInfo routine. This routine was prematurely exiting when a blank line was found instead of continuing as expected.

This PR updates InitFileInfo to correctly handle blank lines and not end prematurely.

Related issue, if one exists
PR #1909 ran into unexpected issues with a single blank line in the AD.dat of the py_AD_B1n2_OLAF regression test. This blank line is present in AD_B1n2_OLAF, so we expect the two cases to work identically but the Python case was failing.

Impacted areas of the software
Blank lines in input files passed through c-bindings interfaces as c_null terminated strings.

Additional supporting information

Test results, if applicable
Changed the py_AD_B1n2_OLAF/AD.dat input file to match AD_B1n2_OLAF/AD.dat.

There was a bug in how `InitFileInfo` handled a blank line in an input file passed through the c-bindings interface. Fixed it so it matches behaviour from `ProcessComFile`
@andrew-platt andrew-platt requested a review from ebranlard May 8, 2024 22:15
@andrew-platt andrew-platt self-assigned this May 8, 2024
@andrew-platt andrew-platt merged commit 7bffa49 into OpenFAST:dev-unstable-pointers May 8, 2024
21 checks passed
@andrew-platt andrew-platt deleted the b/InitFileInfo_blankLine branch May 10, 2024 20:39
@andrew-platt andrew-platt mentioned this pull request Dec 24, 2024
38 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant