Looks like it's trying to translate a NULL result to an int on the "freeGridID = atoi(row[0]) + 1;" line:
https://github.com/EQEmu/Server/blob...ints.cpp#L1208
Code:
uint32 ZoneDatabase::GetFreeGrid(uint16 zoneid) {
std::string query = StringFormat("SELECT max(id) FROM grid WHERE zoneid = %i", zoneid);
auto results = QueryDatabase(query);
if (!results.Success()) {
return 0;
}
if (results.RowCount() != 1)
return 0;
auto row = results.begin();
uint32 freeGridID = 1;
freeGridID = atoi(row[0]) + 1;
return freeGridID;
}
This query would return a NULL only if there are no grid entries for the specified zone in the database at all.
It looks like the code should be updated to check for NULL in row[0], and return 0 if it finds it.
A workaround would be to manually add a dummy grid entry to the table for that zone. Something like:
Code:
INSERT INTO `grid_entries` VALUES (0, <<YourZoneID>>, 0, 0.0, 0.0, 0.0, 0, 0);
Replace <<YourZoneID>> with the id of whatever the zone you're seeing the crash in.
That would at least return a 0 to the function in the meantime, instead of a NULL.