Re: gtk_file_chooser page faults (win32)



David writes:
THAT'S IT!!!!!!!!!!

I set HOME to a value and sure enough, it works!  I then went into msys
and unset HOME and it crashed the same way.

g_get_home_dir() can return NULL on Unix, too, if for some reason
there is no passwd entry for the user. Not that common, true, but can
easily happen for instance if you name service (like NIS+, NIS or
LDAP) is temporarily down. But anyway, one should always check for
NULL return value from it. I now notice that gtkfilesystemwin32.c
doesn't check ... Will have to fix.

Probably in some of the documentations for mingw, it may have told us to
set HOME in Windows, but this shouldn't cause the program to crash.

I didn't try it, but I'm confident that if I unset HOME in Linux, the
program would crash as well.

Presumably not, as the environment variable HOME is used only if no
passwd entry is found. You would have to make getpwuid(getuid()) fail,
too.

--tml





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]