After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169349 - g_get_system_data_dirs(), g_get_system_config_dirs() return NULL on win98 (and NT4?)
g_get_system_data_dirs(), g_get_system_config_dirs() return NULL on win98 (an...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
2.6.x
Other Windows
: Normal major
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
: 168608 171764 172064 172273 172698 302241 (view as bug list)
Depends on: 169348
Blocks:
 
 
Reported: 2005-03-06 01:41 UTC by Daniel Atallah
Modified: 2005-05-18 02:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add fallback to CSIDL_APPDATA. (761 bytes, patch)
2005-03-06 01:43 UTC, Daniel Atallah
none Details | Review

Description Daniel Atallah 2005-03-06 01:41:30 UTC
Distribution/Version: 98

g_get_system_data_dirs() uses the special folders specified by
CSIDL_COMMON_APPDATA and CSIDL_COMMON_DOCUMENTS and g_get_system_config_dirs()
uses CSIDL_COMMON_APPDATA.

The above CSIDLs are not available prior to WindowsME/2000 (unless you are using
the ShFolder redistributable (in which which case you also need to link to
SHFolder.lib))

g_get_system_data_dirs() is used in gkeyfile.c and gtkicontheme.c; both cases
don't expect a NULL value to be returned and will consequently blow up.

This effectively makes most gtk apps (anything that uses a window with
decorations) unusable on Windows98.

I think it makes sense we should be able to assume that thse functions won't
return NULL, so I think that they should fall back to CSIDL_APPDATA.

I'll post a patch in a minute.
Comment 1 Daniel Atallah 2005-03-06 01:43:45 UTC
Created attachment 38325 [details] [review]
Add fallback to CSIDL_APPDATA.

This patch assumes that the patch attached to Bug #169348 has been applied.
Comment 2 Daniel Atallah 2005-03-06 05:20:31 UTC
This causes the crash in Bug# 168608.
Comment 3 Tor Lillqvist 2005-03-09 02:31:06 UTC
I think it's better to have g_get_system_data_dirs() and
g_get_system_config_dirs() return an array with just a single NULL element if
they can't figure out what to return. The committed fix for #169348 does that,
so it should solve this bug, too.
Comment 4 Tor Lillqvist 2005-03-09 02:32:05 UTC
*** Bug 168608 has been marked as a duplicate of this bug. ***
Comment 5 Sven Neumann 2005-03-27 12:49:19 UTC
*** Bug 171764 has been marked as a duplicate of this bug. ***
Comment 6 Tor Lillqvist 2005-03-31 17:16:08 UTC
*** Bug 172273 has been marked as a duplicate of this bug. ***
Comment 7 Tor Lillqvist 2005-04-27 14:00:04 UTC
*** Bug 172698 has been marked as a duplicate of this bug. ***
Comment 8 Manish Singh 2005-04-28 03:57:15 UTC
*** Bug 302241 has been marked as a duplicate of this bug. ***
Comment 9 Matthias Clasen 2005-05-18 02:27:22 UTC
*** Bug 172064 has been marked as a duplicate of this bug. ***