[DiscordArchive] In the DBCFileLoader::AutoProduceData, when it calls `getRecord(y).getUInt(i)` is it creating a `Rec
[DiscordArchive] In the DBCFileLoader::AutoProduceData, when it calls `getRecord(y).getUInt(i)` is it creating a `Rec
Archived author: Kek • Posted: 2022-05-30T21:11:31.251000+00:00
Original source
In the DBCFileLoader::AutoProduceData, when it calls `getRecord(y).getUInt(i)` is it creating a `Record` object and just tossing it?
Archived author: Kek • Posted: 2022-05-30T21:20:13.824000+00:00
Original source
I'm having massive memory leaks when processing some dbc files, and I'm trying to find out where they're coming from
Archived author: Kek • Posted: 2022-05-30T22:27:16.648000+00:00
Original source
Holy shit, it's creating a ptr array of size 3,162,177,726....
Archived author: Kek • Posted: 2022-05-30T22:53:36.524000+00:00
Original source
~~Found the issue! And found a fix! So it's probably the actual issue this time!~~
Probably found the issue this time... the server doesn't allow logins...
There's a DbcFieldFormat that's not being capture correctly: Auto-generated
Basically, the field doesn't exist in the data, so the code will use the next field casted to int to determine the "max" value of the list.
This will cause the server to think that the array is 3 billion units long, and it will create an array that is 3 billion units long... about 17 times. I capped out at 52GBs before it ground to a halt.
Thought I fixed it, but looks like it broke something else, wohoo
Archived author: Kek • Posted: 2022-05-30T23:06:21.773000+00:00
Original source
Confirmed that it's a casting problem:
```c++
// Put this right before the indexTable = new ptr[maxi];
if (maxi > 5000000)
LOG_ERROR("dbc", "CASTING PROBLEM ON FORMAT {} - {} - {}", format, maxi, *reinterpret_cast<float*>(&maxi));```
Found this in my logs:
```C:\Full Access Build\bin\RelWithDebInfo\Data/dbc/gtBarberShopCostBase.dbc
CASTING PROBLEM ON FORMAT df - 1213872896 - 223468```
Archived author: Kek • Posted: 2022-05-30T23:06:45.603000+00:00
Original source
And checked the barbershop file, that value is the last value in the file, and surprisingly it's a float and not an int
Archived author: Kek • Posted: 2022-05-30T23:16:11.057000+00:00
Original source
~~... the fix was working... I just forgot to launch the auth server...~~
You know what, fuck this issue
Archived author: Kek • Posted: 2022-05-30T23:43:34.679000+00:00
Original source
Finally, got it done
Archived author: Kek • Posted: 2022-05-30T23:43:42.784000+00:00
Original source
Gonna edit the issue and get the proper one in there
Archived author: Nyeriah • Posted: 2022-05-30T23:47:33.824000+00:00
Original source