Bug 2431179 - g_file_get_contents fails on windows with 'Invalid Argument'
Summary: g_file_get_contents fails on windows with 'Invalid Argument'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mingw-glib2
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-01-20 12:31 UTC by Jean-Louis Dupond
Modified: 2026-01-20 13:08 UTC (History)
5 users (show)

Fixed In Version: mingw-glib2-2.87.1-2.fc44
Clone Of:
Environment:
Last Closed: 2026-01-20 13:08:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jean-Louis Dupond 2026-01-20 12:31:47 UTC
When doing a 'g_file_get_contents' call on windows, it fails with 'Invalid Argument'.

This happend when I build virt-viewer on Fedora Rawhide.

After some troubleshooting, I found out that rebuilding mingw-glib2 without the '0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch' fixes the issue.

Seems like the patch is already quite old, and most likely broke something in more recent glib2 versions.

Reproducible: Always

Comment 1 Richard W.M. Jones 2026-01-20 12:42:06 UTC
I agree.  The patch was added in 2012, and the upstream bug was "RESOLVED OBSOLETE"
in 2018.  If there is still an upstream bug that this patch is supposed to be fixing,
let's get upstream to fix it.  But it seems unlikely that is the case now.

Comment 2 Richard W.M. Jones 2026-01-20 12:43:48 UTC
Scratch build without the patch: https://koji.fedoraproject.org/koji/taskinfo?taskID=141343540

Comment 3 Fedora Update System 2026-01-20 13:06:11 UTC
FEDORA-2026-69ecceae52 (mingw-glib2-2.87.1-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-69ecceae52

Comment 4 Fedora Update System 2026-01-20 13:08:23 UTC
FEDORA-2026-69ecceae52 (mingw-glib2-2.87.1-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.