[pgrouting-users] Server Crash in debug code in BiDirAStar.cpp in dev branch
Dave Potts
dave.potts at pinan.co.uk
Tue Aug 13 14:13:40 PDT 2013
If you compile the BiDirAStar with the DEBUG enabled
The following block of code is switched in (lines 33-39)
#define DBG(format, arg...) \
dbg = fopen("/tmp/sew-debug", "a"); \
fprintf(dbg, format, ## arg); \
fclose(dbg);
#else
If the file /tmp/sew-debug can not be written to, the open will fail,
the fprintf on the following line will then be invoked on a null
pointer, with the result that program will crash, you need to say
something like
#define DBG(format, arg...) \
dbg = fopen("/tmp/sew-debug", "a"); \
if(dbg != NULL ){\
fprintf(dbg, format, ## arg); \
fclose(dbg);\
}
#else
More information about the Pgrouting-users
mailing list