Comments (20)
Thanks for your report, but it is very difficult to understand what is the problem ?
Moreover, I am not a Zulu expert, but I suppose it provides marlin 0.9.1.1...
Could you try latest Marlin renderer for Java 8 ?
https://github.com/bourgesl/marlin-renderer/releases/tag/v0_9_4_3
It includes latest know fixes so it could explain some difference with Zulu 8.x
Do you have some test code to reproduce the problem ?
from marlin-renderer.
Latest Zulu8-44 includes Marlin renderer 0.9.1.1 (only).
Your problem may be related to the bug that is fixed in OpenJDK 11.0.5:
https://bugs.openjdk.java.net/browse/JDK-8226789
from marlin-renderer.
First thanks a lot for you quick reponse.
About my question, please see my attachment BugDetails.zip, there are three images in it. When dragging vernier, the chart will be refreshed, the "expect.jpg" is the expected result, the "overlay.jpg" is the issue that I met. "TestResult.jpg" shows my test results on different JDK and Render versions.
https://bugs.openjdk.java.net/browse/JDK-8226789 is a JavaFX issue, but the Zulu JDKs we use don't contain JavaFX. I tried with Zulu11.2.5 JavaFX version (OpenJDK 11.01) and it has the issue as JDK-8226789 described, but our application can work well on Zulu 11.2.5 JavaFX version.
I also tried with the latest Marlin renderer 0.9.4.3 and it doesn't fix the overlay issue.
from marlin-renderer.
I looked at your images but it did not help me guessing what is the concrete problem.
As it does not happen in zulu11, I expect it to be related to the different marlin releases in zulu 8 vs 11.
This is a java2d not javafx issue that's why I asked to test with marlin 0.9.4.3.
Did you set the jvm flags to enable it in your test ?
See https://github.com/bourgesl/marlin-renderer/wiki/How-to-use
What is the marlin version in your log (std out) ? It should be 0.9.4.3.
from marlin-renderer.
I tried both Zulu 8.30 + Marlin 0.9.4.1 and Zulu 8.30 + Marlin 0.9.4.3 and I am sure the new Marlin renderer is enabled, I saw the log printed like following. But it does not fix the overlay issue.
INFO: Marlin software rasterizer = ENABLED
INFO: Version = [marlin-X.Y.Z-Unsafe]
from marlin-renderer.
Bad news, you found a problem. However it is impossible to me to guess what it is without any reproducer code or instructions.
If it works on Zulu 11, the problem may be related to other java2d bugs fixed in OpenJDK 9/10/11.
Is your application open-sourced or publicly available ? If I can run your code, it could help me diagnosing what's happening.
Finally could you run another test with the jvm arg "-Dsun.java2d.renderer.clip=false" to disable Marlin's internal path clipper ?
from marlin-renderer.
Could you try recording your drawing using MapBench's ShapeDumpingGraphics2D ?
See https://github.com/bourgesl/mapbench/wiki/Recording-a-rendering-session-and-using-it-in-mapbench
from marlin-renderer.
The dump.zip file is the MapBench's drawing record when overlay occurs.
Share with you a new observation. Below code is from a class that extends from JPanel, in the paintComponent(Graphics) method, we create a chart buffer (double buffering) and update the chart buffer only when the chart is changed. When double buffering is enabled, the overlay occurs when the chart refreshed dozens of times.
But if I disable the double buffering, the overlay never occurs.
from marlin-renderer.
Probably there is a problem in your code: multi threading, jfreechart version ... or your panel buffer implementation is buggy ?
By default chart.draw uses background paint to clear the drawing area every time...
Are you sure your paint code is only called from EDT ?
Why not use jfreechart's ChartPanel ?
It always preserve clipping, g2d state and perform fill rect before draw():
https://github.com/jfree/jfreechart/blob/101f52257532673ef22944b7115455f689ed7a7c/src/main/java/org/jfree/chart/ChartPanel.java#L1384
Are you able to write a basic reproducer code ?
Or share your application code.
from marlin-renderer.
- I am sure the paint is from UI thread.
- Why not use jfreechart's ChartPanel is to workround a bug. But even I use jfreechart's ChartPanel, it also has overlay.
- The code link you showed me is jfreechart 1.5. But in jfreechart 0.9.9 that we use, it only perform fill rect in this.freeChart.drw(...) method. I just follow jfreechart 1.5 to fill rect before draw(), overly still occurs.
- I am unable to reproduce this issue with some basic code. And this issue is not reproduced after we migrate to jfreechart 1.5. // Note that this issue is not reproduced after migrating JDK to 11 or use Pisces render in any JDK versions.
After disabling the double buffering, this bug is not reproduced, so I still think this is probably a renderer or JDK bug in some certain conditions.
from marlin-renderer.
Unexpected drawing occurs on another chart. See the attached screenshot, the oblique lines are unexpected.
from marlin-renderer.
This last one looks like the following bug, fixed in openjdk11. I do not know if it is fixed in zulu 11 or 8.
https://bugs.openjdk.java.net/browse/JDK-8228711
Try with latest marlin 0.9.4.3 or zulu11 to confirm.
from marlin-renderer.
Once again, please test again your problems with the jvm arg "-Dsun.java2d.renderer.clip=false" to disable Marlin's internal path clipper ?
It will let us know if the problems are related to the clipper.
Probably as Pisces nor Ductus does not have any clipper.
It is a big & complicated code in the Marlin renderer that is not trivial to test in all possible cases, even if I made intensive automated tests.
from marlin-renderer.
FYI I am preparing a new repository marlin-chart that tests jfreechart 0.9.9 with a simple xy line chart...
It works well with a custom double-buffered panel with marlin 0.9.4.3, zulu 8-44 ... I use EDT to set the domain axis range to mimic scrolling over x-axis.
How do you make your thumbnail chart and set the axis range ?
Will push on github before tomorrow to let you try my test code and let you propose changes in order to reproduce your problem.
WorksForMe
from marlin-renderer.
Maybe you could contact the azul zulu team ? Maybe send an email to report your problem to Andrew Brygin : abrygin at azul.com
from marlin-renderer.
Here is the marlin-chart repository:
https://github.com/bourgesl/marlin-chart
Please try reproducing your problem here by hacking the test code...
PS: zulu 8.30 provides Marlin 0.7.4 (jdk9 version), but zulu 8.44 provides Marlin 0.9.1.1 (jdk13 version)
from marlin-renderer.
Great thanks for your warm help. I will try again to write a standalone application to reproduce this issue and then send application source code to you. This time I will extract all the chart framework code and delete other irrelevant feature code, it will be must eaiser to reproduce this issue.
Below are my answers for your question:
- Forget to reply you that I have tried -Dsun.java2d.renderer.clip=false and it doesn't work.
- I have contacted zulu team and they also want a standalone application.
from marlin-renderer.
Good luck to track this bug and reproduce it.
How is my simple code using jfreechart ? Does it mimic your use case ?
Looking forward your test code...
Laurent
from marlin-renderer.
Any progress / clue in your bug hunting ?
I checked Marlin state mostly kept dirty, cleanup in dispose()... looks good and safe.
Still no idea where I should look at ...
from marlin-renderer.
Do you have reproduced the problem ?
If not I will close this bug report.
Worksforme
from marlin-renderer.
Related Issues (20)
- java.lang.NoSuchFieldError: refList when using 0.9.2 with Intelllij - Java 8 HOT 11
- Canvas support? HOT 1
- Marlin causes VisualVM to hang HOT 2
- Marlin 0.9.x hangs in busy infinite loop in Dasher.lineTo() drawing a large line HOT 12
- Will there be a v0.9.4 for JDK 9+? HOT 1
- Backport non-AA renderers from MarlinFX HOT 1
- Support Mantle and, on macOS support Metal HOT 1
- Enhance curve's cusp handling to fix self intersections in large stroked curves
- Thin lines in PDF not rendered HOT 13
- Update DPQS to latest OpenJDK 14 patch HOT 1
- Improve cubic curve offset computation HOT 2
- Skip draw joins if line/curve was splitted by dasher or strokerclipper HOT 1
- Improve curve offsetting HOT 1
- https://bugs.openjdk.java.net/browse/JDK-8277574 HOT 1
- NoSuchMethodError: sun.java2d.marlin.MarlinProperties.isDoClip()Z HOT 3
- Help with installing Marlin-renderer HOT 9
- Detect constant shapes (slope = 0) to optimize scanline processing & tile generation HOT 2
- make Marlin renderer releases 0.9.4.6 HOT 3
- improve graphics2d impl to dump stats & record drawing commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marlin-renderer.