AGS Bug (AGS 3.1.2) (Solved)

Started by Dualnames, Thu 08/04/2010 23:42:27

Previous topic - Next topic

Dualnames

I wasn't really sure where to get this so anyway.
I figured (well, Jim Reed did), this bug:

Code: ags

Error: An error occurred while parsing EntityName. Line 1, position 148.
Version: AGS 3.1.2.81

System.Xml.XmlException: An error occurred while parsing EntityName. Line 1, position 148.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.Throw(String res)
   at System.Xml.XmlTextReaderImpl.ParseEntityName()
   at System.Xml.XmlTextReaderImpl.ParseEntityReference()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.LoadXml(String xml)
   at AGS.Editor.NamedPipesEngineCommunication.MessageSenderThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()


It's caused by this line (an error that showed up without the total red crash only once) on version 1.5 of the Smooth Parallax Module:

line 797
       Game.GetViewFrame(player.NormalView, player.Loop, 0); // Set it to their current Normal View


The bug is caused because I'm using a view with more than 4 loops. In fact 29. I've done a workaround, but well, it should be pointed to either CJ or Ali.
And this is what I'm using:
cDent.LockViewFrame(11, 3, 0);

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Ali

I don't quite see what caused that. Why should using 14 loops stop the script creating a pointer out of frame 0 in the current loop?

That's not too important, because the line in question isn't actually used by the module and could happily be commented out. It's an unimplemented part of the code to make sure the top of the player's sprite is the centre of the screen, rather than the bottom. But it looked fine without it, so I sloppily just stopped writing it.

I will clean that up when I next update the script.

Crimson Wizard

I had Views with 19 loops  :) and it did not crash.

Dualnames

#3
I locked a character with that loop. The module somehow tries to change to the next loop, and boom crashes. I don't know, all I know is that it does.


So here's what Jim Reed found.

[00:55] <JimReed|testing> An error has occurred. Please contact the game author for support, as this is likely to be a scripting error and not a bug in AGS.
[00:55] <JimReed|testing> (ACI version 3.12.1073)
[00:55] <JimReed|testing> in "Smooth Scrolling & Parallax.asc", line 797
[00:55] <JimReed|testing> Error: GetGameParameter: invalid loop specified
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

QuoteError: An error occurred while parsing EntityName. Line 1, position 148.
Version: AGS 3.1.2.81

This error is some sort of problem with the debugger communicating between the editor and engine. It seems to happen very rarely, I haven't yet identified what causes it.

That version of AGS is a non-SP1 release of 3.1.2, I recommend you upgrade to 3.1.2 SP1 as it fixed a few issues.

QuoteGame.GetViewFrame(player.NormalView, player.Loop, 0); // Set it to their current Normal View

The bug is caused because I'm using a view with more than 4 loops. In fact 29. I've done a workaround, but well, it should be pointed to either CJ or Ali.
And this is what I'm using:
cDent.LockViewFrame(11, 3, 0);

This is not a bug in AGS -- if you change the character's view to View 11, then try to use the player's current Loop number with player.NormalView, it could well request an invalid loop number in their normal view.

Did you mean to use player.View instead?

Dualnames

Chris, I didn't mean to use player.View. This happens because I'm using cDent.FaceLocation(mouse.x,mouse.y);

I have before locked the view using LockView into View 18. View 18 consists of 18 Loops. When I removed the face location, everything seems to be solved. And from what I've searched on my scripts, it's actually what causing this thing.

None of the views is empty. I'm not using NormalView at all, in that case.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

monkey0506

The issue isn't necessarily in your code Dual, but rather in the Smooth Parallax module.

The character cDent has a NormalView set. You already said that you are using LockView to lock cDent into View 18. But how many loops are in cDent's normal view? If the NormalView has less loops than View 18 then the issue CJ identified still exists, but in the module code rather than your own.

Dualnames

Monkey_05_06 what you said is true (NormalView has indeed less loops than view 18 (4 - 29 infact)) but Ali says he's removed that line from the 1.6 version (I'm using 1.4 or 1.5), I'm about to update anyway to the newest module code.

I guess this is all settled then. :D
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Ali

Thanks for explaining my mistake.

To be clear Duals, the buggy line is still in version 1.6 because I uploaded it before I heard about this. Once I've got a little more feedback on the new style of scrolling I'll upload a fix. Until then just comment the line out!

Dualnames

Quote from: Ali on Wed 14/04/2010 15:27:58
Thanks for explaining my mistake.

To be clear Duals, the buggy line is still in version 1.6 because I uploaded it before I heard about this. Once I've got a little more feedback on the new style of scrolling I'll upload a fix. Until then just comment the line out!

Okay, done. Good to know. It's actually the reason why I didn't post this in the module topic, I kinda of guessed you'd rather have comments on the scrolling side of things.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk