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

Exception "java.lang.IllegalArgumentException: Wrong parent window" when clicking on "Click to cancel process" in popup window #6290

Closed
troizet opened this issue Aug 3, 2023 · 6 comments
Labels
kind:bug Bug report or fix priority:critical Showstopper issue that requires fixing in next release
Milestone

Comments

@troizet
Copy link
Collaborator

troizet commented Aug 3, 2023

Apache NetBeans version

Apache NetBeans 19 release candidate

What happened

When performing long operations such as Background scanning of projects, Refreshing indications, Checking for external changes, a progress bar appears at the bottom. When clicking on the progress bar, a popup window opens, in which an exception java.lang.IllegalArgumentException: Wrong parent window is thrown when clicking on Click to cancel process.

How to reproduce

  • Click on the progress bar when performing operations such as Background scanning of projects, Refreshing indications, Checking for external changes.
  • Click on Click to cancel process in the popup window that opens.

Click to cancel process

Did this work correctly in an earlier version?

Apache NetBeans 18

Operating System

Debian GNU/Linux 12 (bookworm)

JDK

OpenJDK Runtime Environment 17.0.7+7-Debian-1deb12u1

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

Stacktrace:

java.lang.IllegalArgumentException: Wrong parent window
	at java.desktop/java.awt.Dialog.<init>(Dialog.java:681)
	at java.desktop/javax.swing.JDialog.<init>(JDialog.java:593)
	at org.netbeans.core.windows.services.NbPresenter.<init>(NbPresenter.java:198)
	at org.netbeans.core.windows.services.DialogDisplayerImpl$AWTQuery.showDialog(DialogDisplayerImpl.java:232)
	at org.netbeans.core.windows.services.DialogDisplayerImpl.notify(DialogDisplayerImpl.java:272)
	at org.netbeans.core.windows.services.DialogDisplayerImpl.notify(DialogDisplayerImpl.java:151)
	at org.netbeans.modules.progress.ui.ListComponent$CancelAction.actionPerformed(ListComponent.java:323)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Are you willing to submit a pull request?

No

@troizet troizet added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Aug 3, 2023
@neilcsmith-net neilcsmith-net added priority:critical Showstopper issue that requires fixing in next release and removed needs:triage Requires attention from one of the committers labels Aug 3, 2023
@neilcsmith-net neilcsmith-net added this to the NB19 milestone Aug 3, 2023
@neilcsmith-net
Copy link
Member

OK, thanks! Reproducible, and I assume a side effect of #5989 and #6216 - looking into it. May need to revert that.

@errael
Copy link
Contributor

errael commented Aug 3, 2023

Reverting a crash in favor of a lockup isn't a great choice (but the lockup is probably less frequent).

@neilcsmith-net
Copy link
Member

@errael well, the lockup is unlikely to be triggered in NetBeans rather than the platform. But have hopefully fixed this in #6294 while keeping the new parenting code anyway.

@neilcsmith-net
Copy link
Member

@troizet thanks for the report. Could you have a try with the dev build from #6294 - https://github.com/apache/netbeans/suites/14797319698/artifacts/842188645

@troizet
Copy link
Collaborator Author

troizet commented Aug 3, 2023

@neilcsmith-net I tried the build. Everything works, the exception is no longer thrown. Thanks!

@neilcsmith-net
Copy link
Member

Fix included in 19-rc4. Please give a good test of all dialogs you can think of!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix priority:critical Showstopper issue that requires fixing in next release
Projects
None yet
Development

No branches or pull requests

3 participants