beeware / beeware/toga

GLib-GIO-CRITICAL when open a OpenFileDialog

Open
#3,324 2 comments 1 reaction 0 assignees View on GitHub
bug gtk linux
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
15h 39m
Merged PRs (30d)
40

Description

### Describe the bug

I'm writing a desktop app using an OpenFileDialog dialog window to choose a file to process in my code but, after a couple of seconds since the OpenFileDialog pops up, I get this error on the terminal:
```
Executing wait_for= cb=[set.discard()] created at /home/leo/venv/lib/python3.13/site-packages/toga/app.py:480> took 0.173 seconds

(__main__.py:4018): GLib-GIO-CRITICAL **: 17:22:05.269: GFileInfo created without standard::size

(__main__.py:4018): GLib-GIO-CRITICAL **: 17:22:05.269: file ../glib/gio/gfileinfo.c: line 1845 (g_file_info_get_size): should not be reached
```
I also tried the "Open File" example present on this repo and I get a similar error:
```
(app.py:4952): GLib-GIO-CRITICAL **: 17:36:18.535: GFileInfo created without standard::size

(app.py:4952): GLib-GIO-CRITICAL **: 17:36:18.535: file ../glib/gio/gfileinfo.c: line 1845 (g_file_info_get_size): should not be reached
```
The curious thing is that "Open File" and "Open File (Multiple)" raise the error while "Open File (Filtered)" and "Open File in Home Folder" don't. I see that when the dialog is filtered, the path doesn't appear on the top of the dialog: could it be this?

### Steps to reproduce

1. Open the "Dialogs" example
2. Run it by the terminal
3. Click on the "Open File" entry in the list

### Expected behavior

There shouldn't be any error

### Screenshots

_No response_

### Environment

- Operating System: Manjaro Linux - Kernel 6.13.8
- Python version: 3.13
- Software versions:
- Briefcase: 0.3.22
- Toga: 0.5.0

### Logs

```

```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the problem with the Dialogs example and its Open File and Open File (Multiple) entries on Manjaro Linux; compare them with the filtered and home-folder variants. Trace the OpenFileDialog path through the Toga dialog code mentioned in toga/dialogs.py and handlers.py, then verify completion by running the example without the GLib-GIO-CRITICAL messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.