Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2004, 01:06 PM
tofuwarrior
Fire Beetle
 
Join Date: Feb 2004
Posts: 19
Default 5.5DR1 Character Creation bug

I found worlddebug.exe blowing up on me during character creation and I narrowed it down to a bug in database.cpp

The problem is in:

bool Database::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct* in_cc)

The original code looked like this:
Code:
if((rows = mysql_num_rows(result)) == 1) row = mysql_fetch_row(result);
if(result) mysql_free_result(result);	

if(row)
{         
	LogFile->write(EQEMuLog::Status, "Found starting location in start_zones");
	in_pp->x = atoi(row[0]); 
	in_pp->y = atoi(row[1]); 
	in_pp->z = atoi(row[2]); 
	in_pp->zone_id = atoi(row[3]); 
	in_pp->bind_zone_id = atoi(row[4]); 
}
The problem with this was that, on my system anyway, when mysql_free_result was called... row was no longer a valid pointer but it was also not 0. For this reason, the first atoi call caused the system to crash.

I modifed this section to this:
Code:
rows = mysql_num_rows(result);

LogFile->write(EQEMuLog::Status, "Rows returned %d\n",rows);

if(rows == 1) row = mysql_fetch_row(result);
	
if(row)
{         
	LogFile->write(EQEMuLog::Status, "Found starting location in start_zones... ");
	in_pp->x = atoi(row[0]); 
	in_pp->y = atoi(row[1]); 
	in_pp->z = atoi(row[2]); 
	in_pp->zone_id = atoi(row[3]); 
	in_pp->bind_zone_id = atoi(row[4]); 
	LogFile->write(EQEMuLog::Status, "success! \n");
}
and I moved the mysql_free_result to the end:

Code:
	
if(result) mysql_free_result(result);

if(in_pp->x == 0 && in_pp->y == 0 && in_pp->z == 0)	database.GetSafePoints(in_pp->zone_id, &in_pp->x, &in_pp->y, &in_pp->z);

if(in_pp->bind_x == 0 && in_pp->bind_y == 0 && in_pp->bind_z == 0) database.GetSafePoints(in_pp->bind_zone_id, &in_pp->bind_x, &in_pp->bind_y, &in_pp->bind_z);

LogFile->write(EQEMuLog::Status, "Returning True from GetStartZone\n");
return true;
}
After this.. I was able to create characters properly. I still can't zone into the game without crashing the client though (
Reply With Quote
  #2  
Old 02-23-2004, 03:43 PM
samandhi's Avatar
samandhi
Demi-God
 
Join Date: Aug 2003
Posts: 1,056
Default

Quote:
After this.. I was able to create characters properly. I still can't zone into the game without crashing the client though (
Have you installed dx9? SOE is going to dx9 as of the 18th patch....
__________________

Quote:
Analysis paralysis will keep you from failing, but it will also keep you from succeeding.
  • L.L. CoolJ
Reply With Quote
  #3  
Old 02-23-2004, 11:45 PM
tofuwarrior
Fire Beetle
 
Join Date: Feb 2004
Posts: 19
Default

I think I have DX9... I will confirm that later today.

Edit: Yep.. I have DX 9.0b
Reply With Quote
  #4  
Old 02-26-2004, 05:15 PM
netmazk
Fire Beetle
 
Join Date: Sep 2002
Posts: 2
Default

Just wanted to repport that I'm having the same problem, with world dying after character creation. I tried the fix you posted above, tofuwarrior, but it didn't seem to help. Hopefull I'll have some time to poke at this over the weekend

edit: here's where it dies on me: (linux 2.4.25)
Code:
Name approval request for:Netmazk race:6 class:11
Character creation request from netmazk LS#3213 (x.x.x.x:3853) : 
Name: Netmazk
Race: 6  Class: 11  Gender: 0  Deity: 206  Start zone: 5
STR  STA  AGI  DEX  WIS  INT  CHA    Total
 60   65   90   90   83  134   60     582
Face: 3  Eye colors: 0 0
Hairstyle: 0  Haircolor: 0
Beard: 0  Beardcolor: 0
Validating char creation info...
Found 0 errors in character creation request

[2]   Segmentation fault      ./world
Reply With Quote
  #5  
Old 02-27-2004, 04:54 AM
tofuwarrior
Fire Beetle
 
Join Date: Feb 2004
Posts: 19
Default

That is more or less exactly what happened to me before I made the fix I mentioned. I'm working under Windows though so perhaps there is some MySQL difference -or- you might have a different DB than I'm using.

I got the NPCMOVDB and applied the patches from Shawn 319's site.

You can also simply avoid the problem by commenting out a database check for starting locations and use the hard-coded ones that are used if it doesnt find anythign in the database.
Reply With Quote
  #6  
Old 03-04-2004, 08:54 AM
Dranyam
Fire Beetle
 
Join Date: Mar 2004
Posts: 1
Default

I was having the exact same problem and tofuwarrior's solution in his first post fixed this for me. Thanks, tofuwarrior.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:32 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3