• 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.3 / New items.otmb + dat/spr problem

Itutorial

Legendary OT User
Joined
Dec 23, 2014
Messages
2,334
Solutions
68
Reaction score
1,011
The client keeps causing the server to trash when I try to log in. I have checked that I am using all the correct versions. There is no error before the server crashes.

Running the server with VS debugger just says: Access Violation at 0x0000000

I have a ground tile and 2 outfits for male and female in the dat/spr. My character has the correct looktype, ect. So none of that should cause a crash.

Also no modifications to otclient or TFS sources.
 
Last edited:
Solution
Okay so I found the problem.

Code:
void Player::internalAddThing(uint32_t index, Thing* thing)
{
    
    if (!thing) { // This check is required sometimes.
        return;
    }
    
    Item* item = thing->getItem();
    if (!item) {
        return;
    }

    //index == 0 means we should equip this item at the most appropiate slot (no action required here)
    if (index > CONST_SLOT_WHEREEVER && index <= CONST_SLOT_LAST) {
        if (inventory[index]) {
            return;
        }

        inventory[index] = item;
        item->setParent(this);
    }
}
Yes. I tried to see if the problem had to do with some new software on my computer I had recently downloaded. That is not the case. I am able to connect into a fresh server and otclient.

Again the only thing I have changed is the items.otb for the server and dat/spr for the client. I did delete monsters, ect. from the server to clean up the console when the server starts. I deleted firstitems from creaturescripts so that nothing is being loaded onto the player on login.

It really doesn't make any sense.
 
Yes. I tried to see if the problem had to do with some new software on my computer I had recently downloaded. That is not the case. I am able to connect into a fresh server and otclient.

Again the only thing I have changed is the items.otb for the server and dat/spr for the client. I did delete monsters, ect. from the server to clean up the console when the server starts. I deleted firstitems from creaturescripts so that nothing is being loaded onto the player on login.

It really doesn't make any sense.

Try to add custom sprites again to a clean client
 
Did you create whole new spr/dat file or what kind of spr/dat file you use?
 
This is what VS says

Code:
Exception thrown at 0x00007FF6590513CA in theforgottenserver-x64.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
 
Bump

Here is the debug info

View attachment 50362
Im no TFS expert but whats causing your crash is that the thing is a nullptr and the code has no validation for this case, so i imagine this is not the expected behaviour. I dont know how to get the source from TFS 1.3 but if you can show the code from line 504 and 250 from the LoginData, maybe we can see what is causing the problem.
 
There is no way that client sprites would cause server to crash.
It do, how i know? because i have many players tried to use normal tibia client, even custom versions of otclientv8 they are not devs, they kept crashing till i told them to change the spr/dat file, also frequent issue is item with messed properties (not sure but it caused issues for me), so i suggest checking the new things you added in the otb file and check again the dat/spr that they are 100% same as the OTB
 
It do, how i know? because i have many players tried to use normal tibia client, even custom versions of otclientv8 they are not devs, they kept crashing till i told them to change the spr/dat file, also frequent issue is item with messed properties (not sure but it caused issues for me), so i suggest checking the new things you added in the otb file and check again the dat/spr that they are 100% same as the OTB
If this would be the case, every server is vulnerable right now. Just use different spr dat and crash the server...
 
If this would be the case, every server is vulnerable right now. Just use different spr dat and crash the server...
Nope, he only who crashes, because the item of id X is not in the client of the crash caster data, but why would it crash for who have the main client?
 
Nope, he only who crashes, because the item of id X is not in the client of the crash caster data, but why would it crash for who have the main client?
aaron paul what GIF by Breaking Bad
 
Back
Top