sdercolin / vlabeler

Open source voice labeling application
https://vlabeler.com
Apache License 2.0
146 stars 21 forks source link

file dialog not working properly in Arch Linux #25

Closed la1den closed 1 year ago

la1den commented 1 year ago

I downloaded the source code and then ran ./gradlew runDistributable, and then the following problem occurred.

> Task :runDistributable
[2023-08-13T02:57:24.542557268Z] INFO: Log initialized
[2023-08-13T02:57:24.569530506Z] DEBUG: Launched in Linux 6.1.38-1-lts amd64, javaRuntimeVersion=20.0.1+9-29, appVersion=1.0.0-beta16, debug=false, workingDir=/home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources, appDir=/home/lfh/vLabeler, locale=zh_CN
[2023-08-13T02:57:24.624763754Z] INFO: Custom app conf found
[2023-08-13T02:57:24.692385265Z] INFO: AppConf: AppConf(painter=Painter(canvasResolution=CanvasResolution(default=40, step=20), maxDataChunkSize=441000, amplitude=Amplitude(resampleDownToHz=44100, normalize=false, unitSize=60, intensityAccuracy=1000, yAxisBlankRate=0.1, color=#FFF2F2F2, backgroundColor=#00000000), spectrogram=Spectrogram(enabled=true, heightWeight=0.75, pointDensity=2, standardHopSize=110, standardWindowSize=512, windowType=BlackmanHarris, melScaleStep=10, maxFrequency=20000, minIntensity=-20, maxIntensity=55, colorPalette=Plain, useHighAlphaContrast=true), power=Power(enabled=false, mergeChannels=true, heightWeight=0.5, unitSize=60, windowSize=300, minPower=-48.0, maxPower=0.0, intensityAccuracy=200, color=#FFF2F2F2, backgroundColor=#00000000)), editor=Editor(playerCursorColor=#FFFF00, scissorsColor=#FFFFFF00, scissorsActions=ScissorsActions(goTo=Former, askForName=Former, play=Former), autoScroll=AutoScroll(onLoadedNewSample=true, onJumpedToEntry=true, onSwitchedInMultipleEditMode=true, onSwitched=false), lockedDrag=UseLabeler, lockedSettingParameterWithCursor=true, showDone=true, autoDone=true, showStar=true, showTag=true, continuousLabelNames=ContinuousLabelNames(color=#E89F17, size=Small, position=TopRight)), view=View(language=ChineseSimplified, hideSampleExtension=true, accentColor=#F48FB1, accentColorVariant=#AD375F, pinnedEntryListPosition=Right), autoSave=AutoSave(target=Record, intervalSec=30), playback=Playback(playOnDragging=PlayOnDragging(enabled=true, rangeRadiusMillis=10, eventQueueSize=5)), keymaps=Keymaps(keyActionMap={}, mouseClickActionMap={}, mouseScrollActionMap={}), history=History(maxSize=100, squashIndex=true))
[2023-08-13T02:57:25.138741870Z] INFO: Written appRecord: AppRecord(recentProjects=[], windowSizeDp=(1196.0, 870.0), pluginDialogSizeDp=(900.0, 700.0), isPropertyViewDisplayed=false, isEntryListPinned=true, pinnedEntryListSplitPanePositionLocked=false, pinnedEntryListSplitPanePositions={Left=0.3, Right=0.7, Top=0.3, Bottom=0.7}, isToolboxDisplayed=false, sampleDirectory=null, workingDirectory=null, labelerCategory=null, labelerName=null, projectContentType=null, projectCreatorDetailsExpanded=[false, false, false], disabledLabelerNames=[], disabledPluginNames=[], autoExport=false, ignoredUpdateVersions=[], updateDownloadDirectory=/home/lfh/Downloads, hasSavedDetectedLanguage=true, pluginQuickLaunchSlots={}, hasAskedForTrackingPermission=true, trackingId=null, showDisabledMacroPluginItems=false, isTimescaleBarDisplayed=false)
[2023-08-13T02:57:25.218292708Z] INFO: Window size changed: (1196.0, 870.0)
[2023-08-13T02:57:25.229625089Z] INFO: Loaded labeler: sinsy.default
[2023-08-13T02:57:25.229691169Z] INFO: Loaded labeler: utau-singer.default
[2023-08-13T02:57:25.229715979Z] INFO: Loaded labeler: oto.default
[2023-08-13T02:57:25.229738550Z] INFO: Loaded labeler: audacity.default
[2023-08-13T02:57:25.229760490Z] INFO: Loaded labeler: nnsvs-singer.default
[2023-08-13T02:57:25.256840898Z] INFO: Window size changed: (1194.0, 880.0)
[2023-08-13T02:57:25.399184375Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/cvvc-oto-gen
[2023-08-13T02:57:25.403384090Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/vcv-oto-gen
[2023-08-13T02:57:25.403985036Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/regex-raw-gen
[2023-08-13T02:57:25.404661933Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/lab2audacity
[2023-08-13T02:57:25.405445452Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/ust2lab-any
[2023-08-13T02:57:25.406203670Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/audacity2lab
[2023-08-13T02:57:25.406867967Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/cv-oto-gen
[2023-08-13T02:57:25.407436083Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/template/ust2lab-ja-kana
[2023-08-13T02:57:25.410739558Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/sort-entries
[2023-08-13T02:57:25.412037132Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/compare-oto-entries
[2023-08-13T02:57:25.412370226Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/execute-scripts-multi-module
[2023-08-13T02:57:25.416897224Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/batch-edit-entry-meta
[2023-08-13T02:57:25.417497430Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/batch-duplicate-entry
[2023-08-13T02:57:25.417766733Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/execute-scripts
[2023-08-13T02:57:25.418376309Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/mark-illegal-entries
[2023-08-13T02:57:25.418624502Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/utau-add-folder
[2023-08-13T02:57:25.419312109Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/mark-oto-entries-in-ust
[2023-08-13T02:57:25.419583482Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/batch-remove-entry
[2023-08-13T02:57:25.420259959Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/batch-edit-prefix-suffix
[2023-08-13T02:57:25.420773055Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/batch-edit-entry-name
[2023-08-13T02:57:25.421563263Z] INFO: Loaded plugin: /home/lfh/gitclone/vlabeler/build/compose/binaries/main/app/vLabeler/lib/app/resources/plugins/macro/batch-edit-oto-parameter
[2023-08-13T02:57:25.469713756Z] DEBUG: IpcServer bound to port 32342
[2023-08-13T02:57:25.471978060Z] DEBUG: Analytics reset
[2023-08-13T02:57:25.757931737Z] INFO: Written appRecord: AppRecord(recentProjects=[], windowSizeDp=(1194.0, 880.0), pluginDialogSizeDp=(900.0, 700.0), isPropertyViewDisplayed=false, isEntryListPinned=true, pinnedEntryListSplitPanePositionLocked=false, pinnedEntryListSplitPanePositions={Left=0.3, Right=0.7, Top=0.3, Bottom=0.7}, isToolboxDisplayed=false, sampleDirectory=null, workingDirectory=null, labelerCategory=null, labelerName=null, projectContentType=null, projectCreatorDetailsExpanded=[false, false, false], disabledLabelerNames=[], disabledPluginNames=[], autoExport=false, ignoredUpdateVersions=[], updateDownloadDirectory=/home/lfh/Downloads, hasSavedDetectedLanguage=true, pluginQuickLaunchSlots={}, hasAskedForTrackingPermission=true, trackingId=null, showDisabledMacroPluginItems=false, isTimescaleBarDisplayed=false)

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkLabel': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkEventBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkRevealer': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkSidebarRow': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkListBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkViewport': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkPlacesSidebar': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkPaned': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkFileChooserWidget': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.694: drawing failure for widget 'GtkFileChooserDialog': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkTreeView': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkScrolledWindow': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkStack': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkPaned': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.705: drawing failure for widget 'GtkFileChooserWidget': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.706: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:11.706: drawing failure for widget 'GtkFileChooserDialog': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkTreeView': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkScrolledWindow': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkStack': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkPaned': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkFileChooserWidget': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.812: drawing failure for widget 'GtkFileChooserDialog': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkTreeView': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkScrolledWindow': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkStack': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkPaned': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkFileChooserWidget': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.829: drawing failure for widget 'GtkFileChooserDialog': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkLabel': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkEventBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkRevealer': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkSidebarRow': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkListBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkViewport': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkPlacesSidebar': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkPaned': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkFileChooserWidget': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkBox': error occurred in libfreetype

(vLabeler:33348): Gtk-WARNING **: 11:00:12.932: drawing failure for widget 'GtkFileChooserDialog': error occurred in libfreetype

image I think my problem might be related to https://github.com/JetBrains/compose-multiplatform/issues/1279

freetype version:freetype2 2.13.1-1

sdercolin commented 1 year ago

Seems the original issue does not update.. How about trying to use dialogs from lwjgl, just like we are doing for windows right now?

dependencies: https://github.com/sdercolin/vlabeler/blob/main/build.gradle.kts#L55-L63 usage: https://github.com/sdercolin/vlabeler/blob/main/src/jvmMain/kotlin/com/sdercolin/vlabeler/ui/dialog/FileDialog.kt#L86

la1den commented 1 year ago

I'm not very familiar with kotlin, I don't know if this is the right way to do it.

  1. I added the linux dependency in build.gradle.kts
  2. and made FileDialog always return LwjglFileDialog in FileDialog.kt
  3. but the same error still occurs
                val lwjglVersion = "3.3.1"
                listOf("lwjgl", "lwjgl-nfd").forEach { lwjglDep ->
                    implementation("org.lwjgl:$lwjglDep:$lwjglVersion")
                    if (System.getProperty("os.name").startsWith("win", ignoreCase = true)) {
                        listOf("natives-windows", "natives-windows-x86", "natives-windows-arm64").forEach { native ->
                            runtimeOnly("org.lwjgl:$lwjglDep:$lwjglVersion:$native")
                        }
                    } 
                    else {
                        listOf("natives-linux", "natives-linux-arm32", "natives-linux-arm64").forEach { native ->
                            runtimeOnly("org.lwjgl:$lwjglDep:$lwjglVersion:$native")
                        }
                    }
sdercolin commented 1 year ago

Yes, that looks correct. I will look into it later. (not sure if it depends on certain OS/build of linux version..)

sdercolin commented 1 year ago

@la1den I think it's quite difficult to fix your issue, so I implemented a custom file dialog in this branch. Please have a try.

You can enable it in the preferences Misc.

image

After it's tested I will merge this branch.

la1den commented 1 year ago

@sdercolin Wow, that's great! It can run perfectly.

sdercolin commented 1 year ago

Merged to dev branch

sdercolin commented 1 year ago

Released