FileKit
FileKit copied to clipboard
File picker doesn't work on linux
When using file picker on linux (I have used sample compose project) it spams with errors and doesn't work
`(java:140182): Gtk-WARNING **: 00:04:56.728: drawing failure for widget 'GtkViewport': error occurred in libfreetype
(java:140182): Gtk-WARNING **: 00:04:56.728: drawing failure for widget 'GtkPlacesSidebar': error occurred in libfreetype
(java:140182): Gtk-WARNING **: 00:04:56.728: drawing failure for widget 'GtkPaned': error occurred in libfreetype
(java:140182): Gtk-WARNING **: 00:04:56.728: drawing failure for widget 'GtkBox': error occurred in libfreetype
(java:140182): Gtk-WARNING **: 00:04:56.728: drawing failure for widget 'GtkFileChooserWidget': error occurred in libfreetype
(java:140182): Gtk-WARNING **: 00:04:56.728: drawing failure for widget 'GtkBox': error occurred in libfreetype
(java:140182): Gtk-WARNING **: 00:04:56.728: drawing failure for widget 'GtkFileChooserDialog': error occurred in libfreetype `
System info: Arch linux File manager: Thunar
Hi @kroune! Thanks for sharing this issue!
I found this related issue: https://youtrack.jetbrains.com/issue/CMP-6022
I will probably need some help to solve this one, it seems not trivial.
funny I just got this issue today, but didn't have it lastnight. and I didn't update my linux or any file related code. I did however update some libraries in my gradle file. I also did a git push lastnight when it was working. I'll see if I can find the change.
ok I'm no linux expert, so ignore this if Im way off. my issue went away after making sure the includes I used were desktop and not android. and adding this
-keep class com.sun.jna.** { ; } -keep class * implements com.sun.jna.* { *; }
to my proguard rules.
sorry if this does not apply.
@kroune, does this solve your problem if you put this in your proguard file?
-keep class com.sun.jna.** { ; } -keep class * implements com.sun.jna.* { *; }
@kroune, does this solve your problem if you put this in your proguard file?
-keep class com.sun.jna.** { ; } -keep class * implements com.sun.jna.* { *; }
no, it doesn't help, it doesn't work even if I use runDistributable (which doesn't have proguard at all)
After playing around with it I found that some elements are visible (sometimes) and it seems like it works a bit (but ui is still completely fucked)
Also I think it would be nice to have another implementation of a file picker as a workaround
Just FYI, we're having a similar problem with the Processing project on Linux. If we sort it out I'll let you know. https://github.com/processing/processing4/issues/1147 (In our case we have a workaround, which is using the Java file picker instead of the native Linux OS one.)
@kroune, does this solve your problem if you put this in your proguard file?
-keep class com.sun.jna.** { ; } -keep class * implements com.sun.jna.* { *; }
These rules solved a crash I had on my application on MacOS. This information should be added to the documentation
@nicopico-dev I updated the JVM setup documentation with a proguard section ✅
https://filekit.mintlify.app/core/setup#proguard-configuration