Out of memory crash Brep.CreateOffsetBrep


In our geometry processing pipeline I got an out of memory dialog / crash. The cause was a Brep.CreateOffsetBrep with terrible input.

As a means to prevent the crashing I made this example script to run on the file in the zip.

Note that within the pipeline I got an out of memory dialog yet with this script I get a crash.

culprit.zip (5.1 MB)
test_script.py (208 Bytes)

Hope this helps.

Are you surprised? What is your expected result?

I’d log this as a bug, but…

– Dale

Hi Dale,

We are processing imported geometry. I do try to sanitize the input as much as possible but sometimes some of this still slips through. This brep is the result of 2 consecutive offsets. It got worse each step.

So it’s not that I expect anything good to come out. But rather that Rhino does not crash. My thinking was you would want to know about this in order to maybe prevent the crash and catch the issue more elegantly.


Hi @Willem,

If you can provide the original geometry and the steps it took to make the mess and the out-of-memory condition, I’ll get it on the list of things to fix.

– Dale

Hi @dale

I finally found some time to compose a compact repeatable setup:

crash_repeat.3dm (2.0 MB)
run the script below on the file above
crash_repeat.py (1010 Bytes)

The input brep was imported from another 3dm file that I cannot disclose.
Let me know if you think I could provide additional info.


Thanks @Willem, I’ve logged the issue.


– Dale