GNOME Bugzilla – Bug 789784
MacOS: 2.54.2 release results in crash on macports due to create_cstr_from_cfstring changes
Last modified: 2017-11-03 12:11:28 UTC
In bug https://bugzilla.gnome.org/show_bug.cgi?id=788936 the buggy implementation of create_cstr_from_cfstring was discussed and this patch: https://github.com/GNOME/glib/commit/2bd423c54c4793784059f983b6269a51e073cda9 was commited to master branch. However a previous patch from John was merged to the 2.54 branch: https://github.com/GNOME/glib/commit/d5a9ce69c46a907af8ed3af0020d2a409faa3751 The 2.54.2 release made it to macports and now my pspp application crashes... The backtrace shows: * frame #0: 0x00007fff9af8c33f CoreFoundation`CFStringGetLength + 15 frame #1: 0x00000001018c9e0e libgio-2.0.0.dylib`create_cstr_from_cfstring + 19 frame #2: 0x00000001018c9afc libgio-2.0.0.dylib`g_content_type_get_mime_type + 337 frame #3: 0x00000001011f36b4 libgtk-3.0.dylib`node_compute_visibility_and_filters + 171 frame #4: 0x00000001011f1e34 libgtk-3.0.dylib`add_file + 281 frame #5: 0x00000001011f1c26 libgtk-3.0.dylib`_gtk_file_system_model_update_file + 191 frame #6: 0x00000001011f242e libgtk-3.0.dylib`gtk_file_system_model_query_done + 50 frame #7: 0x0000000101871fc2 libgio-2.0.0.dylib`g_task_return_now + 40 frame #8: 0x0000000101871ff5 libgio-2.0.0.dylib`complete_in_idl and I assume that the crash is due to the str==NULL check AFTER the use of str in CFStringGetLength. When I use glib from todays master branch, then I get many (psppire.bin:57459): GLib-GIO-CRITICAL **: create_cstr_from_cfstring: assertion 'str != NULL' failed warnings. I reverted commit d5a9ce69c46 in the glib-2-54 branch and then the crash is gone. So my suggestion is to revert d5a9ce69c46 in the glib-2-54 branch and then merge https://github.com/GNOME/glib/commit/e55efa35e3b1a0b810f7605028406b3c6b442679 https://github.com/GNOME/glib/commit/2bd423c54c4793784059f983b6269a51e073cda9 https://github.com/GNOME/glib/commit/37c0610b4d6b43fc9aea7983d1e82be7fdae6660 to glib-2-54
I've reverted d5a9ce69. I'll leave it to Phillip to decide whether to backport the others to glib-2-54.
Hi John, thanks. Maybe it would be even better to revert even more changes in the 2.54 branch regarding the MacOS behavior. As discussed in https://bugzilla.gnome.org/show_bug.cgi?id=788936 the following does not work at least in the pspp application. - Icon display in the file selection dialog not even for folders - File selection filter if the file is selected by mime type Icon display does also not work in Jiris application. This is quite bad and it worked in previous versions of glib. Macports uses as default the old X based content and the buggy behavior is only visible in the "quartz" version.
(In reply to John Ralls from comment #1) > I've reverted d5a9ce69. I'll leave it to Phillip to decide whether to > backport the others to glib-2-54. Thanks for reverting that; I didn’t notice it had originally been pushed to 2.54. See comment #51 on bug #788936 for my position on backporting the patches there. Since the crash here should be fixed by the revert in comment #1, I’m closing this bug. If any further discussion about backports from bug #788936 needs to happen, let’s discuss it on bug #788936.