jwharm / java-gi

GObject-Introspection bindings generator for Java
GNU Lesser General Public License v2.1
84 stars 7 forks source link

GIO Files aren't GObjects #101

Closed pontaoski closed 4 months ago

pontaoski commented 4 months ago

This causes their asynchronous APIs that rely on AsyncReadyCallbacks to fail, as the first parameter is the file as a GObject.

1java.lang.ClassCastException: class org.gnome.gio.File$FileImpl cannot be cast to class org.gnome.gobject.GObject (org.gnome.gio.File$FileImpl and org.gnome.gobject.GObject are in unnamed module of loader 'app')
[error]         at org.gnome.gio.AsyncReadyCallback.upcall(AsyncReadyCallback.java:67)
[error]         at org.gnome.gio.Application.run(Application.java:1060)
[error]         at Shades.Main$.run$$anonfun$1(Main.scala:84)
[error]         at cats.effect.IOFiber.$anonfun$9(IOFiber.scala:983)
[error]         at cats.effect.unsafe.WorkerThread.blockOn(WorkerThread.scala:857)
[error]         at scala.concurrent.package$.blocking(package.scala:124)
[error]         at cats.effect.IOFiber.runLoop(IOFiber.scala:983)
[error]         at cats.effect.IOFiber.execR(IOFiber.scala:1364)
[error]         at cats.effect.IOFiber.run(IOFiber.scala:112)
[error]         at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:702)