MMCore: Revert strict initialization checks #385
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When an operation that requires an initialized device is attempted on an uninitalized device, log a warning message instead of throwing an exception. This reverts part of #376; see #384 for some background.
It turns out that the Hardware Configuration Wizard currently relies (mostly incorrectly) on some operations that are not actually correct, but fixing it is complicated enough that we need to revert the exception throwing for now.
In addition, MMCore itself needs some fixes so that functions like waitForSystem() do not cause issues in the presence of uninitialized devices. This may also apply to other bulk actions such as unloadAllDevices() and the system state cache.
The goal is still to enable exceptions for these checks, but only once we've had a chance to fix these issues.
This does not revert the checks against multiple initialization attempts and against setting a pre-init property after initialization (also added in #376). These are not known to cause any issues so far.
Also add the name of the operation to the logged warning message to assist with the necessary fixes. The log messages have log level
WRN
, which should stand out since we have never used it before. This is to prevent people from thinking that the "normal" operation of the Hardware Configuration Wizard is causing errors.Sample log message:
Bump MMCore version to 10.6.0.