-
Notifications
You must be signed in to change notification settings - Fork 704
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
Garbage Collection - Python.Runtime.Dll throws System.AccessViolation #2268
Comments
Can you please provide a bit of code that shows this behaviour (or better yet, a reproducible example)? If everything is working correctly, C# objects should never be finalised while they are still referenced. Also, did you ensure that you log statements are flushed immediately and/or are timestamp at a very high resolution? Since you are dealing here with potentially different buffers, it can easily happen that the logging order is off, leading you down a wrong path. |
I cannot provide an example immediately but if it is strictly necessary I can write one. But what I can tell for sure is that when I jump in to the __del__() function and I have already seen the log prints, any method on the C# object, that I was able to call for the whole previous lifetime of the object, throws python side "Attribute error with MethodObject is not callable"....so from this I am deducing that the destructor logs are right....otherwise I cannot explain to myself why any method that has always worked in the previous object lifetime is suddenly no longer callable... |
Environment
Details
I am trying to open a large file through a .NET Framework DLL and access the data inside python.
Scenario:
Errors
If someone with more experience than me about this tool sees any issues in what I am trying to do python side I will happily fix my code, otherwise if you think this might be a real problem I will do a pull request with my corrections so everyone can get a benefit from them.
UPDATE ADDED CODE
Running the python main above with the debugger works fine(also time stamps in correct order) but without the debugger I ALWAYS get the following error:
**Where am I wrong? How Can I fix it? **
Note 1: Obviously I do not want to try catch it I want it to work properly
Note 2: Same main in C# no errors at all
The text was updated successfully, but these errors were encountered: