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

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
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:

Mustafa1337

Î Àm ŁĕğẹňĎ
Joined
Mar 4, 2017
Messages
306
Reaction score
76
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:
OP
R

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
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.
 
OP
R

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
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
how i can look in this img? (server crashed)
35967
 

Mustafa1337

Î Àm ŁĕğẹňĎ
Joined
Mar 4, 2017
Messages
306
Reaction score
76
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:

TheGahl

Learning in Progress
Joined
Jul 28, 2018
Messages
116
Reaction score
55
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..
 
OP
R

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
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
 

Mustafa1337

Î Àm ŁĕğẹňĎ
Joined
Mar 4, 2017
Messages
306
Reaction score
76
So the problem is that you can't get a crash log? or you can't fix your source? Because I thought this thread was about how to make a crash log.
 
OP
R

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
So the problem is that you can't get a crash log? or you can't fix your source? Because I thought this thread was about how to make a crash log.
about either, have posted new video relating how bug occours, because i cant solve it by myself
 
OP
R

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
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..
added a video, and using default files, without modifications in lua/source code
 

Manigold

Member
Joined
Nov 2, 2017
Messages
36
Reaction score
2
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
 
OP
R

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
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?
 

Manigold

Member
Joined
Nov 2, 2017
Messages
36
Reaction score
2
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:
OP
R

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
402
Reaction score
39
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?
 
Top