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
64-bit python on Windows 64-bit fails #31
Comments
I gave this a try after you mentioned it previously, and I can't seem to replicate the issue. Perhaps your Working output with x64 Python, 2.7.9:
|
Oh, no, I beat hard on this, and tried many versions of 64-bit ca.dll/Com.dll. I believe this is now working, though only on 2.7.9 (not 2.7.8), and I broke something on other systems. I'll write a more complete of the solution shortly.... |
I believe this is now resolved, and pyepics can work reliably on 64-bit Windows. There are 3 (separate) issues and caveats:
callback = ctypes.CFUNCTYPE(None, ctypes.POINTER(args))(func) on 64-bit Windows instead of (what is *required on all other systems): callback = ctypes.CFUNCTYPE(None, args)(func) Again, the 64-bit-Windows test is used to make this distinction. This also has the consequence that each of the callback functions need to have if dbr.PY64_WINDOWS: args = args.contents to use the args the same way on all platforms. |
I see why my test worked now - I saw the issue, unknowingly pulled in your fixes that came before the issue posted, and successfully ran the test. At least you have confirmation that it works elsewhere, I suppose... That's very strange about the The byte sizes of the |
Yes, it is all very weird, and I don't fully understand it. It's like there is some implied added bits (maybe related to passing a pointer to the structure). I wouldn't be surprised if there was a better solution, but this seems to pass many tests, so it can't be very wrong. FWIW, in a simple C test on 64-bit windows (just adding a printf to caget.c), The errors I saw, even with the CPOINTER change and the "padding" change with 2.7.8 (and I was really hoping to use Anaconda!) were even weirder: Callbacks and events worked and gave sensible data values. What failed was doing a I'm willing to say these are all bugs in ctypes that got fixed between 2.7.8 and 2.7.9, but it makes very scary to say this actually works on 64-bit Windows! |
OK -- it gets slightly weirder (but perhaps in a better way): For 64-bit Python 3.4, the Epics CA So, I would say the situation on 64-bit Python 3 is understandable: OK, with all that, 3.2.4 is released! |
there were many issues with 64-bit python on Windows, basically preventing it from working at all.
The text was updated successfully, but these errors were encountered: