Skip to content

HHChannel: uninitialized gates show up in wildcardFind and cause silent crash when accessed #503

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

Open
subhacom opened this issue Mar 6, 2025 · 0 comments

Comments

@subhacom
Copy link
Collaborator

subhacom commented Mar 6, 2025

Even when any of the Xpower/Ypower/Zpower is not set, so that the actual gate object does not exist, all three show up as children of the HHChannel.
One can access the child gate with moose.element(f'{channel.path}/{gateName}'). One can even access its name field. But attempt to access any other field results in a silent crash.

Example for reproducing:

In [1]: import moose

In [2]: ch = moose.HHChannel('ch')

In [3]: moose.le(ch)
Elements under /ch[0]
    /ch[0]/gateX
    /ch[0]/gateY
    /ch[0]/gateZ

Out[3]: ['/ch[0]/gateX', '/ch[0]/gateY', '/ch[0]/gateZ']

In [4]: gate = moose.element(f'{ch.path}/gateX')

In [5]: gate
Out[5]: <moose.HHGate id=487 dataIndex=0 path=/ch[0]/gateX[0]>

In [6]: gate.name
Out[6]: 'gateX'

In [7]: gate.min
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

No branches or pull requests

1 participant