-
Notifications
You must be signed in to change notification settings - Fork 2
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
Opening the File Chooser on Linux instantly crashes the player #33
Comments
How did you come to the conclusion that JNA is related to this? I'd like for you to make a very simple JavaFX application/demo that opens a standard JavaFX File dialog and see it the problem persists. The file chooser should just work. Please see this: |
Thx for the report. This could be related to extension filters (audio) passed into the chooser. I will try setting up a Linux VM to reproduce and fix the issue. |
This may be a bug on your side. I'm running VM with Linux Mint using Vmware on Windows and I am able to open both directory and file chooser. I'm running
|
Because I can not reproduce this I can not test workarounds. One possible cause I can imagine is the extension filter. Please see Environment.class and chooseFile/chooseFiles methods and remove the line setting the extensions: this.extensionFilters += extensions. |
wait how does the application work without the add-opens? I'll test your suggestion when I get back to my PC |
I havent included the add-opens here for brevity. I have included it in the launch command. |
nope, removing the extensionfilters still didn't work |
This may be a threading issue (Javafx vs Swing), one of the FileChooser parameters, JDK bug or OS bug. I will continue to try to reproduce the behavior, but until then you can try to eliminate possibilities. For example, what happens if you open some FileChooser in the App.init() or App.start() method? And so on. |
at least I can drag in songs as a workaround ^^ |
* set isGlobalShortcutsSupported to false for Unix * fix missing checks for isGlobalShortcutsSupported fixes #33
I'm opening this as the solution is only a workaround. |
Is this issue back? I think the final fix targeted lazy initialization of jnativehook library. |
Hmpf... I'll look into it later ^^ |
I coincidentally found a bug report on JavaFX11 crashing on Linux with Wayland due to gtk3 or something. |
I have Xorg though, not Wayland. Let's see... |
I have created a little test project with JNativeHook 2.1.0 in which I called |
I know this issue must be quite annoying, but I am unable to reproduce it. I will give it another shot. Pls try removing the library altogether and make Hotkeys just do nothing and test the behavior. |
I think I may have figured this out. Please try removing lines 27-31 from Hotkeys.class. The code that silences the logger:
I think that PS: version 2.1.0 removes some of the undesirable output. If this fix works, could you try if 2.1.0 is unusable? All I know is what the comment in build script says: that 2.1.0 causes critical issue on Linux. |
Yes, because that is true. There have been a few reports which point a particular library that it uses since 2.1. I will try what you've suggested, sounds like a good pointer. |
Found the culprit: |
Not really. I have done a test with 2.1 and the spam is still insane. |
But if the library is not used, it does not cause an issue right? SO isnt it safe to use 2.1.0? Not exactly. In my testing I confirmed global shortcuts to work on my Linux Mint. Hence global shortcuts on Linux are supported. However due to potential problems on some systems, we set global shortcuts to be disabled on Linux by default. Everything looks good and unless you changed your settings, the library should not load. You should have the following default values on your system: 2.1.0 removes the licence header and some other things. The logging suppression still needs to be there, but then there is no visible output at all. That is why I'd prefer to use 2.1.0. |
Hah, jnativehook isn't the culprit apparently! I have removed it and JNA completely from the application and the filechooser still crashes... The problem was that Hotkeys shouldn't even have been initialized. But when shortcuts are enabled but not supported, ActionManager calls |
"But when shortcuts are enabled but not supported, ActionManager calls stopGlobalListening which calls hotkeys.stop which initializes Hotkeys. " "The problem was that Hotkeys shouldn't even have been initialized" "jnativehook isn't the culprit apparently!" Pls try removing Comet widget. It contains native libs for gamepad (gamepad4j-uberjar-0.2.jar, gamepad4j-api-0.2-javadoc.jar). |
I have created a Hotkeys branch to fix this whole stuff, will push it soon. How do you want to fix that? |
But if it were, it would have been bad. It is not a problem right now, but jnativehook seems to me a pretty unstable thing, who knows if it breaks something again.
I will |
Okay, removing terminal and comet widget didn't suffice, but I just removed all widgets except configurator and dirViewer and it worked! Now I'll try to isolate the widget at fault here... |
btw, please prefix text with > for quoting instead of using quotes, it highlights the text properly. |
Now it just works without problems in master. What the heck. I will reopen if it returns. |
Ok, pls push the hotkey branch, I have fixed numerous issues with hotkeys. Currently testing. The fix involves testing whether Indeed jnativehook is pretty dangerous to use, particularly on Linux, although it causes major problems for me on Windows as well. I'm very glad you managed to isolate the problem.
|
The issue did not suddenly go away. Pls try to reproduce it if possible. Is it possible for some native library to get unloaded later on its own? Perhaps you cleared user data? I am not aware of any relevant changes in master branch. |
It may also be related to my system. I can soon test it on my computer at home to see if it is related to the player or the system. |
Whenever I was debugging, I used |
I noticed you modified clean to delete user/tmp directory. May be related. |
No, I modified it to delete lib. But since I now have all libs back again since it just somehow works, this doesn't make a difference either. |
Oh great, I wanted to test it on my home pc, but it doesn't have Java 10, you can't download it since it's end of life, and supporting JDK 11 needs OpenJFX. Back to trying to make openjfx work... |
You added this line to clean task: I find it hard to believe you can not download Java 10. Do not use Oracle, but OpenJDK? Dunno. I noticed you started playing around with JDK11, but I'm afraid it will open more then few can of worms with jigsaw, forced modularity, backward incompatible changes in Java APIs, more internal API's hidden as well as JavaFX. If you do make it work - great, but do not waste much time, we can work on 10 at least until 12. |
|
1 I saw the + sign in the commit so I assumed. Ok. 2 Right. Then I guess there's is an installation floating around somewhere. |
The actual culprit behind this issue may be vlcj. See caprica/vlcj#834 |
It opens a blank file chooser window and then instantly crashes. The issue seems to lie in JNA.
hs_err_pid12804.log
The text was updated successfully, but these errors were encountered: