-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Issues with MediathekView #822
Comments
Hi @bb! Thanks for sharing this issue, and for the kind words! I was able to reproduce the issue with even simpler steps:
The issue is similar to #813. So I encourage you to look at this issue, and the issues mentioned in it to get a better understanding of what's at play here. I could hardcode an exception for MediathekView, like I did for a few other apps. However, MediathekView seems to use some off-the-shelf system to package their mac app, and their bundleID was Wow I only realized now for some reason that all the apps exhibiting the issue: Jetbrains apps, Protege, Live2D Cube Editor, and MediathekView, are all Java apps. That could hint at a JDK bug. I guessed in the past that it was likely a macOS bug, which it still can be, but it's probable that it's a bug in the JavaFX/Swing framework, where they incorrectly deal with OS events/interactions. I'll try to see what happens in MediathekView source code when I press the It would be very helpful if you opened a ticket on their side as well, explaining this context, so that they can also reproduce the steps above, and debug their app to understand why it freezes. |
The app seems to freeze on this line: Note how the method docs say "Be very careful with this because this can cause deadlocks." Seems to me like it is indeed deadlocking here, which is why the UI is unresponsive and we see the spinning wheel cursor. Now how AltTab is interacting here is pretty unclear to me. When I pause the debugger while the app is frozen, I see it's stopped here: Looking at the call-stack: We see MediathekView > JavaFX > Glass UI > AWT > Interaction with the native OS (in our case, macOS RunLoop) I think the best bet is that it's an issue in JavaFX. I searched on their ticket tracker, and found this issue which seems to be exactly the issue we are seeing in our case. The issue was closed after a while without being actually dealt with. |
Hi @lwouis, I created mediathekview/MediathekView#592 (including asking for a stable bundle id) and also gave a look at the OpenJDK bug tracker. I don't have an account either and also don't see a way to create one. I wonder if JavaFX apps could be blacklisted not by their bundle id but e.g. by e.g. having a ClassPath defined in their Info.plist or .jar files somewhere within their app bundle? Of course, that's just a hacky work around, but maybe more efficient than trying to collect all bundle IDs of java apps? |
Hi @lwouis! I am the developer of MediathekView. You should be able to blacklist MediathekView based on the BundleID. The
The macOS java graphics pipeline sometimes behaves entirely different/erratic to the ones on windows and linux and the reasons are (at least for me) impossible to debug as they are buried deep within the native code they wrote. But I do think that the problems from my POV are caused primarily by the graphics implementation in the macOS JVM. We have a lot of problems with UI code written e.g. on windows malfunctioning on macOS. But I gave up trying to report bugs to Oracle/whoever as they do not care.
The presence of AltTab causes real damage to the application data and logic therefore I issued a warning against using it - although I really liked AltTab but it caused for me more pain than pleasure when using it with my Java dev environment :( |
Thanks @bb and @derreisende77 for a very pleasant investigation and discussion! Here is a synthesis after reading all the material you provided. First of all, I'll hardcode an exception for MediathekView in AltTab, so that we mitigate the issue quickly. I'll use the bundleID since it's stable. It's important to note that while AltTab will stop being an issue, other accessibility apps will probably still create the same issues. Regarding Oracle not dealing with tickets, I understand. It took me 20 minutes just to understand how I was supposed to report the issue. I could guess they don't welcome general-public feedback, and that it's probably a walled-garden ecosystem where only corporate members are listened to.
The idea of ignoring all java apps is interesting. However, some apps may actually use native macOS tabs. I imagine it's possible even through Java UI frameworks to use those. It's not typically used I believe, but I wouldn't want to fail detecting tabs on a Java app because I ignored it on all Java apps in a blanket policy. I think for now hardcoding each app that exhibits a problem (and has enough users that a few open a ticket here) is acceptable. |
The
I would not attempt to do that. Cyberduck for example is a java app that uses Cocoa API via java bindings for the UI. Although it is (primarily) written in Java it should not exhibit the problems Swing/JavaFX apps have. But I haven´t tested it. |
As I said, a drawback of this is that if one of those apps use native macOS tabs, then AltTab will fail to follow these. It's a trade-off between potentially breaking some apps (it's not clear that all JavaFX apps break for instance. It seems to happen in specific cases / code flows / apps) vs potentially incorrectly detecting native tabs in these apps. |
Thank you both for all your work on that! I'm sorry to hear about all those issues regarding communication with Oracle. This is a good testament to give Oracle a wide berth. @derreisende77, if you use other apps which you know have problems when AltTab is active, maybe you can provide us with a list of bundle ids here, so they can be included in the black list? This way you and others could again enjoy AltTab. |
@bb note that I added the workaround for the whole |
I can confirm the App Bundle version of MediathekView works. However when launched manually Java still freezes as there is only a java process without the blacklisted bundle id. |
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8262292 |
Describe the bug
Disclaimer: While I noticed an issue with MediathekView, I didn't see the connection to AltTab by myself.
MediathekView is a movie downloading app written in Java. Both on their Release Website as well as their Changelog they mention issues with AltTab:
German original:
Verbatim translation (by me):
I'm a very happy AltTab user and I especially noticed the frequent releases and great responsiveness of @lwouis regarding any kind of issues which arose in the past. Thanks again for that.
So I think it's a pity there's public blaming of this great app but no (publicly visible) communication in either project.
Steps to reproduce the bug
Honestly, this all sounds like an issue in MediathekView (which is still frozen while I'm writing this and remains frozen when manually quitting AltTab) and not in AltTab (which continues to work fine), but obviously, there's a connection.
Maybe those easily reproducible issues crashes can unveil some special care which needs to be taken for MediathekView or even Java apps in general?
The text was updated successfully, but these errors were encountered: