Re: [Cppcms-users] SIGABRT problem raised between SVN rev1474 and 1491
Brought to you by:
artyom-beilis
From: Julian P. <ju...@wh...> - 2010-10-26 22:15:35
|
> > I don't see any issues in the code and location valgrind is posting. > > Also I tryid to run a full build and test on x86 machine - no issues. > > 1. Make sure that you fully recompile your own code after building and > installing latest CppCMS. > > 2. If this still happens please provide minimal code sample that reproduces > the problem, without it I can't do anything and I may only assume that > memory corruption happens in your code. > Hallo, I see your point and will try to provide a sample tomorrow. I nevertheless think that it must have at least something to do with your changes between the two revisions mentioned, because with the same code on my side (of course, recompiled for the revision to be tested) with the earlier revision everything works smooth while it doesn't with the latter revision. Couldn't the invalid write mentioned in valgrind's outputs lead to the SIGABRT? What I don't understand anyway is 1. Why does the SIGABRT occur when running without any debugger attached or with gdb, but not with valgrind? The program runs (besides of the given log output) without any problems, but of course slower than normal. Even if my application doesn't use more than one thread at this time and cppcms::service ist not started at that point, it almost looks like a Race condition, but how could that be when only one thread is running? 2. Why, at all, is it a SIGABRT and not a SIGSEGV? According to the output it is a memory access violation and should be a SIGSEGV then, I think. What I do in the method where the crash occurs is basically the following: - Given is a std::vector of std::strings (filepaths) as reference - I iterate through the vector, and for each of the strings I call a method which tries to open the given filepath and, if successful, loads it via is >> v; to a json::value, where is is a std::ifstream. - Then, another method is invoked to parse this value. A bad_value_cast exception may be thrown if the file has an invalid format - If the first method is not successful in loading any of the given files, it throws a bad_cast exception like the following: throw(cppcms::json::bad_value_cast("None of the given files could be loaded.")); Could it be that you changed the implementation of bad_value_cast so that an instantiation like this is not possible anymore? THanks, Julian |