Ticket #1704 (closed defect: fixed)
degenerate conic5 doesn't work
| Reported by: | michael | Owned by: | michael |
|---|---|---|---|
| Priority: | medium | Milestone: | GeoGebraWeb Alpha 2 |
| Component: | GeoGebraWeb | Keywords: | |
| Cc: | Estimate (h): | 0 | |
| Progress (%): | 100 |
Description (last modified by michael) (diff)
http://www.geogebra.org/web/milestones/conics.html
Drag the 5 points into eg
- 2 parallel lines
- square plus one point in middle
- 1 line
This one kills the browser :)
Attachments
Change History
comment:2 Changed 4 months ago by michael
- Priority changed from major to critical
- Component changed from General to GeoGebraWeb
comment:4 Changed 4 months ago by michael
NOT a bug in Arc2D, changing to Sun Arc2D makes no difference
comment:5 Changed 4 months ago by michael
Some degenerate ones work, see screenshot. However filling is not correct
comment:6 Changed 4 months ago by michael
http://www.geogebra.org/web/test42/?f=_degenerateConics.ggb has missing objects
comment:7 Changed 4 months ago by arpad
I'm at [15191], and my browser doesn't freeze with my local copy. It only freezed when I run web/test42. The cases mentioned at the ticket description all work except if 4-5 points are on a line, that works too but doesn't show the (double) line. I'm going to test further what is the problem.
comment:8 Changed 4 months ago by arpad
So these are the actual errors:
- five points on one line should show one (double) line (_conics.ggb)
- moving the mouse inside a conic far from its outline selects the conic anyway, even for two areas of hyperbolas (_conics.ggb)
- filling of two lines is not correct, the others OK to me (_conicsFilled.ggb)
- _degenerateConics.ggb should show a double line (single line on the top is intentionally not shown), and some other points and lines (these may not show because the points are outside the screen)
comment:9 Changed 4 months ago by michael
Almost correct. For
http://www.geogebra.org/web/milestones/ggbFiles/_degenerateConics.ggb
the missing points and objects are not off screen, they are just missing :)
comment:10 Changed 4 months ago by arpad
I've changed _degenerateConics.ggb so that I deleted the conic below; so it became less - and it freezes Firefox. The construction is quite complex (has a macro and also a Python script when edited) so I'm going to try what happens with a similarly looking construction but when I create it again.
comment:11 Changed 4 months ago by michael
I can't see any Python in the xml. I've removed the macros (and saved from 4.0 to ensure no Python :)
http://www.geogebra.org/web/test42/?f=_degenerateConics2.ggb
comment:12 Changed 4 months ago by arpad
Yes, I have did the same, but had the freeze. Then I realized that the JavaScript was wrong: for some reason, it doesn't accept empty ggbOnInit javaScript, only that which was provided by us when saving. So the freezing problem is not part of this ticket.
Changed 4 months ago by arpad
- Attachment _degenerateConics_v2.ggb added
This freezes Firefox in [15194]; I have put it here for reference
Changed 4 months ago by arpad
- Attachment _degenerateConics2_Arp.ggb added
_degenerateConics_v2.ggb should look like this (created it after File New)
comment:13 Changed 4 months ago by arpad
It is still a question why the points are not shown if I change the JavaScript of _degenerateConics_v2.ggb to the JavaScript of _degenerateConics2_Arp.ggb. To be continued (tomorrow)...
comment:14 Changed 4 months ago by arpad
I suspect that the problem may be in some unimplemented methods (see #1735). I have previously thought that it might be Graphics2D.getClip/setClip, but now I guess it might be EuclidianView.updateSize. EuclidianView.drawActionObjects and EuclidianView.setBackground and EuclidianView.clearView are also interesting, need to be implemented.
Changed 4 months ago by arpad
- Attachment _degenerateConics_v4.ggb added
I'm searching for the difference between this and _degenerateConics_Arp.ggb
comment:15 Changed 4 months ago by arpad
The points below in _degenerateConics_v4.ggb are not showing because of other construction elements; because if I leave just them, they will be showing, and I found that other elements than construction elements made no difference.
comment:16 Changed 4 months ago by arpad
With much testing, I have found that the conic K,L,M,N,O is responsible for the not showing of the next elements: so if I delete the conic K,L,M,N,O (command and geo) then it will be OK. It is two parallel lines; so I have to take care of that.
comment:17 Changed 4 months ago by arpad
By debugging, I have found the lines where the error is; in DrawConic.java (line 384):
((geogebra.common.awt.Area)shape).exclusiveOr(lineToGpc(drawLines[1])); // FIXME: buggy when conic(RW(0),RW(0))=0
The error is not with the typecasting of the shape, because I have tried with putting it into a new variable as well. The error is in geogebra.web.kernel.gawt.Area.exclusiveOr...add.
comment:18 Changed 4 months ago by michael
Caused by: java.lang.ArrayIndexOutOfBoundsException: null
at java.lang.System.arraycopy(Native Method)
at geogebra.web.kernel.gawt.Area.intersectPolygon(Area.java:699)
at geogebra.web.kernel.gawt.Area.intersect(Area.java:263)
at geogebra.web.kernel.gawt.Area.exclusiveOr(Area.java:291)
at geogebra.web.awt.Area.exclusiveOr(Area.java:93)
at geogebra.common.euclidian.DrawConic.updateLines(DrawConic.java:384)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 74
at geogebra.web.kernel.gawt.Area.subtractPolygon(Area.java:868)
at geogebra.web.kernel.gawt.Area.subtract(Area.java:279)
at geogebra.web.awt.Area.subtract(Area.java:83)
at geogebra.common.euclidian.DrawConic.updateLines(DrawConic.java:389)
at geogebra.common.euclidian.DrawConic.update(DrawConic.java:241)
at geogebra.common.euclidian.AbstractEuclidianView.update(AbstractEuclidianView.java:1244)
at geogebra.common.kernel.Kernel.notifyUpdate(Kernel.java:3480)
at geogebra.common.kernel.geos.GeoElement.update(GeoElement.java:3063)
at geogebra.common.kernel.kernelND.GeoConicND.update(GeoConicND.java:1002)
comment:19 Changed 4 months ago by arpad
So if I set the shape to null in updateLines, it works, but I don't know how to produce the final shape.
comment:20 Changed 4 months ago by michael
- Status changed from new to assigned
- Owner changed from gabor to michael
comment:21 Changed 4 months ago by michael
- Owner changed from michael to arpad
- Progress (%) changed from 0 to 90
- Priority changed from critical to medium
All crashing / disappearing objects fixed:
http://www.geogebra.org/trac/changeset/15217
Filling for double-lines still not working
comment:23 Changed 4 months ago by michael
- Status changed from assigned to closed
- Progress (%) changed from 90 to 100
- Resolution set to fixed
