Runtime errors with testglib.exe (Win32 build)
- From: John Emmas <johne53 tiscali co uk>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Runtime errors with testglib.exe (Win32 build)
- Date: Wed, 6 Oct 2010 18:33:34 +0100
I'm running glib version 2.24.0. It probably isn't the very latest stuff but reasonably current, I think.
Having recently built it under Win32 (using Visual C++) I decided to run the test application (testglib.exe).
Everything runs fine until I get to the File Functions test, at which point I keep getting debug assertions.
These seem to be caused by the code calling close() with an invalid file handle (I.e. a handle value of -1).
For example, this code (starting at line 881 of file tesglib.c) will assert when it reaches the close();
statement:-
char template[32];
gint fd;
[ ... ]
strcpy (template, "foobar");
fd = g_mkstemp (template);
if (g_test_verbose() && fd != -1)
g_print ("g_mkstemp works even if template doesn't end in XXXXXX\n");
close (fd);
Despite the displayed message, g_mkstemp() seems NOT to work unless the supplied template string ends in
"XXXXXX" - so this section of code returns an invalid file handle. The line 'close(fd);' then gives me a
debug assertion error.
There's at least one other place where this is happening (which I haven't tracked down yet). I just wondered
if this is a known problem or if I need to provide some more information.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]