• 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!

TFS 1.X+ tfs 1.2 how can i create a crash log? server crash when login after dies

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
200
How can i create a crash log in tfs 1.2? I use windows.
My source is crashing randomly, and i need to check why...
EDIT: added a video about the crash
How crash works?
thousands of seconds before dying, with my player with 0 of life, I press ctrl + g, (with player 0 health), and when i try to log in, server crash... the first time in the video I did not press ctrl + g at the right time, so it only crashed the second time
obs: I am using the default files of source 1.2 (8.6), without modifying any file in lua
obs2:
I do not know if I compiled using the right libs, could this be the problem? (compiled with visual studio 2015)
compiled normal and ran normal server


 
Last edited:
Run your visual studio, load your source files, run TFS, choose Debug 6th one on top, choose attach to process, attach TFS then after it crashes it will show logs of the crash you can go back to debug and choose save dump as.
1 : Run source normally
35960
2 : Run your TFS
35961
3 : Choose debug 6th one on top
35962
4 : choose Attach to Process
35964
5 : Attach the forgotten server from your process list
35965
 
Last edited:
can
can u show me where?
edit: now i see your image, i'll try it!
Run your visual studio, load your source files, run TFS, choose Debug 6th one on top, choose attach to process, attach TFS then after it crashes it will show logs of the crash you can go back to debug and choose save dump as.
 
I think you'll have to break then check which lines are getting the error and fix by yourself or save crash dump and let someone take a look at it.
Sorry I am not good on source editing but I used to take crash dump/screenshot and report it to Nekiro since I am using her TFS 1.3 and I also knew this method by her.
Here is how it looked for me it shows the error line
35968
Same for you I can read down there, Line 50/Line 269
 
Last edited:
how i can look in this img? (server crashed)
View attachment 35967

I'm 99.999999% sure it's lua script based.
access violation normally means you tried to modify/read an object that isn't there anymore..

For example.. you probably have this somewhere
player = Player(cid)
And because you didn't define it as local.. which would make it look like this
local player = Player(cid)
the variable "player" could be accessed from anywhere in your lua scripts..

And then.. maybe you have a function there you forgot to define "player".. but still modify it..

like this..
Player 1 does something.. the function called does this
function doShit(cid)
player = Player(cid)
player:setStorageValue(1, 0)
end

after that, player 1 logout..
And then player 2 does something else, but a function there "player" isn't defined..
function doOther(cid)
player:getStoragevalue()
end

Because you didn't "renew" the variable of "player" and still try to do something with it, normally it would cast an error or something, but since player 1 already used a function that make "player" global, player 2 will access it and try to modify it.. so it's player 1 that will be modified instead of player 2, but player 1 isn't online anymore..
Which means, you're trying to modify an object, that isn't there anymore..

Which.. should result in a crash that may look like yours.

Notice however.. these kind of crashes doesn't just happens on "player", it can happen towards any object..
such as.. Creature(cid), Town(id), Contained(uid), and so on.. any object that exist..
 
I'm 99.999999% sure it's lua script based.
access violation normally means you tried to modify/read an object that isn't there anymore..

For example.. you probably have this somewhere
player = Player(cid)
And because you didn't define it as local.. which would make it look like this
local player = Player(cid)
the variable "player" could be accessed from anywhere in your lua scripts..

And then.. maybe you have a function there you forgot to define "player".. but still modify it..

like this..
Player 1 does something.. the function called does this
function doShit(cid)
player = Player(cid)
player:setStorageValue(1, 0)
end

after that, player 1 logout..
And then player 2 does something else, but a function there "player" isn't defined..
function doOther(cid)
player:getStoragevalue()
end

Because you didn't "renew" the variable of "player" and still try to do something with it, normally it would cast an error or something, but since player 1 already used a function that make "player" global, player 2 will access it and try to modify it.. so it's player 1 that will be modified instead of player 2, but player 1 isn't online anymore..
Which means, you're trying to modify an object, that isn't there anymore..

Which.. should result in a crash that may look like yours.

Notice however.. these kind of crashes doesn't just happens on "player", it can happen towards any object..
such as.. Creature(cid), Town(id), Contained(uid), and so on.. any object that exist..

i have tested with default files, and the crash occours again
 
i have this same problem , but apparently only happens if you log in through the host computer ( so its not a big problem ), and i can't reproduce this using otclient, only with tibia client
 
and what src code are u using?
tfs 1.2 downgraded by ninja , happens on both 8.6 and 8.0
EDIT: tested right now and otx 3 with 8.6 version(otx 3 is based on the tfs 1.2) has the same problem(gonna try other versions of otx)
 
Last edited:
tfs 1.2 downgraded by ninja , happens on both 8.6 and 8.0
EDIT: tested right now and otx 3 with 8.6 version(otx 3 is based on the tfs 1.2) has the same problem(gonna try other versions of otx)
ok bro, and about 1.3 do u know if have the same bug?
 
Added photos to main reply
this is last step
6 : After server crash or something happens you'll get error report save it from here Save Dump As
View attachment 35966
I'm following your steps because my server is crashing is a tfs 1.3.Have i to keep msvc studio this whole time opened this server crashes right? im having crashes after +12 of server online
 
Back
Top