opentibia / server

An open source server for the MMORPG Tibia.
GNU General Public License v2.0
414 stars 149 forks source link

Use item legacy debug #37

Closed Ezzz-dev closed 9 years ago

Ezzz-dev commented 9 years ago

Basically used a door house and this happened, at least any info about why is this happening would be okay.

(gdb) bt

0 0x000000000046500c in Game::internalGetThing (this=this@entry=0x7bbf40, player=player@entry=0x7fff454f5c80, pos=..., index=index@entry=1, spriteId=spriteId@entry=1638, type=type@entry=STACKPOS_USEITEM) at game.cpp:555

1 0x000000000046a1a4 in Game::playerUseItem (this=0x7bbf40, playerId=268460163, pos=..., stackPos=1 '\001', index=0 '\000', spriteId=1638) at game.cpp:2543

2 0x00000000004a26d5 in operator() (this=0x1de11c8) at /usr/include/boost/function/function_template.hpp:760

3 operator() (this=0x1de11c0) at tasks.h:44

4 Dispatcher::dispatcherThread (p=0x7bbe80) at tasks.cpp:87

5 0x00007ffff7e7c629 in boost::(anonymous namespace)::thread_proxy (param=) at libs/thread/src/pthread/thread.cpp:121

6 0x00007ffff71e3b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0

7 0x00007ffff642ee6d in clone () from /lib/x86_64-linux-gnu/libc.so.6

8 0x0000000000000000 in ?? ()

iryont commented 9 years ago

Hey

These lines do not match with the Legacy branch. It seems like something is either wrong with this gdb log or you did use a different server.

Ezzz-dev commented 9 years ago

Yes, I'm sorry I forgot I had added some external code. The line of debug is this: https://github.com/opentibia/server/blob/legacy-dev/src/game.cpp#L398

iryont commented 9 years ago

What did you change besides that? It looks like you have invalid Thing object within Tile (pointer to freed object or invalid pointer). The best way is to simply download legacy branch and give it a try whether it crashes the same way as your server does.

Ezzz-dev commented 9 years ago

Strangely only happens under a Linux environment, not under Windows.

assassina commented 9 years ago

I think that it is very unlikely to have such a basic bug at legacy, but still... Does it happen everytime that you try to open any door or only happens in a particular door? Please, try to reproduce it at the pure legacy branch. I am a linux user, if you manage to reproduce it at pure legacy, I might try to reproduce it as well.

assassina commented 9 years ago

Too much time without any new thing about this issue. I will close this, as it really looks like an issue with some external code.