Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2006, 07:47 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default quest_globals broken?

I just realized, none of my Perl quests that refer to quest_globals table worked anymore - I had to revert all the way back to EqEmu version 0.7.0-856 in order to see them work again.
what happens is, as soon as I start to zone in, the tables go blank, and if I re-insert the lines, when I run quest::delglobal, quest::setglobal, or anything that touches the table, it "poofs" again and nothing happens.
I'm wondering if this has been changed or is just broken after 0.7.0-856. Also maybe someone can verify this?
Reply With Quote
  #2  
Old 12-17-2006, 08:04 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

The only thing in the changelog is around build 933/934:
Quote:
==12/03/2006
FatherNitwit: Fixed a few issues related to quest global expiration.
I've never messed with globals, so I cannot help verify what's going on. Sorry.
Reply With Quote
  #3  
Old 12-17-2006, 09:02 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I just duplicated this bug, with another machine that has WindowsXP with the windows EqEmu binaries and MySql 4.0
Reply With Quote
  #4  
Old 12-17-2006, 02:07 PM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

angelox, do you use windows or linux?
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
Reply With Quote
  #5  
Old 12-17-2006, 02:26 PM
bufferofnewbies
Hill Giant
 
Join Date: Dec 2005
Location: Lurking in KY
Posts: 239
Default

Ang is a penguin kinda guy.
Reply With Quote
  #6  
Old 12-17-2006, 02:30 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I got windows too, I have my dedicated MySql server under WindowsXP, and I have another Xp machine just so I can run stuff like GeorgeS programs. the eqemu server is on Linux and I have my Linux machine with the everquest client

EDIT
One WindowsXP carries the MySql4.0 just for testing my "conversions" - the other and the rest of my machines for that matter, carry MySql 5x.

Last edited by Angelox; 12-17-2006 at 10:32 PM..
Reply With Quote
  #7  
Old 12-17-2006, 03:00 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Now you're probably wondering , how/why did this crazy old man get all these machines? Well, Im sort of a "computer garbage collector", I still have parts laying around from years ago. People still bring me stuff (usually, drop off their trash), and trade for repairs. I build little "Frankenstiens" all the time.
The "why" part, I don't know yet.
Reply With Quote
  #8  
Old 12-17-2006, 03:20 PM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Heh, I'm with ya Ang... including the old man part. I only buy laptops - otherwise, all my PCs are glommed together from parts old and new (Fry's loves me). But, to one-up you slightly, I also run Virtual machines off 2 of my servers. muhaha... while they are not very powerful (6 virts share 1 PC), it looks impressive in my ADUC

(i actually use virtuals for work - testing software)
Reply With Quote
  #9  
Old 12-17-2006, 03:25 PM
bufferofnewbies
Hill Giant
 
Join Date: Dec 2005
Location: Lurking in KY
Posts: 239
Default

5 systems and counting here also, we tend to get everyone's 'fix this' stuff and 'upgrade this' stuff.. which works out well, because we usually get the excess on the upgradeing part.

Just finished our last 'frank' here, and working on his bride now.
Reply With Quote
  #10  
Old 12-18-2006, 02:59 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I narrowed down the problem to where the bug started, in this post;
http://www.eqemulator.net/forums/sho...976#post128976
Reply With Quote
  #11  
Old 12-18-2006, 10:47 AM
totalcynic
Fire Beetle
 
Join Date: Dec 2006
Posts: 7
Default

I am trying to take a look at this code base as a learning exercise, and so I just did a diff between 933 and 934 and found two points that delete items from the quest_globals table, one in zone/embparser.cpp and another in zone/questmgr.cpp. In the patch these were modified so that the condition in the SQL contained;

where expdate < UNIX_TIMESTAMP()

Previously this was either;

where expdate < %lu

or

where expdate < %i

where %i and %lu were equal to the return from Timer::GetTimeSeconds()

Now I am assuming that Timer::GetTimeSeconds() returns the number of seconds since the epoch, or equal to time((time_t *) NULL). I haven't checked this, but assuming this is the case, then it looks like FBW fixed the above to work as expected, while previously the code was broken and was most likely leaving the table untouched.

So I started looking at the insertion of the data. One of these points is in the function setglobal, now this is where I am a little confused. I can see that ./zone/parser.cpp has code which calls this function;

quest_manager.setglobal(arglist[0], arglist[1], atoi(arglist[2]), arglist[3]);

However, I believe that the above could be wrong with the 3rd option, but this is an assumption and without replicating the exact problem I could be totally wrong. Could someone let me know how to replicate the issue, I have the ax_peq database and quests so if its just a matter of following some simple steps that would be great.

