You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to be an issue with the garbage collection in python.
The tk.tree.Tape.from_file('./tape50') command returns a newly constructed object (there is no "owner" of this object to keep a reference to it). Since commands are being chained onto it, a handle to it was never stored. I assume the garbage collector just cleaned it up.
I'm looking through the pybind11 documentation to see if there is anything I can do to resolve this. However, I think the best solution in this case is to just not chain from what is a newly created object that has no reference on the C++ side of things.
Using U235 from ENDF-B-VIII.0 (n-092_U_235.endf) with the njoy file below I notice some issues when trying to parse the output (tape50) in ENDFtk.
It seems strange to me, although perhaps I have made a mistake :), that the following produces a seg fault.
whereas doing this in the more verbose way as below, produces no error.
Note my system is: python3.11 with ENDFtk compiled from source on Ubuntu 20.04 with gcc 9.4.0.
Am I misunderstanding the ENDFtk API or could this be a bug?
The text was updated successfully, but these errors were encountered: