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

Script crashes when Python debugger inspects CdefSlave #138

Open
RobertoRoos opened this issue Apr 24, 2024 · 0 comments
Open

Script crashes when Python debugger inspects CdefSlave #138

RobertoRoos opened this issue Apr 24, 2024 · 0 comments

Comments

@RobertoRoos
Copy link
Contributor

RobertoRoos commented Apr 24, 2024

In the following code, my program crashes almost instantly when I use PyCharm debugger to view entries the slaves variable:

import pysoem
master = pysoem.Master()
master.open("\\Device\\NPF_{...}")

if master.config_init() > 0:
    slaves = master.slaves
else:
    print('no device found')

master.close()

Breaking on the last line is fine:

image

But when I try to expand slaves[0] to view its properties it crashes, with the error

Process finished with exit code -1073741819 (0xC0000005)

Otherwise the code seems okay. Adding this for example prints the names as expected:

    for slave in master.slaves:
        print(slave.name)

EDIT: Exact same happens in VS Code.

@RobertoRoos RobertoRoos changed the title Script crashes when PyCharm debugger inspects CdefSlave Script crashes when debugger inspects CdefSlave Apr 24, 2024
@RobertoRoos RobertoRoos changed the title Script crashes when debugger inspects CdefSlave Script crashes when Python debugger inspects CdefSlave Apr 24, 2024
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