UT error, how to solve it?

Discussions about UT99
buby
Average
Posts: 39
Joined: Thu Feb 23, 2017 1:07 am

UT error, how to solve it?

Post by buby »

Hi there, this is my first time here because I have met many problems with UT99. One of ths happen tonight as show in the picture and I wish to solve this matter, if there is a solution.
Thanks
You do not have the required permissions to view the files attached to this post.
ShaiHulud
Adept
Posts: 460
Joined: Sat Dec 22, 2012 6:37 am

Re: UT error, how to solve it?

Post by ShaiHulud »

Do you happen to remember what you were doing just before the error message appeared? Was Nexgen open? Do you always encounter that error on that map?

The Nexgen replace function has a potentially scary while loop (no limiter condition), but my best attempts to trip it up with edge-case input have failed. It would be good if we could find a scenario where the error occurred every time, so that the arguments to the function could be logged.
User avatar
Barbie
Godlike
Posts: 2923
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: UT error, how to solve it?

Post by Barbie »

You did not mention some circumstances:
* Were you playing locally or on line? Because Nexgen is often used in servers, I think the latter.
* If it was on line: are you the server maintainer?
* And, as ShaiHulud already asked: what did you do before this error occurred and is it reproducibly?

Aside from that I detected a bug in Nexgen112.NexgenUtil.uc that may have caused this error:
function replace

Code: Select all

/***************************************************************************************************
 *
 *  $DESCRIPTION  Replaces a specified substring in a string with another substring.
 *  $PARAM        source  The original string, which is to be filtered.
 *  $PARAM        oldStr  Substring in the original string that is to be replaced.
 *  $PARAM        newStr  Replacement for the substring to be replaced.
 *  $RETURN       The specified string where all occurrences of oldStr are replaced with newStr.
 *
 **************************************************************************************************/
static function string replace(coerce string source, coerce string oldStr, coerce string newStr) {
	local bool bDone;
	local int subStrIndex;
	local string result;
	local string strLeft;

	strLeft = source;

	// Replace each occurrence of oldStr with newStr.
	while (!bDone) {

		// Find index of oldStr in the part not examined yet.
		subStrIndex = instr(strLeft, oldStr);

		// Update examined and unexamined parts.
		if (subStrIndex < 0) {
			bDone = true;
			result = result $ strLeft;
		} else {
			result = result $ left(strLeft, subStrIndex) $ newStr;
			strLeft = mid(strLeft, subStrIndex + len(oldStr));
		}
	}

	// Return the filtered string.
	return result;
}
Because the InStr() function returns 0 if the search string is empty, the above replace() function will loop forever, if "oldStr" is empty.

<EDIT>
Example for map crashing UT added: one trigger logs the result of instr() with empty search text, the other trigger nearby the Pylon executes »log(Replace("Hello World", "", "none empty string"))« and will crash UT with this.
TestNexGen112Crash.jpg
</EDIT>
You do not have the required permissions to view the files attached to this post.
Last edited by Barbie on Thu Feb 23, 2017 10:51 am, edited 2 times in total.
"If Origin not in center it be not in center." --Buggie
buby
Average
Posts: 39
Joined: Thu Feb 23, 2017 1:07 am

Re: UT error, how to solve it?

Post by buby »

Thank you guys for your rapid answers.
Well, you are right, I have missed some information:

1) I was playing online
2) I am not a server
3) this error happen when I was shotting
4) This error (looping) happen often look at here and here and here
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA

Re: UT error, how to solve it?

Post by Chamberly »

Okay, I see 2 crash logs are Nexgen related due to language conflict?

The other 2 have crash related to inventory/maps (not just some maps but a lot of these maps will have these, no escape lol but you could use XC_Engine to avoid the crash or keep the crash)
Image
Image
Image Edit: Why does my sig not work anymore?
buby
Average
Posts: 39
Joined: Thu Feb 23, 2017 1:07 am

Re: UT error, how to solve it?

Post by buby »

Thank you, but let me know how to use "XC_Engine".

Thanks

PS.
I have found this link. Is it this that I have to install and modify? In my C:\UnrealTournament\System I have seen two files "XC_Spec_r6.u" and "XC_Spec_r9.u" what have I to do with these two files?
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA

Re: UT error, how to solve it?

Post by Chamberly »

The installation instruction are there, but later in that thread I posted a web link with a simplified installation instruction.

Those 2 files, just keep it there. Maps and some servers with siege mod use it.
Image
Image
Image Edit: Why does my sig not work anymore?
buby
Average
Posts: 39
Joined: Thu Feb 23, 2017 1:07 am

Re: UT error, how to solve it?

Post by buby »

Another one error I have got today while playing rng-diskbar-lol doing nothing just camp.
You do not have the required permissions to view the files attached to this post.
ShaiHulud
Adept
Posts: 460
Joined: Sat Dec 22, 2012 6:37 am

Re: UT error, how to solve it?

Post by ShaiHulud »

That latter image is identical to the one sent to me - and included in this thread:

viewtopic.php?f=12&t=12054

...perhaps try the same solutions posted there and see if that helps.

Out of interest, was NexgenStatsViewer running on that server? It looks something like this when you join:

Image