Bug 394676

Summary: Crash in circle-segment intersections when one point is "First end point" property of segment
Product: [Applications] kig Reporter: Maurizio Paolini <maurizio.paolini>
Component: generalAssignee: David E. Narvaez <david.narvaez>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 18.04.2
Sentry Crash Report:
Attachments: kig construction short of last action

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