Segmentation fault using rhino3dm in blender on linux

hi there,

I got a segmentation fault using rhino3dm in blender on Ubuntu 24.04 . Tested with blender 4.2 and 4.5
There is already an issue for import_3dm: Segfault when loading model · Issue #140 · jesterKing/import_3dm

Just using rhino3dm in blender to load a file has the same result. Using it in python on linux seems to work fine.

Test file and script:
mesh_plane.3dm (19.7 KB)

import rhino3dm
# adjust file path accordingly
f = rhino3dm.File3dm.Read("mesh_plane.3dm")

I came across this while writing test cases for import_3dm.

@nathanletwory @fraguada Hope you are the right people to ping. Would be great if one of you could take a look at this.

Thanks!

this works for me, with the only modification of full path:

import rhino3dm

# adjust file path accordingly

f = rhino3dm.File3dm.Read("C:/Users/xxx/Desktop/_temp/mesh_plane.3dm")

on Windows 11, Python 3.13.1, rhino3dm 8.17.0

Thanks for looking into this.
It works fine for me on Windows, Mac, blender on win and mac as well as python on linux, just not within blender on linux.

rhino3dm in blender on linux is what we use for automated testing in our pipeline.

@nathan is taking a well deserved break. I’ve made a note to discuss this with him when he gets back.

1 Like

Judging on the issue reported on import_3dm it looks like symbols are getting mixed up. There is no reason why reading a mesh tries to use openvdb, as far as I know we don’t have openvdb support in rhino3dm. @fraguada do you know if that could be somehow sidestepped?

Checking in, have you had time to look into this yet? Any idea if/how this can be fixed?

Just checked and confirmed this is still happening. I used blender 5.0.1 and latest rhino3dm available through pip (8.17.0).
Would be great to get some insights and ideally, of course, get it fixed.

I have no new information, I was hoping @fraguada would have more info on why this usage of openvdb would happen.

1 Like

We do not use openvdb in rhino3dm

There still is something going on with how rhino3dm code is compiled and linked that on Linux in Blender the OS maps it to openvdb.

@nathan We think that perhaps hiding the zlib methods in rhino3dm might help to solve this issue and would not require redefining zlib method names. What do you think. Here is the PR made by @stevebaer attempt to make zlib functions hidden by sbaer · Pull Request #714 · mcneel/rhino3dm · GitHub

CC: @jesterking

@fraguada I pulled the latest dev, removed build and had a clean build python setup.py bdist_wheel. This new build still crashes in Blender with the same stacktrace.

Looks like I’ll keep building rhino3dm manually with the renamed symbols for now.

Latest import_3dm v0.0.18 ( Release v0.0.18 · jesterKing/import_3dm · GitHub ) uses the manually built rhino3dm and works great.

1 Like

@jesterking
Ok. I tried a few other things to suppress exporting symbols and I see a big difference between the branch you just tried vs the dev branch with the changes I just merged. I hope that does the trick.

1 Like

@fraguada the newest patch you made appears do have done the trick!

1 Like