1

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.

saeranv's avatar
407
saeranv
asked 2018-08-19 01:24:45 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2018-08-19 19:34:57 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

2

Not sure but you can try to follow that post. Or maybe that one.

Avi's avatar
4.3k
Avi
answered 2018-08-20 02:46:10 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks Avi! I've read through those posts, and tried out the various solutions but none are working. My situation is a bit unique since everything is fine in the OpenStudio app, the problem is only being encountered when I'm attempting to access the file programmatically via Python.

However, in those posts it looks like there is a github issue that is already opened for it (one of 564...) so I posted my problem there, to see if it catches any of the developer's attention.

saeranv's avatar saeranv (2018-08-20 09:17:06 -0500) edit

(Exceeded max char length, so continuing here):

Additionally, when I have time I think I'll try and load the osm using C#.

saeranv's avatar saeranv (2018-08-20 09:17:55 -0500) edit
add a comment see more comments
0

Solved! I managed to fix this by downloading and using the OpenStudio API from the latest release 2.6.0

saeranv's avatar
407
saeranv
answered 2018-08-21 19:27:34 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments