Fwd: [JBS] {Commented} (JDK-8149490) Null pointer exception in print logger

David Hill David.Hill at Oracle.com
Thu Feb 11 16:02:53 UTC 2016

Hi all,
     I got a bit diverted chasing an NPE when I turned on -Djavafx.pulseLogger=true with a test app.
It took me a bit longer to untangle what was going on, but now that I have a clue, I need to get back to other stuff for a bit.

I do need some feedback from some of you that have been in the pulse/repaint/logger code though..... below is the conclusion I made after my dig. I would appreciate any comments/thoughts on it added into the bug.


	David Hill <https://bugs.openjdk.java.net/secure/ViewProfile.jspa?name=ddhill> *commented* on Bug JDK-8149490 <https://bugs.openjdk.java.net/browse/JDK-8149490>

Re: Null pointer exception in print logger <https://bugs.openjdk.java.net/browse/JDK-8149490>

The core issue here:

There is an expectation in Printlogger that you will have a sequence of:

renderEnd << missing

The failing case is when we have a pulse that does not have a renderEnd. This seems to be possible as there are at least one places where we may exit the repaint early, and so do not call PaintCollector.done(). See ViewScene.repaint() right at the beginning for a good example.

It seems like we could workaround the issue in PrintLogger - but there is at least one other consumer of these messages (JFR). So the probable likely fix is either
    a) detecting the "no repaint" case earlier and not calling repaint at all.
    b) changing the repaint paths so we always notify PaintCollector.done().

Also note: there are some real logic problems in PrintLogger related to the PulseData linked list. The case where the head is not available will lead to a case where we always add a new member to the list, which is an obvious memory leak.

Add Comment <https://bugs.openjdk.java.net/browse/JDK-8149490#add-comment> 	Add Comment <https://bugs.openjdk.java.net/browse/JDK-8149490#add-comment>

This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 	
Atlassian logo

More information about the openjfx-dev mailing list