Having trouble with UOX3 on XP Pro

Forum where anything UOX3-related goes - including, but not limited to: newbie-support, ideas, general questions, comments, etc and-so-forth.
Post Reply
karlm
UOX3 Newbie
Posts: 7
Joined: Tue Sep 27, 2005 2:56 am
Has thanked: 0
Been thanked: 0

Having trouble with UOX3 on XP Pro

Post by karlm »

I've got UOX3 V0.98-3.0g installed on an XP pro machine. It's been up and running for about a week now, thanks to some help from Xuri. Tonight all fo a sudden, the server started crashing while it was loading. It gets to "Clearing all trades" and just crashes. No evidence of the crash other than the standard XP message asking if I want to send an error report. The UOX server then simply exits. I'm running it as an application, not a service. It may be something on my system that is effecting it, though this is a clean install of XP. The only thing I've installed on it is MS Office XP. This happens whether the computer is connected to the Internet or not. The only change I've made on the server since installing and configuring UOX was to disable the Windows firewall on my NIC (local connection only.)

The first time it started crashing, I was able to get it to work again by completely removing and reinstalling UOX. I haven't tried that again, since it only started crashing tonight and only worked once after the restore.

Any help or suggestions would be appreciated.

Karl
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Well there is only one part of ClearTrades() I can see that may be causing your crash.

Code: Select all

			CChar *k = (CChar *)i->GetCont();
			CItem *p = k->GetPackItem();
We should be validating our pointer "k" before using it. I'll go ahead and fix that when next I get the chance, and we can see if it remedies your problem.

Xuri: If you are reading this, you may be able to do this before I can, as it's my Birthday today and I still have a paper to write for class. :P Simply change the above lines in trade.cpp to

Code: Select all

			CChar *k = static_cast<CChar *>(i->GetCont());
			if( ValidateObject( k ) )
			{
				CItem *p = k->GetPackItem();
				...
			}
			i->Delete();
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Alrighty then. karlm, download this exe and see if the same error still occurs.

And just in case I messed something up, here's what the "clearTradesFunctor" code looks like after my changes, so giwo can review it ;P

Code: Select all

bool clearTradesFunctor( CBaseObject *a, UI32 &b, void *extraData )
{
	bool retVal = true;
	if( ValidateObject( a ) && a->CanBeObjType( OT_ITEM ) )
	{
		// Body of the functor goes here
		CItem *i = static_cast< CItem * >(a);
		if( i->GetType() == IT_CONTAINER && i->GetX() == 26 && i->GetY() == 0 && i->GetZ() == 0 && i->GetID() == 0x1E5E )
		{
			CChar *k = static_cast<CChar *>(i->GetCont());
			if( ValidateObject( k ) )	// can we move this check to outside the for loop?? I should think so!
			{
				CItem *p = k->GetPackItem();
				CDataList< CItem * > *iCont = i->GetContainsList();
				for( CItem *j = iCont->First(); !iCont->Finished(); j = iCont->Next() )
				{
					if( ValidateObject( j ) )
						j->SetCont( p );
				}
			}
			i->Delete();
			++b;	// let's track how many we cleared
		}
	}
	return retVal;
}
(Note that for some reason the forum changes all the "i"s to "I"s, not sure why. In my source, they're definitely "i" and not "I". ;P
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

I noticed that... that's very odd, Xu...

Must be spell-checker?
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Bwhahahaha. My fault. *removes i -> I from the word censor*
-= Ho Eyo He Hum =-
karlm
UOX3 Newbie
Posts: 7
Joined: Tue Sep 27, 2005 2:56 am
Has thanked: 0
Been thanked: 0

Post by karlm »

Thanks Xuri.

I'll give it a try tonight.
karlm
UOX3 Newbie
Posts: 7
Joined: Tue Sep 27, 2005 2:56 am
Has thanked: 0
Been thanked: 0

Post by karlm »

Hmm, I can't extract that file. I'm getting "unkown method in UOX3.exe" and the same for trade.cpp. Could you resend this file in zip form? I'm not real familiar with .rar files. Sorry to be a pain.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

http://www.xoduz.org/files/uox3/uox3test.zip
The source for this version is up on the CVS.

I've included a folder with a "maps.dfn" file in it. Place the folder in your UOX3/DFNDATA/ folder.
-= Ho Eyo He Hum =-
karlm
UOX3 Newbie
Posts: 7
Joined: Tue Sep 27, 2005 2:56 am
Has thanked: 0
Been thanked: 0

Post by karlm »

Ok, got it. However, now I'm getting a bunch of errors when the server is starting. They occur when it starts to open .mul files. They are:


"ultima online/map0.mul Failed" twice,
map2.mul, map3.mul and map4.mul are not found.

The file paths are all correct, but map2,3 and 4 are not there. I'll try updating my client and see if I can get by these. In the mean time, if you have any other ideas, please pass them along. Or, if there are any debug logs I can provide to help, let me know.
karlm
UOX3 Newbie
Posts: 7
Joined: Tue Sep 27, 2005 2:56 am
Has thanked: 0
Been thanked: 0

Post by karlm »

Ok, me again. according to the clinet patch, there is an 84 Meg file I need to download. On the dialup connection I have here at home, that's just not possible tonight. I guess I'll have to hook my laptop up at work and do it there tomorrow.

Thanks for all the help you guys have given me so far. Am I the only one reporting this problem?
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

You can ignore those "failed" notes, if you so preferr.

UOX3 still works fine even if you get those messages.

I do have a fix for you, however. Open /dfndata/maps/maps.dfn

Change X=7168 to X=6144

Next, remove the entires for MAP 2 through MAP 4, as you don't have those.

Next step, open uox3.ini, find MAPCOUNT and change it to 2.
Scott
karlm
UOX3 Newbie
Posts: 7
Joined: Tue Sep 27, 2005 2:56 am
Has thanked: 0
Been thanked: 0

Post by karlm »

Ok, that took care of those issues but now I'm seeing the same error as before, it gets to "Clearing all trades" then just crashes. Do you have a debug version of the server I could use to possibly capture some sort of logging or something?

I'm going to try a fresh install of the srever again tonight, without the dfndata file I downloaded. Though the problem didn't start right away after installing that, I want to try to narrow this down as much as possible. I'll keep you posted on my progres.

Thanks again.

Karl
karlm
UOX3 Newbie
Posts: 7
Joined: Tue Sep 27, 2005 2:56 am
Has thanked: 0
Been thanked: 0

Post by karlm »

I've got it up and running again. I reinstalled the server and made sure it worked. Then I applied the dfndata zip file downloaded from the web site. It still worked, though there were no doors on any buildings. I copied the shared folder from my previous installation back to my uox directory. (I backed it up to a separate folder before wiping it and reinstalling it.) At that point the server failed to start with the above mentioned error. So, I deleted the shared folder, then created a new, empty one and extracted worldfile006.zip from the web site into it. Now the server seems to be working, complete with NPC's and doors.

Maybe something in my old shared folder got corrupt. I still have all the files if anyone would like to have a look at them. I hadn't really had much time to change much in the world, though my kids may have while I was at work. They are the reason I'm setting this up anyway.

Again, thanks for all of your help, I'll let you know if this happens again. I'd be more than happy to run some debug logging for you or send you whatever files may help you resolve this. It's also entirely possible that the problem is related to my system specifically.

Karl.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

I would be quite interested in tracking down that problem.

If you still have your shared folder that is causing the crash, I'll have a look at it if you don't mind. Just zip the whole thing up and shoot it over to me via email.

jowig_81 at yahoo dot com

We can build debug versions, however without a compiler actually debugging it for you, it isn't much more help than the release versions.
Scott
Post Reply