Valentina crashes when changing seam allowance on a curve segment

Issue #837 resolved
Ronan Le Tiec created an issue

A pattern that I could still open a few days ago causes now Valentina to crash when opening. I could narrow it down to a specific detail in the pattern which has curves intersecting and seam allowances with values different than "CurrentSeamAllowance".

I upload here the val-file without the values of the seam allowance causing the crash, so that it's able to open. The same crash can be reproduced when editing the value of the seam allowance of certain points.

Open the pattern, go to "Details", edit the Seam allowance of the Detail called "Passe" and change the seam allowance of the Node "A51" (after and before have the same crash behaviour) for instance to "CurrentSeamAllowance+1", then Apply or Ok. The crash should happen then.

"ASSERT failure in QVector<T>::at: "index out of range", file /opt/Qt/5.9.2/gcc_64/include/QtCore/qve"

The interesting bits of the call stack:


7 QVector<QPointF>::at qvector.h line 422

8 VPiecePath::CurveSeamAllowanceSegment vpiecepath.cpp line 1051

9 VPiece::SeamAllowancePoints vpiece.cpp line 404


I use the latest code on develop.

Comments (7)

  1. Ronan Le Tiec reporter

    I also realised that weird stuff is happening with the seamallowance in some of the Details, which didn't happen before.

    See :

    • Test Vorderhose, near Point A14
    • Vorderhose, near point A17
    • VTascheR, near points A56 and A57
    • VTasche L1, near point A57
    • VTasche L3, near point A56 and A61
    • VTasche L2 has its entire surface with the dotted background like for the seam allowance.

    I upload a screenshot showing those places.

    If you need me to, I can try to make a simpler pattern were these mistakes occur.

  2. Roman Telezhynskyi repo owner

    Fixed issue #837. Valentina crashes when changing seam allowance on a curve segment.

    I made a mistake switching to C++11 range-based loops here.

    → <<cset a0d47cda8c34>>

  3. Ronan Le Tiec reporter

    Yes I confirm, everything is back to normal, no more crashing and the seam allowances are correct again. Awesome, thanks!

  4. Roman Telezhynskyi repo owner

    Yes, i knew something bad can happen, commit with changes was very big. But i decided to take a risk. C++11 range-based loops look better and more efficient.

    Awesome, thanks!

    Thank you for reporting this bug!

  5. Log in to comment