Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

System.ApplicationException: Access violation - no RTTI data!

asked 2018-08-19 01:24:45 -0500

saeranv's avatar

updated 2018-08-19 19:34:57 -0500

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\", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Users\user\Anaconda2\lib\", line 72, in _run_code exec code in run_globals File "C:\saeran\master\git\astrobot\astrobot\", line 218, in <module> osm, ops = main(osm, ops) File "C:\saeran\master\git\astrobot\astrobot\", line 179, in main outsrf_mtx, insrf_mtx = get_surfaces_mtx(osm) File "C:\saeran\master\git\astrobot\astrobot\", 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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-08-21 19:27:34 -0500

saeranv's avatar

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

edit flag offensive delete link more

answered 2018-08-20 02:46:10 -0500

Avi's avatar

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

edit flag offensive delete link more


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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer


Question Tools

1 follower


Asked: 2018-08-19 01:24:45 -0500

Seen: 265 times

Last updated: Aug 21 '18