fix: symbol info for function block properties with monitoring = call (#261)#529
Merged
Conversation
…P_CALL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_del__ index_group == ADSIGRP_SYM_VALBYHND is true for any symbol using that access method, not just ones where get_handle() was called internally. The flag precisely tracks whether release_handle() is required on destruction. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirrors the existing try/except around clear_device_notifications(). If the connection is gone at GC time (e.g. interpreter shutdown, same class of problem fixed in #528), release_handle() would raise and produce an unraisable exception in the destructor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers four scenarios using mocked adsGetSymbolInfo: - iGroup=0xF019 causes get_handle() and ADSIGRP_SYM_VALBYHND - normal symbols use offset directly, no handle acquired - handle is released via release_handle() on destruction - ADSError from release_handle() in __del__ is suppressed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Fixes #261.
Replaces #512, which was based on a much older version of master.
This branch is a rebase of dgl-cw's original fix with three
improvements applied on top:
0xF019with namedADSIGRP_SYM_FB_PROP_CALLin
constants.py_acquired_handleflag so__del__only calls
release_handle()for symbols whereget_handle()wasactually called internally (avoids a false positive on any symbol that
happens to use
ADSIGRP_SYM_VALBYHND)try/except ADSErrorguard in__del__via rebase (same class of fix as CI: Fix Segmentation error on module shutdown #528)