DSchroer / dslcad

DSLCad is a programming language & interpreter for building 3D models.
https://dslcad.com
GNU Lesser General Public License v2.1
470 stars 14 forks source link

Crash to desktop with specific file #5

Closed benthillerkus closed 1 year ago

benthillerkus commented 1 year ago
var column = circle(radius=5.0, center=true) -> shape extrude(z=10) -> shape fillet(radius=0.2);
difference(left=column, right=(column -> shape translate(x=1)));
kiscad commented 1 year ago

What's the platform you're working on?

benthillerkus commented 1 year ago

x64 Windows 10 with an NVidia GPU.

Is it not reproducible on other systems? Tbh I would have expected the culprit to be right=(...) being syntax I made up

DSchroer commented 1 year ago

So I have successfully reproduced the issue. It seems to be windows specific but also occurs under wine. Thank you for the report, I will try to get a fix out soon.

DSchroer commented 1 year ago

Interesting enough building a windows version locally results in it working. Seems to be something broken with the CI setup that builds the pre-built versions.

DSchroer commented 1 year ago

Tbh I would have expected the culprit to be right=(...) being syntax I made up

That syntax seems fine. You can omit the () around it since it gets evaluated as an single argument already.

stolksdorf commented 1 year ago

Also getting crashes right to desktop with some files, can't seem to figure out the culprit. (x64 Windows 10 with an NVidia GPU.)

Example gear.ds -> Crash Example fidget_cube.ds -> Works Example aerogrind_funnel.ds -> Works Example gopro_adapter.ds -> Crash

cube(x=10, y=10, z=10)->shape fillet(radius=10); -> Crash cube(x=10, y=10, z=10)->shape fillet(radius=9); -> Works

DSchroer commented 1 year ago

@benthillerkus I did some work on the windows build pipeline. Can you try your sample on the latest pre-release? https://github.com/DSchroer/dslcad/releases/tag/v0.0.2-pre.5

On my end all of the examples work now.

DSchroer commented 1 year ago

You will need to adjust the code slightly.

circle(radius=5.0, center=true)

should now be:

circle(radius=5.0) ->shape center()
DSchroer commented 1 year ago

@stolksdorf Thanks for all the reports. Found another issue with how we handle errors internally. That is fixed in prerelease 6 now.

https://github.com/DSchroer/dslcad/releases/tag/v0.0.2-pre.6

Im going to close the issue now as the crashes are resolved. The error message still isnt great but that goes into improvement area.