Metis 4.0 crashes at GKfree

Dear all,

I built the Metis 4.0 as a static library in Windows XP by 2003 & 2005. The library was linked to a C++ program together with a Fortran static library, which calls the function "METIS_NODEND" to reorder sparse matrix. Now the problem is: sometimes the program will crash at "GKfree" function at file "util.c" (not always crash and different machines have different results). Could you please help me to solve the problem?

In addition, I tried to add "try...catch" in the function as follows:
void GKfree(void **ptr1,...)
va_list plist;
void **ptr;

if (*ptr1 != NULL)
*ptr1 = NULL;

va_start(plist, ptr1);

/* while ((int)(ptr = va_arg(plist, void **)) != -1) { */
while ((ptr = va_arg(plist, void **)) != LTERM) {
if (*ptr != NULL)
*ptr = NULL;


but it can't pass the compiling and the following errors displayed:
D:\metis-4.0\Lib\util.c(125): error C2065: 'try' : undeclared identifier
D:\metis-4.0\Lib\util.c(125): error C2143: syntax error : missing ';' before '{'
D:\metis-4.0\Lib\util.c(144): error C2059: syntax error : ')'
D:\metis-4.0\Lib\util.c(144): error C2143: syntax error : missing ')' before '...'
D:\metis-4.0\Lib\util.c(148): error C2059: syntax error : '}'

Could you please help me to modify the code?

Zhanghong Tang