System.ApplicationException: Access violation - no RTTI data!
Some background: I've recently been experimenting with using pythonnet to reference OpenStudio.dll, and then load existing osm files in cPython. Things have been working beautifully, I'm able to open the osm file, and reference OS:Surfaces etc in Python. I use Honeybee to generate my osm files.
Today I ran into this problem while loading an osm file that I had to translate from a gbxml file.
Traceback (most recent call last): File "C:\Users\user\Anaconda2\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Users\user\Anaconda2\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\saeran\master\git\astrobot\astrobot\osm_parse.py", line 218, in <module> osm, ops = main(osm, ops) File "C:\saeran\master\git\astrobot\astrobot\osm_parse.py", line 179, in main outsrf_mtx, insrf_mtx = get_surfaces_mtx(osm) File "C:\saeran\master\git\astrobot\astrobot\osm_parse.py", line 92, in get_surfaces_mtx space_srfs = space_array[i].get_surfaces() System.ApplicationException: Access violation - no RTTI data! at OpenStudio.Space.get_surfaces()
The code is occuring while I am trying to access the surfaces in a space the using space.surfaces or space.get_surfaces() methods.
Also, I can open and run a simulation on this file in the OpenStudio application fine. It just seems when I try to interact with it using the API I run into trouble. I'm using OpenStudio.dll in openstudio-2.3.0, to work with the osm file in Python, as well as run it in the application.
Anyone have any idea of what's going on?
ETA: Edits for clarity.