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

solve issue #2366 (bugs related to saving/loading a Spline) #2368

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

stephengold
Copy link
Member

This pull request solves issue #2366 and adds an automated test to prevent regressions.

The issue of spines being loaded as the wrong type is solved by passing the same tag ("type") to readEnum() as was passed to oc.write().

The ClassCastException issue is solved by converting knots to/from a float[] array and saving/loading those arrays. Compatibility with serialized data from past releases is maintained in the case where knots is null---in other words for non-NURB splines. However, past releases couldn't serialize NURB splines without crashing, so this change shouldn't cause any issues in practice.

@yaRnMcDonuts
Copy link
Member

I plan to merge this PR in 24 hours.

@yaRnMcDonuts
Copy link
Member

Oops, I said i'd merge in 24 hours... 2 weeks ago. Sorry for the delay!

@yaRnMcDonuts yaRnMcDonuts merged commit 358e00e into master Feb 27, 2025
15 checks passed
@stephengold stephengold deleted the sgold/issue/2366 branch February 27, 2025 17:22
@stephengold stephengold added this to the v3.8.0 milestone Feb 27, 2025
@stephengold
Copy link
Member Author

Sorry for the delay!

As a former release manager, I understand that life doesn't always go according to plan. No harm done.

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

Successfully merging this pull request may close these issues.

Spline's type can only be deserialized as CatmullRom
2 participants