9 Mar
2010
9 Mar
'10
1:26 p.m.
If I understand correctly, you work with MSVC. Then you can use its IDE/Debugger to run and debug your server. Just compile your project in "debug" mode, i.e. without optimizations. Remove SEH __try/__except filters/handlers from your code. Go to Debug-->Exceptions menu. In the "Thrown" column select all the list. Now run your server in the IDE and try reproducing the issue. When it occurs and an exception is thrown, the IDE stops and you can analyze the problem. I guess you've got some invalid memory access, so a general recommendation is to avoid the manual control over objects life-time -- instead, use smart-pointers (shared_ptr, shared_from_this idiom); also avoid using c-style arrays -- stick with std::vector instead.