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

3.0.0-BETA2 Events not working all of the time #3

Closed
vewert opened this issue Nov 30, 2020 · 3 comments
Closed

3.0.0-BETA2 Events not working all of the time #3

vewert opened this issue Nov 30, 2020 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@vewert
Copy link

vewert commented Nov 30, 2020

I migrated from the old version(2.1.8) to 3.0.0-BETA2, which was very straight forward.

When I try running my application, however, I noticed that the MenuItem events aren't always working. For example, when I click on the About menu item, or the Preferences menu item (that I created), the events don't work consistently. They work sometimes, but not all the time (seem to work about 10% of the time). Same thing when I try the Quit menu item; sometimes the application exits, but mostly not.

The code I am using, is the same as for the old version, and when I revert to the the older version, the events work was expected.

I also tried using the defaultApplicationMenu (using createDefaultApplicationMenu()), but the same problem occurs.

I'm not sure why sometimes it works and sometimes not; maybe a timing issue.

Also note: I am using JavaFX 15.0.1. (I'm not sure if that matters.)

@0x4a616e 0x4a616e added the bug Something isn't working label Dec 1, 2020
@0x4a616e
Copy link
Owner

0x4a616e commented Dec 1, 2020

Hi @vewert , thank you for the report and sorry for the inconvenience. I also noticed this issue recently and i already have a fix ready. The problem is, that the objects that were being called back from native code sometimes got garbage collected as no further reference existed within Java. I'm now keeping an extra reference to prevent that ;) I'm planing to release the fix as 3.0.0 today or tomorrow, as there are no further API changes planned so far.

@0x4a616e 0x4a616e self-assigned this Dec 1, 2020
@0x4a616e 0x4a616e added this to the 3.0.0 milestone Dec 1, 2020
@0x4a616e
Copy link
Owner

0x4a616e commented Dec 1, 2020

I just published

<dependency>
  <groupId>de.jangassen</groupId>
  <artifactId>nsmenufx</artifactId>
  <version>3.0.0</version>
</dependency>

it should be available within a few minutes. Maybe you can confirm if things are working now.

@vewert
Copy link
Author

vewert commented Dec 1, 2020

I updated to 3.0.0, and the Events seem to be working properly now!

Thanks!

@vewert vewert closed this as completed Dec 1, 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

2 participants