Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bunny crash #10

Open
gabrielle-ohlson opened this issue Mar 25, 2021 · 7 comments
Open

bunny crash #10

gabrielle-ohlson opened this issue Mar 25, 2021 · 7 comments
Labels

Comments

@gabrielle-ohlson
Copy link
Contributor

gabrielle-ohlson commented Mar 25, 2021

I was met with the following assert() failure when attempting to save the traced stitches generated using the bunny.obj file:

Assertion failed: vertices[vertices[at].col_in[0]].col_out[0] != -1U && vertices[vertices[at].col_in[0]].col_out[1] != -1U, file ak-trace_graph.cpp, line 152

here's the full command I ran:

./interface.exe obj:../autoknit-tests/models/bunny.obj constraints:../autoknit-tests/constraints/bunny.cons peel-step:-1 save-traced:bunny.st

(note: it ran for a long time and outputted a good deal of messages before crashing with an error number [9])

@gabrielle-ohlson
Copy link
Contributor Author

gabrielle-ohlson commented Mar 25, 2021

fiddled with obj-scale: and stitch-width:/stitch-height: args and now thinking the issue had to do with that...

with the command:

./interface.exe obj:../autoknit-tests/models/bunny.obj constraints:../autoknit-tests/constraints/bunny.cons stitch-width:2.0 stitch-height:2.0 peel-step:-1 save-traced:bunny.st

the program runs for a long time again (still running, will update, but hasn't crashed yet) <—UPDATE: just finished running (took ~30-40 minutes), and bunny.st was successfully generated.

and then with the command:

./interface.exe obj:../autoknit-tests/models/bunny.obj constraints:../autoknit-tests/constraints/bunny.cons obj-scale:0.5 save-traced:bunny.st

^TODO: try this <—UPDATE: just finished running (took ~1 min); bunny.st was also successfully generated with this combination of args.

@gabrielle-ohlson
Copy link
Contributor Author

might be worth adding documentation on which obj-scale and stitch- values work best with each example model (see autoknit-tests issue 1)

@vid8687
Copy link
Contributor

vid8687 commented Mar 25, 2021

obj-scale and stitch-width/height values are based on the fabrication setup, the object is measured in mms and stitch-width and height values in mms should be measured for a half-gauge swatch. (If the system fails for any combination of these values, it is a bug)

@vid8687 vid8687 added the bug label Mar 25, 2021
@ixchow
Copy link
Member

ixchow commented Mar 25, 2021

▶️ If the system fails for any combination of these values, it is a bug ◀️

(I strongly agree; well said, @vid8687)

@gabrielle-ohlson
Copy link
Contributor Author

gabrielle-ohlson commented Mar 25, 2021

sounds reasonable to be.

this command with stitch-width:2.0 stitch-height:2.0 just finished running (took probably 30-40 minutes), but it did successfully generate a bunny.st file.

UPDATE: obj-scale:0.5 also worked (and only took ~1 min)

so looks like it does work for some scale/stitch combinations, but not all.

@vid8687
Copy link
Contributor

vid8687 commented Apr 14, 2021

I fixed the tracing code to avoid tucking on empty needles that fixes this (haven't extensively tested this, so not closing yet), @gabrielle-ohlson does the most recent version of the code fix all the problematic cases you found?

@ixchow
Copy link
Member

ixchow commented Oct 26, 2021

The code still hits an assertion when running:

dist/interface obj:../autoknit-tests/models/bunny.obj load-constraints:../autoknit-tests/constraints/bunny.cons peel-step:480

(Use peel-step:479 to see the model just before the assert.)

The assertion is:

interface: ak-peel_slice-euclidean.cpp:221: void ak::peel_slice(const ak::Parameters&, const ak::Model&, const std::vector<std::vector<ak::EmbeddedVertex> >&, ak::Model*, std::vector<ak::EmbeddedVertex>*, std::vector<std::vector<unsigned int> >*, std::vector<std::vector<unsigned int> >*, std::vector<bool>*): Assertion `level_chains[c].empty()' failed.

Looks like this is a different error, but causing the same problem (bunny not working).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants