Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Inventory changes nuked my client for some reason

Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
Hi, I've been trying to port a bunch of inventory changes, such as hide fashion, resize, 168 slots, perin maker etc... When I start my client, it doesn't even reach the login screen, but the errors make 0 sense for me.

There are 2 main error categories coming back:

First one:
2023/ 2/15 12:50:41 D3DXCreateTextureFromFileInMemoryEx Icon\Icon_CoolTime_000.tga D3DERR_INVALIDCALL
2023/ 2/15 12:50:41 CTexture::LoadTexture : Icon\Icon_CoolTime_000.tga read error
2023/ 2/15 12:50:41 D3DXCreateTextureFromFileInMemoryEx Icon\Icon_CoolTime_001.tga D3DERR_INVALIDCALL
2023/ 2/15 12:50:41 CTexture::LoadTexture : Icon\Icon_CoolTime_001.tga read error

Second one:
2023/ 2/15 12:50:43 D3DXCreateTextureFromFileInMemoryEx Theme\texDialogBox.bmp D3DERR_INVALIDCALL
2023/ 2/15 12:50:43 D3DXCreateTextureFromFileInMemoryEx Theme\texDialogBoxParty.bmp D3DERR_INVALIDCALL
2023/ 2/15 12:50:43 D3DXCreateTextureFromFileInMemoryEx Theme\texDialogBoxGuild.bmp D3DERR_INVALIDCALL
2023/ 2/15 12:50:43 D3DXCreateTextureFromFileInMemoryEx Theme\texDialogEmoticon.dds D3DERR_INVALIDCALL
2023/ 2/15 12:50:43 D3DXCreateTextureFromFileInMemoryEx Theme\texChatEmoticon.dds D3DERR_INVALIDCALL
2023/ 2/15 12:50:43 D3DXCreateTextureFromFileInMemoryEx Theme\texDialogBox_left.tga D3DERR_INVALIDCALL
2023/ 2/15 12:50:43 CTexture::LoadTexture : Theme\texDialogBox_left.tga read error
2023/ 2/15 12:50:43 D3DXCreateTextureFromFileInMemoryEx Theme\texDialogBox_center.TGA D3DERR_INVALIDCALL
2023/ 2/15 12:50:43 CTexture::LoadTexture : Theme\texDialogBox_center.TGA read error

Full error file can be found here:


I've updated my database, updated resource files, changed resData.inc with new inventory definition, added the missing files in Theme/ in the client, etc. As far as I know, I've did everything, I'm not saying it should fully work but these errors mean nothing to me. Or well, they make 0 sense to me.

Anyone recognizes this scenario from their experience? Or anyone can help me?
Anydesk/discord is a possibility if you are willing to do so.

I've been working on this inventory stuff for a few days now. I really can use some help with this current error :/
 
Last edited:
Experienced Elementalist
Joined
Jan 7, 2020
Messages
257
Reaction score
97
Inside APP_INVENTORY did you make sure that the reading for texDialogBox for exmaple is reading a .bmp file and not .tga?
Because if the RESDATA.INC is looking for texDialogBoxGuild.tga and you have texDialogBoxGuild.bmp it might be the issue.
 
Upvote 0
Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
Inside APP_INVENTORY did you make sure that the reading for texDialogBox for exmaple is reading a .bmp file and not .tga?
Because if the RESDATA.INC is looking for texDialogBoxGuild.tga and you have texDialogBoxGuild.bmp it might be the issue.

Thanks for your response. I just checked and all the referenced images are actually inside the /Theme folder. So sadly that's not the reason.
 
Upvote 0
Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
@MrBobo debug the neuz and show the callstack.

Debugging is hard because I don't even reach the login screen, it doesn't jump into any exception or doesn't show any call stack. Just got these 2 popping up constantly.






After I close the client, but debugger is still running, I get the following:


 
Upvote 0
Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
That's usually a sign of wrong res formatting.

You were totally right. I apparently missed a 0 at the end in a few lines.. 2 follow up questions though.

1) Out of curiosity, what does each column mean in these lines in resdata.inc?

Code:
WTYPE_CUSTOM WIDC_CUSTOM14 "" 0 128 4 152 28 0x260000 0 0 0 0 46 112 169

So this part 'WTYPE_CUSTOM WIDC_CUSTOM14 "" ' is clear. But what about the 0 128 4 152 28 0x260000 0 0 0 0 46 112 169?

2) I currently have an error on item.h, a read access violation. And if I try to quick watch m_dwItemId it says 'Unable to read memory.' But that's different then a nullpointer right?




Nevermind... I think I found it... Apparently the script I wrote to change databases was skipping inventory table. So it has a few varchars that r not big enough.



Another update.. My above theory did not fix the issue.. Still having same Unable to read memory. error
 
Upvote 0
Newbie Spellweaver
Joined
Sep 8, 2011
Messages
67
Reaction score
252
1. Resmanager.cpp/.h will contain that answer. That's the file reading for the resdata.inc.
2. Yes. it is different. Sounds like a dangling pointer. It might have been assigned, then deleted, but the variable itself was never reset to nullptr and still points to the address 0x28804f34.

You can always try reviewing the inventory changes you've applied and double check if the serialization, creation of the array / deletion of an object in the array, is correct.
 
Upvote 0
Back
Top