Created attachment 123119 [details] Test file SUMMARY The Magnetic Selection Tool can crash immediately after setting a control point with the attached test file. STEPS TO REPRODUCE 1. Open the test file and choose the the Magnetic Selection Tool 2. Set the initial control point close to the beginning of the stroke in the bottom left OBSERVED RESULT Freeze and crash after trying to place a control point. Depending on where the first control point is set it can happen immediately when placing the first one, or later on. See the attached backtrace. EXPECTED RESULT Normal tool operation. SOFTWARE/OS VERSIONS Tested in build from master (git c870d77)
Created attachment 123120 [details] gdb backtrace
Oh, I should add I left all the default values in the tool options.
Not required, I got the problem, :)
Git commit 9df578ddb13c9f4235a0bbd318407fa69a5e6716 by Kuntal Majumder. Committed on 10/10/2019 at 10:27. Pushed by kuntalmajumder into branch 'master'. Checks the bounds before proceeding for calculating the edge M +10 -4 plugins/tools/selectiontools/KisMagneticWorker.cc M +15 -5 plugins/tools/selectiontools/KisToolSelectMagnetic.cc https://invent.kde.org/kde/krita/commit/9df578ddb13c9f4235a0bbd318407fa69a5e6716
Git commit 6310d2d7ad293f20a758ac80b84d95a90fa6c06b by Kuntal Majumder. Committed on 10/10/2019 at 16:37. Pushed by kuntalmajumder into branch 'master'. Switched exactBounds with defaultBounds for calculating the right number of tiles M +4 -12 plugins/tools/selectiontools/KisMagneticWorker.cc https://invent.kde.org/kde/krita/commit/6310d2d7ad293f20a758ac80b84d95a90fa6c06b