Skip to content
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

Pixelorama 1.0.3 can't invoke Save and Save As file dialog for new file on Manjaro Linux #1115

Open
fuzhouch opened this issue Oct 2, 2024 · 10 comments
Labels
bug Something isn't working help wanted Extra attention is needed platform-specific Related to specific platforms

Comments

@fuzhouch
Copy link

fuzhouch commented Oct 2, 2024

Pixelorama version:
Pixelorama v1.0.3-stable

OS/device including version:
OS: Manjaro Linux, unstable branch, rolling upgrade
Desktop environment: Gnome 47.0

Issue description:
I found my Pixelorama can't invoke Save File and Save As dialog after a full system upgrade since 2024-09-29. (I do a weekly update of both pacman -Syu + flatpak update at weekend).

The issues impacts both flatpak and Steam downloaded version.

Steps to reproduce:

  1. Install Pixelorama from Flathub version, flatpak install com.orama_interactive.Pixelorama
  2. Verify the version is 1.0.3-stable.
  3. Launch Pixelorama, flatpak run com.orama_interactive.Pixelorama
  4. Create a new project via File menu -> New
  5. Do some plotting, and save it via File menu -> Save untitled, or shotcut CTRL-S.

Expected behavior

A file save dialog pops-up, allow we save project.

Actual behavior

Nothing happens. The UI is not freezed but it does not invoke file dialog, as if menu is not clicked or shotcut is not hit. The name in project title still has a '*' mark, indicating the project is not saved. When trying to exit Pixelorama, a dialog pop-ups warning the project is not saved, and asks me if I want to save by clicking Save & Exit button from warning dialog. When clicking Save & Exit, there's no file dialog opened either.

The same behavior applies to File -> Save As menu. When clicking the menu item, there's no dialog pops up either.

Note: When clicking File -> New, file dialog can open as expected.

Workaround

I found a workaround, by copying a previous project. For example, I have an existing project 1.pxo. I can do the following two steps:

  1. I copy it as 2.pxo.
  2. Then I can open it from terminal: open 2.pxo, clean up the original contents, and do my drawing.

In this case, the CTRL-S shortcut allows me save my project.

However, Save As does not apply this workaround.

@fuzhouch fuzhouch added the bug Something isn't working label Oct 2, 2024
@fuzhouch fuzhouch changed the title Pixelorama Flathub version can't invoke Save and Save As file dialog for new file on Manjaro Linux Pixelorama 1.0.3 can't invoke Save and Save As file dialog for new file on Manjaro Linux Oct 6, 2024
@fuzhouch
Copy link
Author

fuzhouch commented Oct 6, 2024

Confirmed the issue can be repro on both Flatpak version and Downloaded Steam version. I haven't got a device to test Windows version yet. Will check later this week.

@OverloadedOrama OverloadedOrama added platform-specific Related to specific platforms help wanted Extra attention is needed labels Oct 10, 2024
@FuzzySock
Copy link

Issue seems to be limited to Gnome.

I had the same problem, but it went away when swapping DE.

@fuzhouch
Copy link
Author

Thanks @FuzzySock for response! Is there any approach to diagnose the root cause (e.g. I can help collecting logs)? It's hard for me to switch DE as I have many dependencies on Gnome. From Win11 it seems the save dialog is not native but created by Pixelorama. Not sure why it fails to work on Gnome.

@fuzhouch
Copy link
Author

Update: I tried Pixelorama 1.0.3 on a Windows 11 machine. There's no issue.

@fuzhouch
Copy link
Author

Hi,
I managed to debug from source code. It looks like the two lines in SaveSprite.tscn causes dialog fail to show up.

[gd_scene format=3 uid="uid://d4euwo633u33b"]

[node name="SaveSprite" type="FileDialog" groups=["FileDialogs"]]
size = Vector2i(675, 400)
ok_button_text = "Save"
access = 2
filters = PackedStringArray("*.pxo ; Pixelorama Project")
option_count = 1
option_0/name = "Include blended images" # Dialog is invoked when removing the last two lines.

The two lines were introduced in this PR by allowing blended images with native dialog.

I havn't got a time to dig more. Hope it helpful to spot the root cause.

@OverloadedOrama
Copy link
Member

This is probably a Godot bug, and ideally it should be reported there if it happens to more Godot projects. The ability to add custom options to native dialogs was introduced to Godot 4.3 from this PR godotengine/godot#87303. My guess is that for whatever reason it doesn't work with GNOME, but I haven't tested it myself.

If you are using a non-flatpak version, the dialogs are by default non-native, so I would recommend using a non-flatpak version if you are on GNOME until the issue is resolved.

@fuzhouch
Copy link
Author

Thanks @OverloadedOrama !

I tried to run Pixelorama on two ways. I got two different results:

  1. I cloned Pixelorama source code and launch with Godot 4.4. No save dialog invoked.
  2. I installed pixelorama from AUR (I use Manjaro). Save dialog launched. You are right, it's non-native.

Following your suggestions, I use the AUR version for now. Meanwhile, I'm not very clear why approach 1 does not work. Is there an option to switch native/non-native dialog? Is it possible we switch them via environment variables?

I asked this because I'm moving most of my software to Flatpak version, which offers a faster network downloading speed in my environment. AUR sometimes behaves pretty slow. It would be great if there's a workaround to let me change to non-native dialog in a simple way.

@OverloadedOrama
Copy link
Member

As far as I know, if you are using the Flatpak version of Godot or Pixelorama, you can only use native file dialogs because they are sandboxed, according to the documentation. I am not sure if there is a way to disable that.

@fuzhouch
Copy link
Author

fuzhouch commented Oct 27, 2024

Thanks! Looks like I have no choice but keep using AUR. Btw, it's a bit strange, that my Flatpak version of Godot 4.3 can invoke native File Open/Save dialog without problem. I verified on my Manjaro GNOME 47. Not sure if they applied any tricks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed platform-specific Related to specific platforms
Projects
None yet
Development

No branches or pull requests

4 participants
@fuzhouch @FuzzySock @OverloadedOrama and others