Author Topic: AGS Bug (AGS 3.1.2) (Solved)  (Read 1955 times)

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
AGS Bug (AGS 3.1.2) (Solved)
« on: 08 Apr 2010, 23:42 »
I wasn't really sure where to get this so anyway.
I figured (well, Jim Reed did), this bug:

Code: [Select]
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);

« Last Edit: 17 Apr 2010, 05:11 by Dualnames »
No more military army stuff. I'm alive and back.

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #1 on: 09 Apr 2010, 00:10 »
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.

Re: AGS Bug (AGS 3.1.2)
« Reply #2 on: 09 Apr 2010, 00:18 »
I had Views with 19 loops  :) and it did not crash.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #3 on: 09 Apr 2010, 00:43 »
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
« Last Edit: 09 Apr 2010, 12:23 by Dualnames »
No more military army stuff. I'm alive and back.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #4 on: 11 Apr 2010, 19:29 »
Quote
Error: 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.

Quote
        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);

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

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #5 on: 11 Apr 2010, 23:26 »
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.
No more military army stuff. I'm alive and back.

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #6 on: 12 Apr 2010, 02:15 »
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

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #7 on: 12 Apr 2010, 19:22 »
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
No more military army stuff. I'm alive and back.

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #8 on: 14 Apr 2010, 15:27 »
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

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS Bug (AGS 3.1.2)
« Reply #9 on: 14 Apr 2010, 23:04 »
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.
No more military army stuff. I'm alive and back.