• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to make crash report(OTServ and Tfs)

Pietia

Active Member
Joined
Jan 13, 2008
Messages
2,147
Reaction score
48
Location
Poland
This is edited version of :
How To Make Best Bug Reports
which was orginally written by Primer
This "tutorial" is written for otserv in tfs u have to change some things like ./otserv to executable file of tfs like ./theforgottenserver.
This is only a simple guide to you all for a faster bug correction.

When you find a bug...
- The developers, need to know how to reproduce that bug to fix it.
- Too is usefull a stack trace report (thx to spin for that).


What do you need to explain in a bug report?

If you know how to reproduce that bug again, you must explain how to reproduce the bug (for example "if you throw items over a hole the server crashes").
If you dont know how to explain it well in english you can use screenshots to help .
Pasting the trace report will be very usefull too (explained later).
Where to report otserv svn bugs (revscriptsys and trunk 0.6.3):
https://github.com/opentibia/server/issues?state=open

How to activate the Strack Trace reports? (crash reports) (WINDOWS MSVC)
Open Tibia currently supports great MSVC
How to compile:
http://otland.net/threads/compiling-simple-otserv-msvc-2010-linux-compiling-the-source.218342/

After you enconter on crash with your server it will create a minidump file in your main directory(there where exe is it will be called something like "otserv_21-02-2011_20-21-52.mdmp".)
After that upload the .exe and the .mdmp file to some site like speedy*****malware.localhost and post the links to it in bug report section.

How to activate the Strack Trace reports? (LINUX)
Firstly install required programs
Code:
apt-get install gdb
Write this in command line the best will be if it will be placed in screen program so if u close putty it won't be terminated.
Code:
#!/bin/bash
ulimit -c unlimited
while true; do ./otserv --log-file "output.txt" "error.txt"; done
It is gdb (crash reports) + autorestarter + console log storage to output.txt.
Now when otserv will crash it will drop a core dump with log(a new file named
core.pid , remember that u have to change pid for process id of crashed otserv example 4154)
now to "read" crash report u have to do following :
Code:
gdb otserv core.pid
after a while write
Code:
bt
Windows crash backtrace example:
Screenshot5.png


Linux gdb crash backtrace example:
Code:
#0  Npc::removeShopPlayer (this=0x1, player=0xb4b89ea0) at /usr/include/c++/4.3/bits/stl_list.h:649
649           { return iterator(this->_M_impl._M_node._M_next); }
(gdb) bt
#0  Npc::removeShopPlayer (this=0x1, player=0xb4b89ea0) at /usr/include/c++/4.3/bits/stl_list.h:649
#1  0x080c3321 in Npc::onPlayerEndTrade (this=0x1, player=0xb4b89ea0, buyCallback=-1266598056, sellCallback=-1277184960) at npc.cpp:2107
#2  0x0811c3d4 in Player::closeShopWindow (this=0xb4b89ea0) at player.cpp:1727
#3  0x080b2863 in Npc::closeAllShopWindows (this=0xcad8c48) at npc.cpp:2878
#4  0x080bd283 in Npcs::reload (this=0x8214498) at npc.cpp:57
#5  0x080f64f5 in TalkAction::reloadInfo (player=0xb27fded8, words=@0xb6a5f0f4, param=@0xb6a5f0f0) at talkaction.cpp:369
#6  0x080f6da4 in TalkActions::onPlayerSpeak (this=0x9b58f78, player=0xb27fded8, type=SPEAK_SAY, words=@0x9f0ae24) at talkaction.cpp:183
#7  0x080a5329 in Game::playerSay (this=0x8213e40, playerId=268568707, channelId=0, type=SPEAK_SAY, receiver=@0x9f0ae20, text=@0x9f0ae24) at game.cpp:3485
#8  0x08173455 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<bool, boost::_mfi::mf5<bool, Game, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&>, boost::_bi::list6<boost::_bi::value<Game*>, boost::_bi::value<unsigned int>, boost::_bi::value<unsigned short>, boost::_bi::value<SpeakClasses>, boost::_bi::value<std::string>, boost::_bi::value<std::string> > >, void>::invoke (function_obj_ptr=@0xc1a5bec)
    at /usr/include/boost/bind/mem_fn_template.hpp:604
#9  0x080fdb41 in boost::function0<void, std::allocator<void> >::operator() (this=0xc1a5be8) at /usr/include/boost/function/function_template.hpp:825
#10 0x080fce3b in Dispatcher::dispatcherThread (p=0x8214000) at tasks.h:43
#11 0xb7c3f22e in thread_proxy () from /usr/lib/libboost_thread-mt.so.1.35.0
#12 0xb78274c0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#13 0xb791b6de in clone () from /lib/i686/cmov/libc.so.6
(gdb)
 
Last edited:
Wow, the Linux one looks a lot easier to read. I'm surprised. :p

Great tutorial!
 
boz u're too stupid to use it propely
 
It still works, even Primer made the thread in 2005?
 
One more thing to rlly use.. Linux just look at that nice clean log <3 :D
 
Back
Top