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

MMCore: Revert strict initialization checks #385

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

marktsuchida
Copy link
Member

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:

2023-09-29T17:04:35.377065 tid18444 [WRN,Core:dev:UserDefinedStateDevice] Operation (GetNumberOfPositions) not permitted on uninitialized device (this will be an error in a future version of MMCore; for now we continue with the operation anyway, even though it might not be safe)

Bump MMCore version to 10.6.0.

When an operation that requires an initialized device is attempted on an
uninitalized device, log a warning message instead of throwing an
exception.

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. 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.

Bump MMCore version to 10.6.0.
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.

1 participant