Oh, and BTW thanks everyone for getting the emu this far. I have been looking at these forums for years, and know how much work you have all done. This is why I want to try and help if possible while I have a little time on my hands.
Reply With Quote
  #12  
Old 12-18-2006, 11:00 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I was just starting to dig in to this too, I actually replaced these lines with the old ones;
Code:
// "DELETE FROM quest_globals WHERE expdate < UNIX_TIMESTAMP() || (name='%s' && npcid=%i && charid=%i && zoneid=%i))" //New one
"DELETE FROM quest_globals WHERE expdate < %i || (name='%s' && npcid=%i && charid=%i && zoneid=%i))" //Old one
I found two instances, it compiles but still does the same, so i guess there's more to it like you say -
Reply With Quote
  #13  
Old 12-18-2006, 11:12 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Heres what happens; First, watch your quest_globals table in the database, make sure these rows are there;

For MySql5x-
Code:
INSERT INTO quest_globals VALUES (90,0,0,14,"quill","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (94,0,0,227,"krak","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (103,0,0,227,"peer","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (140,0,0,227,"grums","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (139,0,0,227,"kars","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (98,0,0,227,"hanr","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (109,0,0,227,"bres","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (110,0,0,227,"razo","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (113,0,0,227,"lava","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (138,0,0,109,"rage","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (141,0,0,111,"omica","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (142,0,0,111,"Tserr","2",0) ON DUPLICATE KEY UPDATE value=2;
INSERT INTO quest_globals VALUES (152,0,0,224,"Alina","2",0) ON DUPLICATE KEY UPDATE value=2;
For MySql4x
Code:
INSERT INTO quest_globals VALUES (90,0,0,14,"quill","2",0);
INSERT INTO quest_globals VALUES (94,0,0,227,"krak","2",0);
INSERT INTO quest_globals VALUES (103,0,0,227,"peer","2",0);
INSERT INTO quest_globals VALUES (140,0,0,227,"grums","2",0);
INSERT INTO quest_globals VALUES (139,0,0,227,"kars","2",0);
INSERT INTO quest_globals VALUES (98,0,0,227,"hanr","2",0);
INSERT INTO quest_globals VALUES (109,0,0,227,"bres","2",0);
INSERT INTO quest_globals VALUES (110,0,0,227,"razo","2",0);
INSERT INTO quest_globals VALUES (113,0,0,227,"lava","2",0);
INSERT INTO quest_globals VALUES (138,0,0,109,"rage","2",0);
INSERT INTO quest_globals VALUES (141,0,0,111,"omica","2",0);
INSERT INTO quest_globals VALUES (142,0,0,111,"Tserr","2",0);
INSERT INTO quest_globals VALUES (152,0,0,224,"Alina","2",0);
Now log in a character - when you go from the character screen to zone in, they should all (quest_globals inserts) disapear. If they don't, #zone to nadox, make sure my quests are installed (most use quest_globals). They should "poof" and this is where the problem starts. Not to mention quests that use quest_globals do not work. You'll know when you got it right, as the quest_globals inserts will stay.
When they "poof", at that point, you can kill the client and go back to the drawing-board

Last edited by Angelox; 12-18-2006 at 07:51 PM..
Reply With Quote
  #14  
Old 12-18-2006, 09:04 PM
eq4me
Hill Giant
 
Join Date: Jul 2006
Posts: 166
Default

There are at least two more changes:

http://eqemulator.cvs.sourceforge.ne...15&r2=1.9.2.16 (already found)
http://eqemulator.cvs.sourceforge.ne...4&r2=1.13.2.15

I just browsed the CVS for changes around that time. Someone should do an cvs diff what was changed on Dec 3. I dont have time right now.

Maybe it is just the changed expire checking part in embparser.cpp.

Last edited by eq4me; 12-19-2006 at 05:12 AM..
Reply With Quote
  #15  
Old 12-18-2006, 10:39 PM
eq4me
Hill Giant
 
Join Date: Jul 2006
Posts: 166
Default

Thinking about it the changes in this part do not make sense to me:

Code:
uint32 now = Timer::GetTimeSeconds();
...
...
uint32 expdate = atoul(row[2]);
   if(expdate > now)
      run_delete = true;

   ExportVar(packagename.c_str(), row[0], row[1]);
was changed to

Code:
uint32 expired = atoul(row[2]);
   if(expired != 0) {
       run_delete = true;
   } else {
       ExportVar(packagename.c_str(), row[0], row[1]);
First the variable expired was checked if it is greater than the current time. Now it is checked if it is equal to zero or not? I might be dead wrong but I bet 'expired' will never be zero if nothing in the "atoul(row[2])" part was changed.

Last edited by eq4me; 12-19-2006 at 07:05 AM..
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 07:17 AM.


 

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