-
Notifications
You must be signed in to change notification settings - Fork 24
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
[MacOS Catalina] NPE: Couldn't execute theme name query with the Os #18
Comments
Also facing same error on Monterey 12.1 |
+1 Big Sur, JDK 17 |
Developer seems to have explored this issue:
https://stackoverflow.com/a/57429660 with a reference to https://github.com/ruiaureliano/macOS-Appearance with apologies for possible impertinence |
This library would be useful if this issue were fixed. With reference to the example project referenced above the developer quietly updated his project with the correct property for macOS > 10.15 https://github.com/ruiaureliano/macOS-Appearance/../AppDelegate.swift#L50 |
In the meantime, does anyone know how to silence the logger? I don't fully understand how the logger works. I've tried using java.util.logging.Logger.getLogger("com.jthemedetecor.MacOSThemeDetector").level = Level.OFF
java.util.logging.Logger.getLogger("com.jthemedetecor").level = Level.OFF in my code, but that does nothing. Whenever I search "how to disable a org.slf4j.Logger" people are talking about things like log4j. It's very confusing. I don't think I have log4j installed, but just in case I tried adding a "log4j.properties" to my classpath with |
It sounds like you don't want logging at all, in which case you should add sl4j-nop (no-op) logger to your dependencies. I only know log4j with that if you have a logging configuration (log4j2.xml) on your classpath it should ignore libraries that are not configured. This library uses logback with sl4j I have no knowledge of that but it shouldn't matter if you are not using it. |
But what if I just want to disable logging for jthemedetecor without disabling logging for other libraries? |
You should try to configure logging and then you can selectively enable libraries, what you were doing is unlikely to work.
…--
Sent with Spark
On 23 May 2022, 06:10 +0100, Matt Groth ***@***.***>, wrote:
But what if I just want to disable logging for jthemedetecor without disabling logging for other libraries?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
12.4 JDK18 same thing |
use the following two lines in log4j2.properties
|
In case anyone is using log4j2.xml style properties you can use this:
|
This issue seems to be partially solved by #30, but the fix is currently unreleased. |
Having the same issue, any news on this? Using ventura
|
PSA for anyone here the project is hosted by jitpack.io from which you can get dependency from latest commit for example, not just the releases. |
Hi,
Just noticed this NPE, wondered if this is normal or an OS-related issue somehow.
My code calls
OsThemeDetector.getDetector().isDark()
at some point, and the full stack trace readsMore specifically, the NPE is due to the following call (within the
isDark()
method) returning the '0' byte:I should mention that this happens during daytime (and luckily
isDark()
returnsfalse
), so no harm done (besides an avoidable(?) pollution of the logger)Any clue where that might come from?
In case this helps: using version 3.7 @ openjdk11 @ macOS 10.15.7
The text was updated successfully, but these errors were encountered: