Bug 234579 - math/geogebra: angles broken
Summary: math/geogebra: angles broken
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on: 234689
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-02 19:09 UTC by Tobias C. Berner
Modified: 2019-02-09 19:22 UTC (History)
5 users (show)

See Also:
tcberner: maintainer-feedback+
tcberner: maintainer-feedback?


Attachments
geogebra - Temporary fix for angles (337 bytes, patch)
2019-01-07 12:08 UTC, Lorenzo Salvadore
no flags Details | Diff
gegoebra - Temporary fix for angles (337 bytes, patch)
2019-01-07 12:12 UTC, Lorenzo Salvadore
no flags Details | Diff
geogebra - Temporary angles fix (542 bytes, patch)
2019-01-07 12:24 UTC, Lorenzo Salvadore
salvadore: maintainer-approval? (uzsolt)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias C. Berner freebsd_committer freebsd_triage 2019-01-02 19:09:25 UTC
Moin moin 

With GeoGebra 5.0.513.0 28 November 2018 Java 1.8.0_192-64bit, "most" angles are calculated and shown to be 90°, or multiples thereof, or completely unrelated to the points measured.

For example put points at A(0,0), B(1,0) and C(1,1). The angle(A,C,B) according to Geogebra now is 57.3° which is only slightly completely wrong :)

See: https://people.freebsd.org/~tcberner/images/geogebra_bug.png


This must have been introduced by some update of Java/Geogebra in December, as it was working fine previously.


mfg Tobias
Comment 1 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-03 19:26:25 UTC
Your case works for me (angle is 45 degrees). Could you share your ggb file too?

GeoGebra 5.0.513.0 28 November 2018 Java 1.8.0_181-64bit
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2019-01-04 05:43:49 UTC
Moin moin

It's a just new file with the three points, as an example. 
It happens on also on my Notebook.


mfg Tobias
Comment 3 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-04 08:05:39 UTC
(In reply to Tobias C. Berner from comment #2)
Could you test my ggb?
http://freebsd.uzsolt.hu/temp/geogebra_bug.ggb

My result: http://freebsd.uzsolt.hu/temp/geogebra_bug.png
Comment 4 Tobias C. Berner freebsd_committer freebsd_triage 2019-01-04 08:45:31 UTC
It's not an issue with a specific file, but the calculations in general being wrong. Be it new or existing geogebra files. 


Mfg Tobias
Comment 5 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-04 08:50:33 UTC
(In reply to Tobias C. Berner from comment #4)
I can't reproduce it.
Comment 6 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-04 08:52:10 UTC
(In reply to Tobias C. Berner from comment #4)
Does my ggb file works well at you? Does it display 45 or something else?
Comment 7 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-04 11:19:01 UTC
I confirm the bug too as described in the bug description.

Zsolt Udvari: observe that you are not testing the same version as us. We are working with GeoGebra 5.0.513.0 28 November 2018 Java 1.8.0_192-64bit, while you are working with GeoGebra 5.0.513.0 28 November 2018 Java 1.8.0_181-64bit. Maybe the distfile changed withouth anyone noticing it: in that case a PORTREVISION bump would be needed.
Comment 8 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-04 11:46:19 UTC
(In reply to Lorenzo Salvadore from comment #7)
I built the geogebra package yesterday (I'm using quarterly, the package is here: http://freebsd.uzsolt.hu/test_pkg/geogebra-5.0.513.0.txz). I think the distfiles are same (because of math/geogebra/distfile hash).

The differences between my and your system is the java/openjdk8's version. I'm using 8.181.13 and you 8.192.26 (check the different java-version in geogebra's output).

Now I'll test the newest GeoGebra (5.0.518.0).
Comment 9 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-04 11:53:27 UTC
(In reply to Zsolt Udvari from comment #8)

You're right, sorry, I misread: it's the java version that is different indeed. Then probably you could reproduce the bug using the same java version. But of course, if the new Geogebra version works fine for everyone, that's better.
Comment 10 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-04 12:10:45 UTC
(In reply to Lorenzo Salvadore from comment #9)
I tested.

The GG 5.0.513.0 works well with OpenJDK 8.181.13 but works wrong with OpenJDK 8.192.26.
The GG 5.0.518.0 (newest version, package is here: http://freebsd.uzsolt.hu/test_pkg/geogebra-5.0.518.0.txz) works well with OpenJDK 8.181.13 but works wrong with OpenJDK 8.192.26.

Conclusion: maybe the newest OpenJDK has a bug?
I created a "bug report" at Geogebra too (https://help.geogebra.org/topic/bad-angle-creation).
Comment 11 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-06 18:32:43 UTC
It seems it's problem of OpenJDK - its version or build method, I don't know.
https://help.geogebra.org/topic/bad-angle-creation#comment-253028
Comment 12 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-06 18:52:23 UTC
(In reply to Zsolt Udvari from comment #11)

I see the Geogebra port does not build anything: NO_BUILD is defined.

If I understand well how the port is made, you compiled the software and then uploaded the result somewhere. I do not have any experience with compiling java programs, but I guess you used OpenJDK in the build process and maybe if you compiled Geogebra again with the new version of OpenJDK the issue could be solved.
Comment 13 Michael Osipov 2019-01-06 18:58:59 UTC
Though, this is absolutely not related to this port. I started noticing that something is fishy with the newest OpenJDK 8. I cannot attach to a running JVM in debug options (mvn process) from Eclipse on Windows anymore. It does work for OpenJDK 7 though. I will try to revert and see wether this works.
Comment 14 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-07 07:12:16 UTC
(In reply to Lorenzo Salvadore from comment #12)
Sorry, you've right.

The package creation in this case is very simple: copy some files to correct directory (do-install target).
Comment 15 Jonathan Chen 2019-01-07 07:55:07 UTC
I think there's a general problem with the java.lang.Math, as noted by Thomas Gude in:

https://lists.freebsd.org/pipermail/freebsd-java/2019-January/012550.html
Comment 16 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-07 12:08:55 UTC
Created attachment 200863 [details]
geogebra - Temporary fix for angles

Here is a temporary fix for the bug.

It makes geogebra use openjdk7 instead of openjdk8: I tested successfully the patch.
Comment 17 Michael Osipov 2019-01-07 12:11:46 UTC
(In reply to Lorenzo Salvadore from comment #16)

Why don't you downgrade to 181 and say "pkg lock openjdk8"?
Comment 18 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-07 12:12:32 UTC
Created attachment 200864 [details]
gegoebra - Temporary fix for angles

Sorry, I had inverted the order of the files in the diff command. Now it should be fine.
Comment 19 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-07 12:15:28 UTC
(In reply to Michael Osipov from comment #17)

Because for new users only last version of openjdk8 is directly available for installation in the ports tree. Openjdk7 instead is easily available for everyone. But indeed, your solution would work as well.
Comment 20 Lorenzo Salvadore freebsd_committer freebsd_triage 2019-01-07 12:24:22 UTC
Created attachment 200865 [details]
geogebra - Temporary angles fix

I've added a PORTREVISION bump, in case the patch was to be committed (initially I thought it as a patch to be manually applied, but maybe it is better to committ it, in case the openjdk8 bug is long to correct).
Comment 21 Zsolt Udvari freebsd_committer freebsd_triage 2019-01-07 16:23:37 UTC
(In reply to Lorenzo Salvadore from comment #20)
If the bug is in openjdk would better to downgrade openjdk8 and increase its PORTEPOCH - or fix its bug :)
If in some days doesn't change anything in bug #234689 should use your patch.
Comment 22 Zsolt Udvari freebsd_committer freebsd_triage 2019-02-09 14:43:45 UTC
It seems the openjdk8 problem is solved: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234689#c7
Could anybody test the GeoGebra? Now I don't have time.
Comment 23 Tobias C. Berner freebsd_committer freebsd_triage 2019-02-09 19:22:45 UTC
All is good again, after the openjdk8 fix.

Thanks.