Repository navigation
Conversation
An unattended sequence could not survive a USB drop: three native errors disabled the driver until N.I.N.A. restarted, the lost handle stayed registered in the native driver (so a later open reused a dead camera), and NINA dropped the camera from the sequence. Together with fixes in the native driver (dougforpres/SonyCamera), the plugin now recovers on its own. SonyDriver (Sony.cs) - Repeated native errors drop the handle instead of stopping the executor; only a hung P/Invoke (executor timeout) still requires a restart. - A lost handle is closed in the native driver exactly once. - ReopenCamera closes the stale handle, opens the camera again and re-attaches the lens. CanReopen / IsAwaitingReopen expose the state. - Close timeout raised from 5 s to 30 s: the native close can wait 20 s for an operation in progress, which was being treated as a hang. CameraDriver - After a failed exposure, a failed status read or a lost handle, the next exposure reopens the camera first, waiting up to 2 minutes for it to come back (retry every second) instead of failing straight away, so a short drop costs one frame rather than the rest of the sequence. Abort or Disconnect ends the wait. Connected stays true while the camera can be reopened. - After a reopen the requested ISO is restored once the camera reports its settings (a reopened camera reads 0 at first, and stepping from that left the wrong ISO), then verified and retried. - An exposure that never finishes times out (2x its length + 2 minutes). - Restarting while the camera still finishes a stopped exposure waits for it instead of failing every remaining frame in milliseconds. - AbortExposure no longer warns "Abort requested" when NINA is only cleaning up after a failed exposure. - Gains returns the same list instance while the ISO options are unchanged, so the Equipment > Camera "Default gain" dropdown no longer goes blank on reconnect. FocuserDriver stays connected while the camera is being reopened. Tests: simulator support for unplugging, reopens and unread ISO after a reopen, plus tests for each behaviour (133 passing). Tested with an ILCE-7M3 and N.I.N.A. 3.2.0.9001: manual and natural USB drops recover without user action; a 7.7-hour run (7,790 exposures) was clean.
This was referenced Oct 22, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Works together with the native driver fixes in dougforpres/SonyCamera#19.
An unattended sequence could not survive a USB drop: three native errors disabled the driver until N.I.N.A. restarted, the lost handle stayed registered in the native driver (so a later open reused a dead camera), and NINA dropped the camera from the sequence. Together with fixes in the native driver (dougforpres/SonyCamera), the plugin now recovers on its own.
SonyDriver (Sony.cs)
CameraDriver
FocuserDriver stays connected while the camera is being reopened.
Tests: simulator support for unplugging, reopens and unread ISO after a reopen, plus tests for each behaviour (133 passing).
Tested with an ILCE-7M3 and N.I.N.A. 3.2.0.9001: manual and natural USB drops recover without user action; a 7.7-hour run (7,790 exposures) was clean.