KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
411 stars 35 forks source link

[CRYPTIC]: Modeling command failed: [] #3887

Closed paultag closed 1 month ago

paultag commented 1 month ago

Paste minimal KCL source that produces a cryptic error

startSketchOn("XY")
   |> circle([0, 0], 1, %)
   |> hole(circle([0, 0], 3, %), %)
   |> extrude(1, %)
   |> startSketchOn(%, 'END')
   |> circle([0, 0], 2, %)
   |> hole(circle([0, 0], 4, %), %)
   |> extrude(1, %)

Expected Behavior

Two extruded rings

Additional Context

No response

jessfraz commented 1 month ago

this is a lot like this bug i filed in engine https://github.com/KittyCAD/engine/issues/2599

idk how these empty error vecs come back but its no bueno and in the case of my issue, @benjamaan476 says the extrude isnt even throwing an error

jessfraz commented 1 month ago

anyways somethign for someone to dive into on the rust / c++ interface when they have cycles

basically rust thinks the c++ command is failing... but c++ is returning no error strings, so like did it really fail?

benjamaan476 commented 1 month ago

I don't know if we use it anymore but I also noticed that the pub success: Option<bool> of WebSocketResponse is none as well when this happens

jessfraz commented 1 month ago

we def use that

jessfraz commented 1 month ago

i think something is causing a rust Result in the cpp interop to return an error but its empty

jessfraz commented 1 month ago

yeah after talking w chalmers last time basically the engine endpoint was returning a false bool for the success of the function, like for example the extrude endpoint in cpp returns a bool, and so engine says it failed when in fact it must not have but there were no errors, so we should track that down

jessfraz commented 1 month ago

it looks like right here we send no errors https://github.com/KittyCAD/engine/blob/055d5809316e9553a371ed9dbfda548a552b1521/cpp/engine/scene/object.cpp#L663