help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Application crash due to assert in GLPK


From: xypron
Subject: Re: [Help-glpk] Application crash due to assert in GLPK
Date: Sat, 23 Jan 2010 16:37:39 -0800 (PST)

Hello Sylvain,

the assert fails when the the system clock is read twice and the newly read
time
is less then last read time.

This error may occur for instance if you update the system time of the
operating system.
This can easily occur unvoluntarily if you system is synchronizing with an
NTP server.

Unfortunately a failed xassert will completely stop the program that called
the glpk
native library. With the current design it is not possible to catch a Java
exception.

I wonder if it was wise to put an assert here since GLPK should not fail due
to
a change the system time.

Hence I suggest Andrew could remove the assert in function x_time.

Please, replace
done: xassert(xlcmp(env->t_last, t) <= 0);
by
done: if (xlcmp(t, env->t_last) < 0) t = env->t_last;

Best regards

Xypron


Sylvain Fournier wrote:
> 
> Hi everybody,
> I have been using GLPK (version 4.38) for Java for almost one year now. I
> just encontered (for the first time, fortunately) an assert that crashed
> in
> GLPK and that killed my whole Java application. This assert is located
> glplib10.c, line 109: xassert(xlcmp(env->t_last, t) <= 0);
> It seems to be a strange time problem, but I wonder if I can do something
> to
> prevent this error to occur once again in the future.
> Am I responsible for this error? Is there a way for me to be sure that I
> won't run into the error again? If not, can I catch this type of errors in
> my Java application in order to treat it appropriately?
> Thanks,
> 
> Sylvain Fournier
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Application-crash-due-to-assert-in-GLPK-tp27244651p27291344.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]