Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE at javax.swing.ToolTipManager.initiateToolTip(ToolTipManager.java:478) #226

Closed
pmouawad opened this issue Dec 18, 2020 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@pmouawad
Copy link

pmouawad commented Dec 18, 2020

Describe the bug

Using JMeter latest nightly build with Darklaf latest release I get many NPE with below stacktrace:
Note I had reported a similar bug:

java.lang.NullPointerException: null at javax.swing.ToolTipManager.initiateToolTip(ToolTipManager.java:478) ~[?:1.8.0_161] at javax.swing.ToolTipManager.mouseEntered(ToolTipManager.java:435) ~[?:1.8.0_161] at com.github.weisj.darklaf.ui.tooltip.DarkToolTipUI$2.mouseEntered(DarkToolTipUI.java:79) ~[darklaf-core-2.5.3.jar:2.5.3] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:300) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:299) ~[?:1.8.0_161] at java.awt.Component.processMouseEvent(Component.java:6542) ~[?:1.8.0_161] at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) ~[?:1.8.0_161] at java.awt.Component.processEvent(Component.java:6298) ~[?:1.8.0_161] at java.awt.Container.processEvent(Container.java:2237) ~[?:1.8.0_161] at java.awt.Component.dispatchEventImpl(Component.java:4889) ~[?:1.8.0_161] at java.awt.Container.dispatchEventImpl(Container.java:2295) ~[?:1.8.0_161] at java.awt.Component.dispatchEvent(Component.java:4711) ~[?:1.8.0_161] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) ~[?:1.8.0_161] at java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4677) ~[?:1.8.0_161] at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4655) ~[?:1.8.0_161] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4506) ~[?:1.8.0_161] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) ~[?:1.8.0_161] at java.awt.Container.dispatchEventImpl(Container.java:2281) ~[?:1.8.0_161] at java.awt.Window.dispatchEventImpl(Window.java:2746) ~[?:1.8.0_161] at java.awt.Component.dispatchEvent(Component.java:4711) ~[?:1.8.0_161] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) ~[?:1.8.0_161] at java.awt.EventQueue.access$500(EventQueue.java:97) ~[?:1.8.0_161] at java.awt.EventQueue$3.run(EventQueue.java:709) ~[?:1.8.0_161] at java.awt.EventQueue$3.run(EventQueue.java:703) ~[?:1.8.0_161] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) ~[?:1.8.0_161] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) ~[?:1.8.0_161] at java.awt.EventQueue$4.run(EventQueue.java:731) ~[?:1.8.0_161] at java.awt.EventQueue$4.run(EventQueue.java:729) ~[?:1.8.0_161] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) ~[?:1.8.0_161] at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) ~[?:1.8.0_161] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_161] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_161] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_161] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_161] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_161] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_161]

To Reproduce

I cannot tell exactly when it starts to happen.
No plugin used, just core jmeter.

Screenshots

I see no impact unless this one is related:

I notice that after certain time , the left and right key instead of closing / opening a leaf start to select previous / next node of JTree.

Additional Information:

  • OS: Mac OSX
  • OS Version: 10.11.6
  • JDK 1.8.0_161
  • Darklaf Version: 2.5.3

Additional context

This does not happen with System LAF.

@pmouawad pmouawad added the bug Something isn't working label Dec 18, 2020
@weisJ
Copy link
Owner

weisJ commented Dec 18, 2020

Is this still for the project tree?

@ubikloadpack
Copy link

Yes

@pmouawad
Copy link
Author

Hello @weisJ ,
Thinking more about it, there is also the View Results Tree I was using which contains a JTree.

I don't know which one was leading to the NPE.
Regards

@pmouawad
Copy link
Author

pmouawad commented Dec 19, 2020

Hello @weisJ ,
I see the was a change in JMeter that might explain reapparition of NPE:

You have made a PR:

But this introduced this bug::

Which was fixed by removing what you had put in your PR:

FI: @FSchumacher

@FSchumacher
Copy link

So maybe, we (JMeter) should switch back to returning an empty tooltip? It seems, there is no good way to handle it.

@weisJ
Copy link
Owner

weisJ commented Dec 19, 2020

Which was fixed by removing what you had put in your PR:

This definitely solves the question for the cause of the issue.

So maybe, we (JMeter) should switch back to returning an empty tooltip? It seems, there is no good way to handle it.

The problem here really is that the jdk prior to version 9 has an conflicting implementation regarding tooltips in JTree. I think the easiest solution would be to either return null or "" depending on whether darklaf or a jdk laf is used.

@pmouawad
Copy link
Author

Thanks @weisJ for the idea.
Did it like this.

@weisJ weisJ closed this as completed Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants