GNOME Bugzilla – Bug 737332
g_win32_get_command_line() break PyGObject
Last modified: 2014-10-23 05:45:23 UTC
in gio\gapplication.c at g_application_run() changes has been made in 2.39.4 (till latest version) to use g_win32_get_command_line() to retrieve arguments. In PyGObject this cause application refuse to start by throwing obscure message: GLib-GIO-CRITICAL **: This application can not open files. This affecting everything that use application class. Reverting those changes allow gtk-demo.py to run normally again.
By the way we at mypaint also use CommandLineToArgvW in main.py to overcome unicode arguments issue. In case it's wrong to fix Glib how this supposedly works in python under Windows?
Hi Bakhtiar, I think the issue has to do with something like how we are dealing with argv and the command retrieved by CommandLineToArgvW(). So, in CommandLineToArgvW() we get everything that is used to invoke the script (including in this case, python xxx.py, for example), and g_application_run() wouldn't be able to cope with "python", as it is not by itself ready to deal with by GApplication, AFAICT. I have a proposed fix for this, in bug 734095, so probably I think it is best we we continue to look there for this issue. With blessings, thank you! *** This bug has been marked as a duplicate of bug 734095 ***