mangos / MaNGOS

This is the master Information repository for MaNGOS
http://getmangos.eu
3.02k stars 1.36k forks source link

Print stack trace in ByteBufferException::PrintPosError. #62

Closed LordJZ closed 12 years ago

LordJZ commented 12 years ago

Helps a lot when debugging new packet structures.

VladimirMangos commented 12 years ago

Nice)

scr4tchy commented 12 years ago

It causes the compilation to fail on Debian 6.0. No tests was done ?

http://pastebin.com/v355Gy10

Using: cmake ../ -DPREFIX=/opt/mangos -DPCH=1 -DACE_USE_EXTERNAL=0 -DDEBUG=0 -DTBB_USE_EXTERNAL=0;

By the way, please update the crappy guide!

Thanks.

Schmoozerd commented 12 years ago

Looks like some inline issues - most likely the file ByteBuffer.h should not be inlcuded in any headers at all.

(call stack is from sd2 use - which clearly does not need ByteBuffer)

VladimirMangos commented 12 years ago

ACE_Stack_Trace possible not exist in old ACE versions. Or maybe some include missing. Look in https://github.com/mangos/mangos/blob/master/src/shared/Errors.h

ifdef HAVE_ACE_STACK_TRACE_H

Also it cleary must be in .cpp instead header. Same build error must be at Freebsd with old system port ACE

LordJZ commented 12 years ago

I'm pretty sure my Debian 6 with ACE 6.0.0 has ACE_Stack_Trace. Possibly bundled ACE version issue?

Thanks to @VladimirMangos, I will put some defines in and open a new pull request.