Skip to content

Graceful exit on broke step file #1521

Open
@qbamca

Description

@qbamca

We run Flask app that converts step files to stl for further processing. When we were testing the app we noticed that when supplied with manually broken step file, the cadquery library crash gracefully our Flask app. No Error is raised. We tried catching SystemExit with no avail. The app just stops.
I've traced cadquery inner works up to this point:
image
at which the reader.TransferRoot(i + 1) closes our app.
I don't know how to trace it further inside OCP, so I can't investigate further.

The problem is that, such files can close our service, we have no means to prevent it and results in service downtimes while it's being restarted.
We need to find a way to prevent it from closing the app.

To Reproduce

repro repo
It's a flask app. Run main.py and post file BROKE_FILE.STEP

Backtrace

no backtrace

image

Environment

OS:
Ubuntu 22.04.2 LTS
python 3.10.12
cadquery v2.3.1
cadquery is installed using pip.

Using: Python interpreter

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions