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? |
The only thing in the changelog is around build 933/934:
Quote:
|
I just duplicated this bug, with another machine that has WindowsXP with the windows EqEmu binaries and MySql 4.0
|
angelox, do you use windows or linux?
|
Ang is a penguin kinda guy.
|
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. |
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. |
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 :D :D :D
(i actually use virtuals for work - testing software) |
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. :) |
I narrowed down the problem to where the bug started, in this post;
http://www.eqemulator.net/forums/sho...976#post128976 |
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. |
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 |
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; Code:
INSERT INTO quest_globals VALUES (90,0,0,14,"quill","2",0); When they "poof", at that point, you can kill the client and go back to the drawing-board |
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. |
Thinking about it the changes in this part do not make sense to me:
Code:
uint32 now = Timer::GetTimeSeconds(); Code:
uint32 expired = atoul(row[2]); |
All times are GMT -4. The time now is 02:48 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.