-
Notifications
You must be signed in to change notification settings - Fork 93
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
Using the API when Debug Session is configured to "Using Breakpoints in C/C++/.NET Applications" causes access violation #906
Comments
This works for me on Python 64bit version 3.6.2 using NI-DCPower 18.1 (driver) and nidcpower (python) 1.0.0.
Perhaps this is a 3.6.5 issue? |
@Fladolcetta can you try upgrading Python? |
I did upgrade to 3.7, but now I run into #895 |
I tested this with the following and it works as expected:
@TestStandTrent have you been able to reproduce this issue? |
This is the output I get after the crash.
|
We have tracked this down and it is an issue with how "Using Breakpoints in C/C++/.NET Applications" is implemented. This is a feature of our drivers that allows InstrumentStudio to debug a session in use by an application. Our Python bindings call When "Using Breakpoints in C/C++/.NET Applications" is enabled, a separate server process is started that hosts the "real" session that talks to hardware, and all driver functions made by client code are remoted to that process. Because it is a separate process, the thread affinity of Internal NI bug report 717410 has been created to track this, as it is possible to fix in the server process. For now, I am marking this as For now, do not enable "Using Breakpoints in C/C++/.NET Applications" when also using Python. It will also make your code faster. |
Now that we understand the root cause for this issue, the current title "Simulated DCPower Device in Max causes access violation" is not helpful. I am going to rephrase. I also think we should close since it's a driver issue. |
This is tracked by NI internal bug report (CAR 717410 / Bug 260694). Workaround is listed here. No longer keeping this issue open to track separately. |
I'm using nimi and nidcpower specifically in production test on my STS, running TestSTand 2017. This issue cost me a few days of time, since my nidcpower calls in python were working on my development STS, but not on my production machine. @marcoskirsch pointed me to this issue, and disabling the C/C++/.NET breakpoints fixed my python issue. And, debugging witinin MS visual studio still works, but I assume instrument studio can't poll the SMUs now during a breakpoint (or perhaps ever, I did not confirm). quick screen shot showing software, plus the error thrown during an ipynb session Realize it's a closed issue, just wanted to post here. I'd suggest this issue be brought up into your nimi docuementation/getting started guides. |
Description of issue
When using a simulated DCPower device in Max and not passing 'simulate' as an option when creating the session, the attached example generates an access violation.
python -c "import niscope; niscope.print_diagnostic_information()"
output (replaceniscope
with appropriate package name)Steps to reproduce issue
The text was updated successfully, but these errors were encountered: