You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sending signal with byte[] fails with verbose logging #247
Sending this connection.sendMessage(new Signal(...)) works fine, with normal log level.
But when I set the log level to verbose, the sending fails.
The error seems to be in the code in LoggingHelper that tries to to serialize the the object to a string.
It fails to cast a byte array (byte[], [B) to an object array (Object[], [Ljava.lang.Object;), which doesn't work. Primitive arrays can't be cast to an object array.
Error:
java.lang.ClassCastException: class [B cannot be cast to class [Ljava.lang.Object; ([B and [Ljava.lang.Object; are in module java.base of loader 'bootstrap')
at org.freedesktop.dbus.utils.LoggingHelper.arraysVeryDeepStringRecursive(LoggingHelper.java:56)
at org.freedesktop.dbus.utils.LoggingHelper.arraysVeryDeepString(LoggingHelper.java:34)
at org.freedesktop.dbus.messages.Message.lambda$append$3(Message.java:882)
at org.freedesktop.dbus.utils.LoggingHelper.logIf(LoggingHelper.java:76)
at org.freedesktop.dbus.messages.Message.append(Message.java:882)
at org.freedesktop.dbus.messages.DBusSignal.appendbody(DBusSignal.java:277)
at org.freedesktop.dbus.connections.AbstractConnection.sendMessageInternally(AbstractConnection.java:1087)
at org.freedesktop.dbus.connections.AbstractConnection$1.run(AbstractConnection.java:406)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Activity
Issue #247: Fixed class cast exception when dealing with primitive ar…
Issue #247: Fixed class cast exception when dealing with primitive ar…
hypfvieh commentedon Jan 24, 2024
Will be fixed in 5.x and 4.3.2