Crash from Formula Wizard

I’m not sure how to describe other than a formula error in the Formula Wizard crashes the system.

I’m able to duplicate this with the following steps:

  1. Create brand new file
  2. Add a new piece
  3. Add line connecting to A. When the Point at Distance and Angle dialog box opens up, then enter any kind of formula you but end it with – (two minus signs). What I was trying to enter was Hip_Arc_Back / 2 - 0.5, only I hit the minus key a second time instead of 0. The system crashes on the 2nd minus.

Alternate step 3: Use the Edit Length dialog instead. It crashes in the same place in the formula.

Other notes: ± and *- also kill it .

Strangely enough, it doesn’t have a problem with ++, -+, -*. It appears to have a problem with minus being last althought I didn’t test all the combinations.

Thank you very much, @sandmanmax. I’m sure @Douglas will be along shortly to reply to you.

trying the num-- on my debianVM with the Nov 11 AppImage

Point at Distance and Angle :arrow_forward: Enter -- at the end of the formula line :arrow_forward:

DEBUG:Point label: A1
DEBUG:  Code: 2 ( "Unexpected end of expression at position 9" )
Segmentation fault (core dumped)

& Seamly2D is no longer open. Reopen Seamly2D for more experimenting.

entered -+ at the end of the formula, & the terminal reads this error, but it doesn’t crash:

DEBUG:
Math parser error:
 --------------------------------------
 Message:      "Unexpected operator \"+\" found at position 9" 
 Expression:   "4.723071-+------ " 
 --------------------------------------

(actually, that one was after I added a whole string of dash.)

ETA: Same thing happens with the Arc tool

:unicorn:

1 Like

Hi @sandmanmax!
Thanks for pointing this out to us.
Please add this as an issue on our github repo.
You’ll need to create a github account if you don’t already have one.
Thanks!

1 Like

Yup, I’ll take care of it as soon as I can.

2 Likes

I created this bug issue: BUG: calculating formula for length in dialog 'Point at distance and angle' crashes · Issue #758 · FashionFreedom/Seamly2D · GitHub

(should be the same bug)

3 Likes

Confirmed. Same (existing) error on Windows. Errors happens on any formula when the “minus” char is entered immediately after any invalid char. Surprised it’s gone this long without a report.

I have a fix, will make a PR layer this afternoon.

Update: Just did a last minute check after pulling in changes from develop before making a PR. No crash. :slight_smile:

qmu

6 Likes

Thanks for taking care of this.

2 Likes

PR was merged, should be in Sunday’s release.

3 Likes