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

Fixed loading an organ when some configuration entry is out of range https://github.com/GrandOrgue/grandorgue/issues/1696 #1707

Merged
merged 2 commits into from
Nov 19, 2023

Conversation

oleg68
Copy link
Contributor

@oleg68 oleg68 commented Nov 4, 2023

Resolves: #1696

This PR changes handling of Out of range configuration errors dramatically.

Earlier loading the organ was finishing. Now the default value is used for this configurantion entry and loading the organ continues. An error message appears in the Log window.

I'm not sure that the new behavior does not cause unattended side effects.

@oleg68 oleg68 added this to the 3.13.2 milestone Nov 4, 2023
@oleg68 oleg68 force-pushed the bugfix/invalid-config branch from 3098370 to 3f1e254 Compare November 11, 2023 09:41
@oleg68
Copy link
Contributor Author

oleg68 commented Nov 11, 2023

@larspalo could you approve this PR?

@larspalo
Copy link
Contributor

larspalo commented Nov 12, 2023

@oleg68 I don't like this at all. The out of range checking is there for very good reasons for the .odf. If, and I mean only really if, we should apply such "default value instead when out of range" strategy, it should really be limited to only "some configuration entries" and not all of them. If for instance a too big switch number is referenced as a GUI element it currently would default to the first (switch) instead - which is most certainly not intended.

Personally, I think that this new loose out of range checking would perhaps be ok for .cmb settings mostly, that are supposed to have been written by GO itself, the .odf should be strictly correct to begin with.

@oleg68 oleg68 force-pushed the bugfix/invalid-config branch from 3f1e254 to ae4f5f1 Compare November 14, 2023 19:28
@oleg68
Copy link
Contributor Author

oleg68 commented Nov 14, 2023

Personally, I think that this new loose out of range checking would perhaps be ok for .cmb settings mostly, that are supposed to have been written by GO itself, the .odf should be strictly correct to begin with.

@larspalo

I restored the strict checking of .odf file. Now grandorg assumes the default value only if a .cmb the value is out of range.

@oleg68 oleg68 mentioned this pull request Nov 17, 2023
3 tasks
@oleg68 oleg68 force-pushed the bugfix/invalid-config branch from 0e9f864 to cb67cd2 Compare November 17, 2023 19:34
@oleg68
Copy link
Contributor Author

oleg68 commented Nov 18, 2023

@larspalo could you approve this PR?

@oleg68 oleg68 merged commit a158c75 into GrandOrgue:master Nov 19, 2023
1 check passed
@oleg68 oleg68 deleted the bugfix/invalid-config branch November 19, 2023 07:26
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.

Organ fails to start with invalid configuration
3 participants