Bug 394676 - Crash in circle-segment intersections when one point is "First end point" property of segment
Summary: Crash in circle-segment intersections when one point is "First end point" pro...
Status: RESOLVED FIXED
Alias: None
Product: kig
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: David E. Narvaez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-25 16:29 UTC by Maurizio Paolini
Modified: 2018-06-02 12:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 18.04.2


Attachments
kig construction short of last action (1.92 KB, application/x-kig)
2018-05-25 16:29 UTC, Maurizio Paolini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maurizio Paolini 2018-05-25 16:29:04 UTC
Created attachment 112869 [details]
kig construction short of last action

I experience a crash with the following construction:
- create a segment and hide its endpoints
- create the first end point (First end-point property of segment)
- create a circle with center off the segment through the first end point
- move the segment such that the circle has a second intersection with the segment
- create the intersections between circle and segment

--> kig crashes

The attachment contains this construction excluding the last "intersection"
Comment 1 Maurizio Paolini 2018-05-25 16:38:01 UTC
The problem is located in objects/line_imp.cc
in function AbstractLineImp::isPropertyDefinedOnOrThroughThisImp

It sounds that the correct setup should be:

1. reduce the number of properties taken into account in
AbstractLineImp::isPropertyDefinedOnOrThroughThisImp to
the first two (they should both return false)

2. move the remaining 5 (5 is the right value!) in a new function
SegmentImp::isPropertyDefinedOnOrThroughThisImp, they should return,
in this order, false, true, true(?), true, true

The meaning of this function is to instruct kig if the new object is by definition geometrically contained in the parent, or the other way around.

We should also check the same method for the other object inherited from
AbstractLine (Ray and Line, I guess)
Comment 2 Maurizio Paolini 2018-05-26 23:33:29 UTC
I also note that RayImp has two properties:
- support
- end-point-A

so we should also add the method RayImp::isPropertyDefinedOnOrThroughThisImp
returning values true(?), true
[The returning value of the first should not make any difference]
Comment 3 Maurizio Paolini 2018-06-01 15:41:27 UTC
Fixed in master with commit
https://cgit.kde.org/kig.git/commit/?id=f324508e822ddcafab26d90fd9bb685e56edaab8